Question for check_linux_stats.pl
Posted: Thu Apr 09, 2015 2:04 am
Hi,
I configure check memory service in RHEL and oracle linux by check_linux_stats.pl. According to my observation, I find the memory used % is not accuracy. Below is the data that I capture from our servers. Kindly correct me if I mistake understand the concept.
1. Red Hat Linux
Kernel Vesion: Linux cmnndns01 2.6.32-431.17.1.el6.x86_64 #1 SMP Fri Apr 11 17:27:00 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@cmnndns01 etc]# /usr/local/nagios/libexec/check_linux_stats.pl -M -w 90 -c 95
MEMORY OK : Mem used: 11.38%, Swap used: 0.00% |MemUsed=11.38%;90;95 SwapUsed=0.00%;; MemCached=10.78% SwapCached=0.00% Active=14.29%
From check_linux_stats.pl result, memory used is 11.38%
[root@cmnndns01 etc]# free -m
total used free shared buffers cached
Mem: 7870 1739 6130 0 409 848
-/+ buffers/cache: 482 7387
Swap: 8191 0 8191
Result from "free -m", 1739/7870 x 100% = 22%
07:00:01 AM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit
10:00:01 AM 6277964 1780976 22.10 419076 868072 480724 2.92
10:10:01 AM 6277872 1781068 22.10 419076 868080 482300 2.93
10:20:01 AM 6278252 1780688 22.10 419076 868100 431320 2.62
10:30:01 AM 6279136 1779804 22.08 419076 868104 430880 2.62
10:40:01 AM 6277896 1781044 22.10 419076 868116 481728 2.93
Result from sar -r, %memused = 22%
2. Oracle Linux
Linux lcsridb14 3.8.13-16.2.1.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@lcsridb14 ~]# /usr/local/nagios/libexec/check_linux_stats.pl -M -w 90 -c 95
MEMORY OK : Mem used: 17.80%, Swap used: 0.00% |MemUsed=17.80%;90;95 SwapUsed=0.00%;; MemCached=81.36% SwapCached=0.00% Active=36.45%
From check_linux_stats.pl result, memory used is 17.80%
[root@lcsridb14 ~]# free -m
total used free shared buffers cached
Mem: 12015 11873 142 0 617 9776
-/+ buffers/cache: 1480 10535
Swap: 32767 0 32767
Result from "free -m", 11873/12015 x 100% = 98.8%
10:00:01 AM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit
10:05:01 AM 154448 12149708 98.74 629976 10008400 708344 1.54
10:10:01 AM 140128 12164028 98.86 630000 10009576 722492 1.58
10:15:01 AM 337788 11966368 97.25 630032 9789020 745932 1.63
10:20:01 AM 153108 12151048 98.76 630096 10010076 708320 1.54
10:25:01 AM 156284 12147872 98.73 630128 10005980 708308 1.54
10:30:01 AM 210552 12093604 98.29 630164 9888484 942148 2.05
Result from sar -r, %memused = 98.29%
If this script is not suitable to run for these two version of Linux because we are unable to get alert if they are in high memory usage.
Where can I download a correct scripts for check memory usage?
I configure check memory service in RHEL and oracle linux by check_linux_stats.pl. According to my observation, I find the memory used % is not accuracy. Below is the data that I capture from our servers. Kindly correct me if I mistake understand the concept.
1. Red Hat Linux
Kernel Vesion: Linux cmnndns01 2.6.32-431.17.1.el6.x86_64 #1 SMP Fri Apr 11 17:27:00 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@cmnndns01 etc]# /usr/local/nagios/libexec/check_linux_stats.pl -M -w 90 -c 95
MEMORY OK : Mem used: 11.38%, Swap used: 0.00% |MemUsed=11.38%;90;95 SwapUsed=0.00%;; MemCached=10.78% SwapCached=0.00% Active=14.29%
From check_linux_stats.pl result, memory used is 11.38%
[root@cmnndns01 etc]# free -m
total used free shared buffers cached
Mem: 7870 1739 6130 0 409 848
-/+ buffers/cache: 482 7387
Swap: 8191 0 8191
Result from "free -m", 1739/7870 x 100% = 22%
07:00:01 AM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit
10:00:01 AM 6277964 1780976 22.10 419076 868072 480724 2.92
10:10:01 AM 6277872 1781068 22.10 419076 868080 482300 2.93
10:20:01 AM 6278252 1780688 22.10 419076 868100 431320 2.62
10:30:01 AM 6279136 1779804 22.08 419076 868104 430880 2.62
10:40:01 AM 6277896 1781044 22.10 419076 868116 481728 2.93
Result from sar -r, %memused = 22%
2. Oracle Linux
Linux lcsridb14 3.8.13-16.2.1.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@lcsridb14 ~]# /usr/local/nagios/libexec/check_linux_stats.pl -M -w 90 -c 95
MEMORY OK : Mem used: 17.80%, Swap used: 0.00% |MemUsed=17.80%;90;95 SwapUsed=0.00%;; MemCached=81.36% SwapCached=0.00% Active=36.45%
From check_linux_stats.pl result, memory used is 17.80%
[root@lcsridb14 ~]# free -m
total used free shared buffers cached
Mem: 12015 11873 142 0 617 9776
-/+ buffers/cache: 1480 10535
Swap: 32767 0 32767
Result from "free -m", 11873/12015 x 100% = 98.8%
10:00:01 AM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit
10:05:01 AM 154448 12149708 98.74 629976 10008400 708344 1.54
10:10:01 AM 140128 12164028 98.86 630000 10009576 722492 1.58
10:15:01 AM 337788 11966368 97.25 630032 9789020 745932 1.63
10:20:01 AM 153108 12151048 98.76 630096 10010076 708320 1.54
10:25:01 AM 156284 12147872 98.73 630128 10005980 708308 1.54
10:30:01 AM 210552 12093604 98.29 630164 9888484 942148 2.05
Result from sar -r, %memused = 98.29%
If this script is not suitable to run for these two version of Linux because we are unable to get alert if they are in high memory usage.
Where can I download a correct scripts for check memory usage?