How to find which swap in use?

Timothy Murphy gayleard at
Fri Jun 11 14:02:47 UTC 2010

Frank Elsner wrote:

> On Fri, 11 Jun 2010 14:09:19 +0100 Timothy Murphy wrote:
>> A very old (11 years?) but much loved desktop
>> has developed a nasty habit of stopping me editing
>> because the file, it says, is Read-only.
>> I suspect this is because the swap partition
>> (on an even older SCSI disk) is not functioning.
>> How does one find which swap device or devices is in use?
>> ("top" says there is 2GB swap space, but 0k in use.)
> cat /proc/swaps or swapon -s

Thanks for that.
Actually, these give the same information in this case as "top", eg
[tim at alfred ~]$ sudo swapon -s
Filename      Type            Size    Used    Priority
/dev/sdb3     partition       1959920 0       -1

It seems that swap is not being used, for some reason.
This machine has just under 1GB RAM (the max for this motherboard)
so it is not clear why swap is not in use.

I think maybe the machine is sick:
[tim at alfred ~]$ sudo less /var/log/messages
Bus error

Timothy Murphy  
e-mail: gayleard /at/
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

More information about the users mailing list