Wireless Mesh Network Rollout Complete

Posted by & filed under Projects, RADIUS, WiFi.

I finished configuring the routers yesterday. I exported the config for future use. The multi-location setup is as follows:

-Three Physical Sites.
-Intra-site VPN links
-Site 1 — Three Wireless Base Stations (Each with 4 radios conected)
-Site 2 — Two Wireless Base Stations (Each with 4 radios conected)
-Site 3 — Two Wireless Base Stations (Each with 4 radios conected)
-WPA2 Enterprise Authentication

It works well… During a continuous pingtest as I walked through the facility, I found the latency will jump up from ~3ms to ~100ms for one ping packet (I assume as the wireless card transitions to the next radio). The only place any packets were dropped was by the front nurses station, and it was just one or two packets and it began transmitting again.

Very Cool!

Monitoring a Linux process by PID and sending a e-mail notification upon failure

Posted by & filed under BASH, Email, Linux, Programming.

One of my clients needs their vendor to be alerted when their Backup Exec service crashes. I wrote the following quick-n-dirty batch script intended to be ran as a cron job.

# Process Monitor
# Send e-mail alerts when service goes down
# -------------------------------------------------------------------------
# Author: Nathan Riley
# -------------------------------------------------------------------------
SUBJECT="Backup Exec Agent Failure"

#path to pgrep command

# Daemon name,

# find daemon pid

if [ $? -ne 0 ] # if daemon not running
# Generate email message body
echo "This is servername at location. The Backup Exec service is no longer running." > $EMAILMESSAGE
# send email alert
/usr/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE

And the cron line would be something like this:

*/5 * * * * root /root/restart.sh  >/dev/null 2>&1