Memory

How to find the processes using the most swap space in Linux

There's already a good answer to the question at stackoverflow. They suggested to use the top command, then change the sorting field to "swap" by hitting O and p. Unfortunately (afaik) there's no way to do this in batch mode (using the -b switch) and save the top swap using prorcesses in a file. There's another method: use the ps command.
psres=$(ps -eo rss,vsz,user,pid,tty,time,cmd); set -- $(/bin/echo "$psres" | head -n1); shift; shift; echo "SWAP $*"; echo "$psres" | awk 'BEGIN {ORS=""; getline} {print $2 - $1 " "; for (i=3; i<NF; i++) print $i " "; print $NF "\n"}' | sort -rn | head

Memory usage with Xorg on the thin clients

Yesterday I've experienced something on my thin client for the first time: the screen froze, but the box was still running. I had lock ups previously, but then I could not ping it or ssh into the client. To cut things short: it ran out of memory and the kernel killed Xorg completely to keep things running.

Syndicate content