Consider this:
[skrat@apex geri]$ cat /proc/meminfo | grep SwapTotal
SwapTotal: 18438120 kB
[skrat@apex geri]$ swapon -s
Filename Type Size Used Priority
/dev/mmcblk0p2 (deleted) partition 3073020 0 10
/dev/mmcblk0p2 (deleted) partition 3073020 0 10
/dev/mmcblk0p2 (deleted) partition 3073020 0 10
/dev/mmcblk0p2 (deleted) partition 3073020 0 10
/dev/mmcblk0p2 (deleted) partition 3073020 0 10
/dev/mmcblk0p2 partition 3073020 583196 1000
Why is meminfo
reporting total swap size including deleted swap files/devices? The reason it bothers me is that everytime the system gets suspended, these devices are remounted, every time adding new (deleted)
swap device, adding up to misleding SwapTotal
value. That makes it rather hard to monitor swap usage unless I'm willing to use parse and sum swapon -s
output. How can I purge these (deleted)
devices or get SwapTotal
to report good values?