21 |
|
# You'd be silly not to use this ;) |
22 |
|
use strict; |
23 |
|
|
24 |
+ |
&include_osver(); |
25 |
|
&include_users(); |
26 |
|
&include_top(); |
27 |
|
|
85 |
|
&print_pair("packet.memory.swap_in_use", $top =~ /([^\s]+?)[MG] swap in use/); |
86 |
|
&print_pair("packet.memory.swap_free", $top =~ /([^\s]+?)[MG] swap free/); |
87 |
|
|
88 |
+ |
} |
89 |
+ |
|
90 |
+ |
sub include_osver() { |
91 |
+ |
|
92 |
+ |
# Find out details about the operating system |
93 |
+ |
my($os_name) = `uname -s`; |
94 |
+ |
my($os_release) = `uname -r`; |
95 |
+ |
my($os_platform) = `uname -m`; |
96 |
+ |
my($os_sysname) = `uname -n`; |
97 |
+ |
my($os_version) = `uname -v`; |
98 |
+ |
|
99 |
+ |
&print_pair("packet.os.name", $os_name); |
100 |
+ |
&print_pair("packet.os.release", $os_release); |
101 |
+ |
&print_pair("packet.os.platform", $os_platform); |
102 |
+ |
&print_pair("packet.os.sysname", $os_sysname); |
103 |
+ |
&print_pair("packet.os.version", $os_version); |
104 |
+ |
|
105 |
|
} |