HEELPBOOK - Clear SWAP space on a Linux-based system ################## There have been times where it has been necessary for UNIX Admins to clear out the swap space on a Linux system. In order to do this, you must first make sure that you have enough free memory to hold what is being used by swap. First we want to see what is currently being used. free Then I run the actual commands that empty the swap: swapoff -a ...and then: swapon -a Then I check what is being used after doing this. free ########## DESCRIPTION Swapon is used to specify devices on which paging and swapping are to take place. Calls to swapon normally occur in the system multi-user initialization file /etc/rc making all swap devices available, so that the paging and swapping activity is interleaved across several devices and files. -a - All devices marked as "swap" swap devices in /etc/fstab are made available. Devices that are already running as swap are silently skipped. Swapoff disables swapping on the specified devices and files. When the -a flag is given, swapping is disabled on all known swap devices and files (as found in /proc/swaps or/etc/fstab). ############ ARTICLE INFO ############# Article Month: March Article Date: 04/03/2013 Permalink: http://heelpbook.altervista.org/2013/clear-swap-space-on-a-linux-based-system/ Source: http://www.lazysystemadmin.com/2010/10/clear-swap-space-in-linux.html Language: English View more articles on: http://www.heelpbook.net/ Follow us on Facebook: http://it-it.facebook.com/pages/HeelpBook/100790870008832 Follow us on Twitter: https://twitter.com/#!/HeelpBook Follow us on RSS Feed: http://feeds.feedburner.com/Heelpbook Follow us on Delicious: http://delicious.com/heelpbook Linkedin: http://it.linkedin.com/pub/stefano-maggi/27/73a/b20 Google+ : https://plus.google.com/116990277568167008289/posts