Hello, On Mon, 13 Jun 2011, Per Jessen wrote:
jsa wrote:
On 06/12/2011 07:46 AM, Anton Aylward wrote:
The 'swapon' command will tell me how much swap is being used.
Is there anything that will tell me what is using swap, what programs, processes etc are using it or what the contents of swap is?
Forgot to add, you can run top in a terminal and then press f followed by p to add a column for swap usage.
Or just swap = virtual - resident.
So: ps -eo vsz,rss,cmd | awk '{ printf("%10s %s\n", $1 - $2, $3); }' (add a '| sort -n' if you like). You can add the pid too, and add a header for "SWAP" Column, e.g.: ps -eo vsz,rss,pid,cmd | awk ' NR==1{ printf("%10s %10s %s\n", "SWAP", $3, $4); } NR>1{ printf("%10s %10s %s\n", $1-$2, $3, $4); }' HTH, -dnh -- "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -- Ernst Jan Plugge -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org