[ale] Ale Digest, Vol 36, Issue 60

Matthew simontek at gmail.com
Tue Jan 18 02:25:03 EST 2011


I noticed someone mentioning insane amounts of ram, and swap space. I worked
on a server that had 16GB ram, and 32GB of swap, and noticed it crashed
randomly every few weeks. Figured out the issue.
Linux, can build up a cache. Nothing like looking at a box and seeing 90%
full and going damn. So I came up with a *stupid* script I run as a cron
job, and I enjoy looking at how much is cached, and how much it clears it
out.

Clear Cache from a linux box.
Works only with Kernels 2.6.16 or newer

sync; echo 3 > /proc/sys/vm/drop_caches


Quick Script I use for the machine and cron jobs

Named: clean.sh
#!/bin/bash

###
### Shell script to clean the cache on the machine, it also lists current
memory usage, and
### afterwards its cleared so I can compare.
###
### SimonTek April 16th, 2009
###
free -m
sync; echo 3 > /proc/sys/vm/drop_caches
free -m
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20110118/3f8207ba/attachment.html 


More information about the Ale mailing list