- root@snic10e:/tmp# while true; do
- > echo "dnsmasq restart"
- > service dnsmasq restart
- > sleep 1
- > echo "before cache drop:"
- > free
- > sleep 1
- > echo 3 > /proc/sys/vm/drop_caches
- > sleep 1
- > echo "after cache drop:"
- > free
- > sleep 1
- > done
- dnsmasq restart
- before cache drop:
- total used free shared buff/cache available
- Mem: 1991508 87948 1883424 17488 20136 1860172
- Swap: 0 0 0
- [ 4129.167679] ash (634): drop_caches: 3
- after cache drop:
- total used free shared buff/cache available
- Mem: 1991508 88004 1883368 17488 20136 1860116
- Swap: 0 0 0
- dnsmasq restart
- before cache drop:
- total used free shared buff/cache available
- Mem: 1991508 88344 1882980 17488 20184 1859752
- Swap: 0 0 0
- [ 4133.589184] ash (634): drop_caches: 3
- after cache drop:
- total used free shared buff/cache available
- Mem: 1991508 88360 1882964 17488 20184 1859736
- Swap: 0 0 0
- dnsmasq restart
- before cache drop:
- total used free shared buff/cache available
- Mem: 1991508 89720 1881604 17488 20184 1858376
- Swap: 0 0 0
- [ 4138.010682] ash (634): drop_caches: 3
- after cache drop:
- total used free shared buff/cache available
- Mem: 1991508 89576 1881748 17488 20184 1858520
- Swap: 0 0 0
- dnsmasq restart
- before cache drop:
- total used free shared buff/cache available
- Mem: 1991508 89868 1881468 17480 20172 1858240
- Swap: 0 0 0
- [ 4142.434119] ash (634): drop_caches: 3
- after cache drop:
- total used free shared buff/cache available
- Mem: 1991508 89840 1881488 17488 20180 1858260
- Swap: 0 0 0
- dnsmasq restart
- ^C
- root@snic10e:/tmp#