mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-30 05:02:54 +08:00
Add files via upload
This commit is contained in:
parent
e5a1c0afad
commit
66aaf185e6
23
clearcache.sh
Normal file
23
clearcache.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# free up cache RAM
|
||||||
|
# http://linux-mm.org/Drop_Caches
|
||||||
|
|
||||||
|
# uname -a
|
||||||
|
#Darwin davesimac-2.local 15.6.0 Darwin
|
||||||
|
|
||||||
|
[ `uname -a |grep -ci darwin` -gt 0 ] && exit 1;
|
||||||
|
|
||||||
|
sync
|
||||||
|
|
||||||
|
free
|
||||||
|
echo 1 > /proc/sys/vm/drop_caches # free pagecache
|
||||||
|
|
||||||
|
#To free dentries and inodes:
|
||||||
|
[ "$*" = "2" ] && echo 2 > /proc/sys/vm/drop_caches
|
||||||
|
|
||||||
|
#To free pagecache, dentries and inodes:
|
||||||
|
[ "$*" = "3" ] && echo 3 > /proc/sys/vm/drop_caches
|
||||||
|
#echo 3 > /proc/sys/vm/drop_caches
|
||||||
|
|
||||||
|
free
|
Loading…
x
Reference in New Issue
Block a user