How do you empty you swap memory on Redhat or Fedora Linux
If you want to clear out your swap you can use the following commands.
#free
total used free shared buff/cache available
Mem: 16266516 5208028 8793132 96412 2265356 10509976
Swap: 8269820 10000 8259820
Then we use this command to disable swap:
total used free shared buff/cache available
Mem: 16266516 5208028 8793132 96412 2265356 10509976
Swap: 8269820 0 8269820
we re-enable our swap:
#free
total used free shared buff/cache available
Mem: 16266516 5208028 8793132 96412 2265356 10509976
Swap: 8269820 10000 8259820
Then we use this command to disable swap:
$ swapoff -a
You can confirm that it's now empty:
#freetotal used free shared buff/cache available
Mem: 16266516 5208028 8793132 96412 2265356 10509976
Swap: 8269820 0 8269820
we re-enable our swap:
#swapon -a
Comments
Post a Comment