Something is writing over my swap for no reason at all and I don't know what it is. But anyway, I have this script which do a marvelous job in freing the swap. Should be run by su of course
#!/bin/bash
sync ; echo 3 > /proc/sys/vm/drop_caches
sleep 30s
sync ; echo 2 > /proc/sys/vm/drop_caches
sleep 30s
sync ; echo 1 > /proc/sys/vm/drop_caches
sleep 30s
sync ; echo 0 > /proc/sys/vm/drop_caches
swapoff -a
swapon -a
#!/bin/bash
sync ; echo 3 > /proc/sys/vm/drop_caches
sleep 30s
sync ; echo 2 > /proc/sys/vm/drop_caches
sleep 30s
sync ; echo 1 > /proc/sys/vm/drop_caches
sleep 30s
sync ; echo 0 > /proc/sys/vm/drop_caches
swapoff -a
swapon -a
Няма коментари:
Публикуване на коментар