Created
November 18, 2017 02:02
-
-
Save johnnian/b28115dc3ad79728c4609b966c8859f5 to your computer and use it in GitHub Desktop.
free Linux System Memory in time
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/sh | |
#description: release memory | |
free -m|awk '/^Mem/ {if($4<512) {system("sync&&echo 3 > /proc/sys/vm/drop_caches");}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment