Created
November 1, 2016 08:37
-
-
Save himinseop/dba69d31171f4e853cc38835dec8adbc to your computer and use it in GitHub Desktop.
swap memory manage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # check memory size | |
| free | |
| # make space 1GB | |
| dd if=/dev/zero of=/var/swapfile bs=1024 count=1000000 | |
| # make swap file format | |
| mkswap /var/swapfile | |
| # activate | |
| swapon /var/swapfile | |
| # include init | |
| echo 'swapon /var/swapfile' >> /etc/rc.d/rc.local | |
| ########## ---- | |
| # remove | |
| #swapoff /var/swapfile | |
| #rm /var/swapfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment