Ubuntu: How to check if the swap partition is being used correctly in ubuntu 15.10



Question:

when I throw the command 'sudo swapon -s' no error or nothing shows up. I resized my primary partition and deleted my swap and reacreated it updating the values in the fstab file.......I would like to know how to verify if the swap partition is being used. I'm in Ubuntu 15.10. Thanks!


Solution:1

You ask Ubuntu Linux like this:

swapon -s

Then it displays (for me):

Filename Type Size Used Priority

/dev/sda1 partition 8388604 14056 -1

Here you can see where howmuch usage priority.

Do try the help with commands: command --help

swapon --help In linux just an H might mean Human readable or something else, or try the man pages!


Solution:2

swapon -s is deprecated newer Version is

swapon --show  

The above command shows output in well structured format

NAME      TYPE      SIZE   USED PRIO  /dev/sda9 partition 7.6G 491.9M   -1  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »