Who is using my swap space?

Most of the time, I post entries in this blog to share knowledge with others. Sometimes, I post an entry so that in the future, I can quickly find an answer to something I know I forgot. This is one of those times. If other’s find this useful, great!

I’ve been working on a Linux system that has had some memory-related issues for one of my Oracle databases. I ended up needing to increase the swap space as it was set too low. After swap was increased, I saw some swap space being used and I wanted to know if this was Oracle using swap or something else. So who is using my swap space on this Linux system? I can run the following command to find out.

for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{print ""}' $file; done | sort -k 2 -n

During usa cialis such a scenario, a professional will ensure that use this encryption. With a wide range of products n diverse forms such as cialis properien , cialis soft, cialis properien super active, robertrobb.com super force or jelly. You will viagra generic online get your medicine at your doorstep at very cheaper cost. It also relieves you from intestinal gas, cialis in india diabetes, muscular pain, cough and diarrhea. The output is sorted in ascending order with the most egregious offenders at the bottom of the list.

To sort in reverse order and then stop the output from scrolling off the screen, use this version instead.

for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less