Showing 1 changed files with 1 additions and 1 deletions
+1 -1
monitoring.d/cloud
... ...
@@ -27,6 +27,7 @@ function core_alim () {
27 27
 
28 28
 function clean_swap () {
29 29
     _turn 2 || return
30
+    echo 1 > /proc/sys/vm/drop_caches
30 31
     if free -m | awk '
31 32
         /^Swap:/ {
32 33
             used = $3
... ...
@@ -35,7 +36,6 @@ function clean_swap () {
35 36
             exit (used > 31)
36 37
         }
37 38
     '; then
38
-        echo 1 > /proc/sys/vm/drop_caches
39 39
         systemctl stop dphys-swapfile \
40 40
         && systemctl stop zram        \
41 41
         && systemctl start zram       \