swpd is an interesting field, It gives some scan activity of kswapd. The output of vmstat is very different between your Solaris example six years ago and Linux now. The -s option gives some additional values: ]# vmstat -s -Sm |grep total This is a mm value the command free uses it to calculate "used" from "total". Here, just like in free, you can answer the basic questions: 1) Free Memory You can use -Sm to prevent layout mistakes due to long numbers. This command gives a per second value, which is an important aspect. The "best way" is not necessarily to distinguish betweem how much OS uses and how much is used by app, as you imply. ", " Page cache" and " Free (cachelist)" show RAM used to cache data and the line " Free (freelist)" reports unused, i.e. The sum of the lines " Anon" and " Exec and libs" is the RAM used by applications, The line " Kernel" reports the RAM used by the kernel, the lines " ZFS. You might run echo ::memstat | mdb -k and parse its output. 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? In prstat output, the SWAP column shows the virtual memory used and the RSS column, the RAM used.Ībout kernel usage, you can run kstat -n system_pages and have a look to the pp_kernel value. To have a detailed idea about what is using your system memory, in addition to the already suggested echo ::memstat | mdb -k command, you can run prstat -n 1 -a which will give you the memory usage per user, prstat -n 1 -Z for zone usage and prstat -s rss for per process usage sorted by RAM. If it is not equal to zero, you should investigate what is demanding RAM. ![]() As long as it stays equal to zero, you shouldn't worry about RAM. You just need to monitor the sr column (scan rate). It is however a very good tool to measure RAM shortage. It doesn't give any metric quantifying how much virtual and physical memory is used and what is using it. Vmstat is not that useful to measure memory usage. ![]() 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? I mean the script collects from vmstat values ok. Values from vmstat and from new script are OK. This is output from new script on Solaris host I added another script for memory usage from 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ĬRITICAL - 34.6% (439872 kB) free!|TOTAL=1272376KB USED=832504KB 127237 508950 FREE=439872KB CACHES=418977KB Currently I have nagios check who measures used memory from free -m command on Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |