Closed GoogleCodeExporter closed 8 years ago
proposed patch:
--- check-mysql-all/check_linux_mem 2009-11-26 02:34:43.000000000 -0500
+++ ./check_linux_mem_new 2010-02-15 11:53:03.000000000 -0500
@@ -56,9 +56,13 @@
my $total_memory = `/bin/cat /proc/meminfo |/bin/grep -i MemTotal | /bin/awk {'print
\$2'}`;
my $free_memory = `/bin/cat /proc/meminfo |/bin/grep -i MemFree | /bin/awk {'print
\$2'}`;
+my $buffers = `/bin/cat /proc/meminfo |/bin/grep -i Buffers | /bin/awk
{'print \$2'}`;
+my $cached = `/bin/cat /proc/meminfo |/bin/egrep -i '^Cached' | /bin/awk
{'print
\$2'}`;
chomp($total_memory);
chomp($free_memory);
-my $pct_used = int(100 - ((($free_memory / $total_memory) * 100) - 0.5));
+chomp($buffers);
+chomp($cached);
+my $pct_used = int(100 - (((($free_memory + $buffers + $cached) /
$total_memory)
* 100) - 0.5));
if ($pct_used >= $opts{critical}) {
print "CRITICAL: $pct_used% memory used\n";
Original comment by trudea...@gmail.com
on 15 Feb 2010 at 4:54
Original comment by ryan.a.l...@gmail.com
on 18 Nov 2010 at 11:30
Fixed in 0.1.1
Original comment by ryan.a.l...@gmail.com
on 11 Feb 2011 at 8:53
Original issue reported on code.google.com by
trudea...@gmail.com
on 15 Feb 2010 at 4:45