Bash and Expect Snippets
A small collection of maybe helpful examples of how to use expect with Bash. This is a very useful tool, especially when writing a...
Taking Linux Temperature
Just some notes on setting up temperature monitoring and alerting on CentOS/RHEL running on HP ProLiant. The first step is to install lm_sensors: yum -y...
Find + Rsync + Xargs
Just some quick syntax for running multiple rsync threads in parallel using find and xargs. In many cases (especially if NFS is involved) this can...
Show NIC Bandwidth Utilization
Just a quick script that will measure bandwidth utilization in KB/s for all NICs on your server over the specified period of time. You can...
Diff on Output of Remote Commands
Let's say you run the same command on two remote servers and you want to compare the output. Here's a quick example: diff <(ssh -qtT...
Run Cron Jobs at Arbitrary Intervals
Current versions of cron support sophisticated syntax making creating weird schedules a breeze. With older versions of cron you normally had to schedule multiple...
Monitoring Application Network Connections
A Java application on one of my servers has been causing problems by opening up too many network connections and not closing them quickly...
Finding Strings in Outlook PST Files
In this scenario, a user emailed some other user something that probably should not have been emailed. You don't know who the users are...
Extracting Email Addresses from TCP Streams
Here's a quick example of using tshark to extract email addresses from TCP streams. Let's say some application on your server is sending emails and...