swap space usage
catam
gogu at l.route666.net
Wed Jan 3 06:52:17 CST 2007
Same info comes from ps :)
ps axu|head -2
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1516 376 ? S 2006 0:28 init
grep -E 'VmSize|VmRSS' /proc/1/status
VmSize: 1516 kB
VmRSS: 376 kB
On Wed, 3 Jan 2007, Haakon Gjersvik Eriksen wrote:
>
> The /proc file system is your friend. You can easily make a list of the
> biggest processes by doing something like
> # grep VmSize /proc/*/status | sort -nr -k 2 | head
> And then match the PIDs you get out of that to /proc/PID/cmdline to get
> the process names if PIDs aren't sufficient.
>
> If just getting the biggest process isn't enough, you can try grepping
> out VmRSS (which is non-swapped-out memory) from /proc and subtracting
> that from VmSize to get swapped out memory. Shouldn't be too difficult
> with your favorite scripting language.
>
> (sorry, I'm a bit busy so most of this is, unfortunately, left as an
> exercise for the reader. I figured it might be better than nothing, though)
>
>
More information about the Linux-PowerEdge
mailing list