Checking if swap-file is active?

good day dear friends,

how to check if i have swap-file on the system!

on ubuntu we could do something like this:


cat /proc/swaps

In addition to the size, it will tell the type of swap (partition/file). It appears to give exactly the same output as swapon -s (posted here, but apparently deprecated).

Or
cat /etc/fstab

which will not give you the correct info in the (unusual) case of a swap added manually, as per comment by Carlo Wood.

cf:

are the checks (weather i have swap-file on the eos install active or not - are the checks the same”!?

Type swapon

If you have any swap, it will show it.

2 Likes

good evening dear dalto

martin@t520 ~]$ swapon --show
[martin@t520 ~]$ swapon --show
[martin@t520 ~]$ 
::1             ff02::2         ip6-allrouters  ip6-loopback    t520            
ff02::1         ip6-allnodes    ip6-localhost   localhost       
[martin@t520 ~]$ free -h
              gesamt       benutzt     frei      gemns.  Puffer/Cache verfĂĽgbar
Speicher:      3,7Gi       2,9Gi       198Mi       348Mi       777Mi       848Mi
Swap:             0B          0B          0B
[martin@t520 ~]$ 

note: running on thinkpad t 520 with 4 gigs. what to do . i t seems that i have no swap at the moment

well dalto: i think i should create a 2 gigs swap - and in the next few weeks i sould add some

ssd drive and more ram

btw: i love the old thinkpad t520 -for its robust design and the undestroyable case , keyboard etc.:grinning_face:

Yes, it is always good to have some swap.

1 Like

https://forum.endeavouros.com/t/zram-vs-swap-partition-vs-swapfile/69627/125

^ you also have choices of zswap, zram, swap file–think about your needs.

I don’t have a laptop so a regular old swap will do me. If you are getting a new SSD than you can make it in the installer. The also a cli tutorial - that’s what i used to create it live on the spot.