Created
September 12, 2018 08:18
-
-
Save vdakalov/30e557d663ebed26749acb96c84d5bfb to your computer and use it in GitHub Desktop.
Flush linux memory and swop
This file contains 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
#!/bin/bash | |
# Flush the file system buffer | |
sync | |
# Clear PageCache, dentries and inodes | |
echo 3 > /proc/sys/vm/drop_caches | |
# Restart swap | |
swapoff -av && swapon -av |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment