31.3 Identifying Current Swap Space Usage
The current amount of swap used by a Fedora 31 system may be identified in a number of ways. One option is to output the /proc/swaps file:
# cat /proc/swaps
Filename Type Size Used Priority
/dev/dm-1 partition 4169724 41484 -2
Alternatively, the swapon command may be used:
# swapon
NAME TYPE SIZE USED PRIO
/dev/dm-1 partition 4G 40.5M -2
To view the amount of swap space relative to the overall available RAM, the free command may be used:
# free
total used free shared buff/cache available
Mem: 4035436 1428276 2224596 21968 382564 2360172
Swap: 4169724 41484 4128240