On my system i have some amount of swap used:
undefine@uml:~$ free
total used free shared buffers cached
Mem: 16109684 15848264 261420 633496 48668 6096984
-/+ buffers/cache: 9702612 6407072
Swap: 15622140 604 15621536
How to check what is in swap?
I try to check it via processes, but for every pid on system VmSwap is 0:
undefine@uml:~$ awk '/VmSwap/ {print $2}' /proc/*/status |uniq
0
What else can be in swap?
I thought about tmpfs – but i reread all files on tmpfs-es – and it doesn't flush swap size.
Best Answer
smem
is the standard tool for this. It's clean and simple.On a Debian based system, install it via package manager:
A sample (clipped) output from my system: