no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | tech:linux:memory_usage [2014/11/15 15:13] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Find Memory Usage ====== | ||
| + | ===== System memory used and free ===== | ||
| + | Total Used and Free Memory in MBytes (in that order) | ||
| + | < | ||
| + | free -m|grep " | ||
| + | </ | ||
| + | |||
| + | ===== Memory by Process ===== | ||
| + | Raw | ||
| + | < | ||
| + | ps -e -orss=, | ||
| + | </ | ||
| + | Human readable | ||
| + | < | ||
| + | ps -e -orss=, | ||
| + | </ | ||
| + | |||
| + | ===== Memory by Process - Grouped together ===== | ||
| + | Raw | ||
| + | < | ||
| + | ps -e -orss=, | ||
| + | </ | ||
| + | Human readable | ||
| + | < | ||
| + | ps -e -orss=, | ||
| + | </ | ||
| + | |||
| + | ===== Total RSS Memory ===== | ||
| + | < | ||
| + | ps -e -orss= | awk '{ sum += $1 } END { print sum }' | ||
| + | </ | ||
| + | Human redable | ||
| + | < | ||
| + | ps -e -orss= | awk '{ sum += $1 } END { print sum }' | awk '{ split( "KB MB GB" , v ); s=1; while( $1>1024 ){ $1/=1024; s++ } print int($1) " " v[s] " " $2 }' | ||
| + | </ | ||
| + | |||
| + | ===== Total Memory ===== | ||
| + | < | ||
| + | smem -w -t -k | ||
| + | </ | ||
| + | |||
| + | ===== Related ===== | ||
| + | Use '' | ||