131 |
|
|
132 |
|
&print_pair(1, "packet.load.load1", $top =~ /load averages:\s*([^\s]+?),/); |
133 |
|
&print_pair(1, "packet.load.load5", $top =~ /load averages:\s*.+?,\s*([^\s]+?),/); |
134 |
< |
&print_pair(1, "packet.load.load15", $top =~ /load averages:\s*.+?,\s*.+?,\s*([^\s]+?)\s*/); |
134 |
> |
&print_pair(1, "packet.load.load15", $top =~ /load averages:\s*.+?,\s*.+?,\s*([^\s]+?)\s.*/); |
135 |
|
&print_pair(1, "packet.processes.total", $top =~ /([^\s]+?) processes:/); |
136 |
|
&print_pair(1, "packet.processes.sleeping", $top =~ / ([^\s]+?) sleeping/); |
137 |
|
&print_pair(1, "packet.processes.zombie", $top =~ / ([^\s]+?) zombie/); |
193 |
|
# sub to get system uptime. |
194 |
|
sub include_uptime() { |
195 |
|
|
196 |
– |
# Need a regexp guru to strip the junk on this line |
196 |
|
my($uptime) = `$uptimebin`; |
197 |
+ |
$uptime =~ /up ([0-9]+) .*, ([0-9]+:[0-9]+)/; |
198 |
+ |
$uptime = "$1:$2"; |
199 |
|
|
200 |
|
&print_pair(0, "packet.os.uptime", $uptime); |
201 |
|
|