Swap space, it's needed at times and can be a real pain at others. It is a necessary evil that has to be put up with however. I've recently had to monitor how much swap space various processes have been using on a Linux system and found that top
was the best and quickest option for doing so.
By default however, top
does not show swap space details...
That's easily remedied by pressing the 'F' (capital f) key followed by 'p' and then enter
This tells top to sort processes using the swap space column and at the same time this also displays the swap space usage. Neat!
Of course top will not keep those settings, but by pressing the 'W' (capital w) key it will write a settings file to ~/.toprc
so the next time you open top, it will have its output sorted by swap space.
By deleting the ~/.toprc
all of the original settings will be restored.
A quick disclaimer...
Although I put in a great effort into researching all the topics I cover, mistakes can happen.
If you spot something out of place, please do let me know.
All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle).
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...