Page 1 of 1

Check Swap issue

Posted: Wed Apr 26, 2017 3:43 pm
by BanditBBS
Anyone else monitoring OEL 7 and running into swap monitoring issue:

Code: Select all

/usr/local/nagios/libexec/check_swap -w 30% -c 20% -a
SWAP CRITICAL - 0% free (0 MB out of 0 MB) - Swap is either disabled, not present, or of zero size. |swap=0MB;0;0;0;0
but....

Code: Select all

df -Ph
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/vg_main-lv_root  6.0G  3.7G  2.3G  62% /
devtmpfs                     3.7G     0  3.7G   0% /dev
tmpfs                        3.7G     0  3.7G   0% /dev/shm
tmpfs                        3.7G  113M  3.6G   4% /run
tmpfs                        3.7G     0  3.7G   0% /sys/fs/cgroup
/dev/xvdb1                   497M  198M  300M  40% /boot
tmpfs                        749M     0  749M   0% /run/user/1554
tmpfs                        749M     0  749M   0% /run/user/1779
Those bottom two are the swap. How is anyone else handling this?

Re: Check Swap issue

Posted: Wed Apr 26, 2017 4:47 pm
by cdienger
Hi BanditBBS,

You may need to run the swapon command for it to work. Check the output of:

cat /proc/swaps

To find swap partititions. If you see /run/user/1779 or /run/user/1554 listed you would turn them on with:

swapon /run/user/1779
swapon /run/user/1554