I wanted a simple script to show me the memory usage on my CentOS 6 server so we could monitor peak traffic and usages.
This is easily configured but very useful. Just call the script using cron and make sure it is executable! I call it every hour and overwrite it every week, simple and useful.
memt=$(free -m /proc/meminfo)
curt=$(date +%a" "%b" "%d" "%Y" "%T)
echo ":: Memory Usage at $curt:
Make sure your script is executable and probably put it in your path.
Make the script executable.
$ chomd +x /usr/local/bin/freemem.sh
Feel free to share any improvements of your own.