summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpbuetow (lap824) <puppet@mx.buetow.org>2012-01-22 11:14:24 +0100
committerpbuetow (lap824) <puppet@mx.buetow.org>2012-01-22 11:14:24 +0100
commitc8e8efcd259b577cbc833f80fdf4772ec94fb4f1 (patch)
tree1bc8e049ca0b0d3c7cb4a2aa542a82f07062b755
parent212d270a5cc6c30da62c21bd31705e6b096b3fb9 (diff)
collecting of mem stats
-rwxr-xr-xloadbars8
1 files changed, 7 insertions, 1 deletions
diff --git a/loadbars b/loadbars
index 698717f..624e51f 100755
--- a/loadbars
+++ b/loadbars
@@ -161,6 +161,13 @@ BASH
$CPUSTATS{"$host;$name"} = join ';',
map { $_ . '=' . $load->{$_} }
grep { defined $load->{$_} } keys %$load;
+
+ } else {
+ for my $meminfo (qw(MemTotal MemFree Buffers Cached SwapTotal SwapFree)) {
+ if (/^$meminfo: *(\d+)/) {
+ $MEMSTATS{"$host;$meminfo"} = $1;
+ }
+ }
}
if ($sigusr1) {
@@ -168,7 +175,6 @@ BASH
$sigusr1 = 0;
}
}
-
}
return undef;