Skip to content

Commit

Permalink
Merge pull request #15 from zearan/fix-shared-mem
Browse files Browse the repository at this point in the history
Linux: Substract shared memory from cached memory
  • Loading branch information
justintime committed Oct 12, 2016
2 parents a57fe5e + 6e1a3b5 commit dc5e8df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions check_mem/check_mem.pl
Expand Up @@ -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;
}
Expand Down

0 comments on commit dc5e8df

Please sign in to comment.