We use check_mem.pl to check memory usage in Nagios. On one of our CentOS 6 servers, the check reports a warning about swap usage. However, upon checking, the server doesn't seem to use any swap.
This is what top says:
And the nagios check_mem.pl output:
-bash-4.2$ ./check_mem.pl -w 99,25 -c 100,50 -v
<b>WARNING: Memory Usage: (W> 99, C> 100): 34% - Total: 7823 MB, used: 2697 MB, free: 5126 MB<br>Swap Usage: (W> 25, C> 50): 27% - Total: 9871 MB, used: 2697 MB, free: 7174 MB<br></b>|MemUsed=34%;99;100 SwapUsed=27%;25;50
Why does check_mem report 2697MB swap usage while top reports a swap usage of 0?