26 |
|
my($dfbin) = "/usr/bin/df"; |
27 |
|
my($usersbin) = "/usr/ucb/users"; |
28 |
|
my($unamebin) = "/usr/bin/uname"; |
29 |
+ |
my($uptimebin) = "/usr/bin/uptime"; |
30 |
|
|
31 |
|
# Run the following components: - |
32 |
|
&print_ident(); |
33 |
|
&include_osver(); |
34 |
+ |
&include_uptime(); |
35 |
|
&include_users(); |
36 |
|
&include_top(); |
37 |
|
&include_disk(); |
187 |
|
&print_pair(0, "packet.os.platform", $os_platform); |
188 |
|
&print_pair(0, "packet.os.sysname", $os_sysname); |
189 |
|
&print_pair(0, "packet.os.version", $os_version); |
190 |
+ |
|
191 |
+ |
} |
192 |
+ |
|
193 |
+ |
# sub to get system uptime. |
194 |
+ |
sub include_uptime() { |
195 |
+ |
|
196 |
+ |
# Need a regexp guru to strip the junk on this line |
197 |
+ |
my($uptime) = `$uptimebin`; |
198 |
+ |
|
199 |
+ |
&print_pair(0, "packet.os.uptime", $uptime); |
200 |
|
|
201 |
< |
} |
201 |
> |
} |