Permalink
Browse files

Merge pull request #15 from zearan/fix-shared-mem

Linux: Substract shared memory from cached memory
  • Loading branch information...
2 parents a57fe5e + 6e1a3b5 commit dc5e8dfd883febef862cf4c58d24817362128c18 @justintime committed on GitHub Oct 12, 2016
Showing with 3 additions and 0 deletions.
  1. +3 −0 check_mem/check_mem.pl
@@ -156,6 +156,9 @@ sub get_memory_info {
elsif (/^(Buffers|Cached|SReclaimable):\s+(\d+) kB/) {
$caches_kb += $2;
}
+ elsif (/^Shmem:\s+(\d+) kB/) {
+ $caches_kb -= $1;
+ }
}
$used_memory_kb = $total_memory_kb - $free_memory_kb;
}

0 comments on commit dc5e8df

Please sign in to comment.