Collection of Linux Scripts
April 21, 2011 by Fernando Duran
I end up repeating many Linux commands and scripts over, so I figure other people may find them useful, I'm putting them in my Pastebin.
For monitoring and statistics there's an entry for Munin and another one for Monit, as well as a little script for getting an email alert if we are running out of disk space.
If there's no mail server running and you don't want to set it up to listen on public port but you just want it for sending out the alerts to you then you can just set up Postfix to listen to the local interface.
There's also a general server utilization script that can be piped to a log file every x minutes with cron as a poor's man (or customized lightweight) monitoring solution.
For security I have a tip for how to protect critical directories from changes (this is not for everybody), checking file integrity with Tripwire (to warn about intrusions or to do forensics), checking for rootkits and quick encryption of files
I'll be adding also notes for applications I use, like this one for mod_pagespeed