From c8e8efcd259b577cbc833f80fdf4772ec94fb4f1 Mon Sep 17 00:00:00 2001 From: "pbuetow (lap824)" Date: Sun, 22 Jan 2012 11:14:24 +0100 Subject: collecting of mem stats --- loadbars | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3