I have some doubts with memory usage.
Currently I have nagios
check who measures used memory from free -m
command on Linux. I added another script for memory usage from http://exchange.nagios.org/directory/Plugins/Operating-Systems/Solaris/check_mem-2Epl/details and it measures for Solaris from vmstat
and for Linux from /proc/meminfo
, with this new check a have a lot more usage 20 % - 30 % more on some hosts.
./check_mem.pl -f -w 90 -c 60
CRITICAL - 34.6% (439872 kB) free!|TOTAL=1272376KB;;;; USED=832504KB;127237;508950;; FREE=439872KB;;;; CACHES=418977KB;;;;
this is output from new script on Solaris host on this host I also have
vmstat 1 2
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 -- -- -- in sy cs us sy id
0 0 0 1184172 474856 54 222 0 0 0 0 112 8 0 0 0 231 1735 669 1 8 91
0 0 0 1175352 440948 16 58 0 0 0 0 0 0 0 0 0 229 83 190 0 3 97
values from vmstat
and from new script are OK. I mean the script collects from vmstat
values ok.
I need to know what is the best way to measure memory usage on Solaris and Linux, how can I see how much OS uses and how much is used by app is it vmstat
(Sunos) and /proc/meminfo
(Linux) OK for that?