Home > Casper, JSS, Linux, Scripting > Status report script for Linux-hosted Casper servers

Status report script for Linux-hosted Casper servers

As part of keeping an eye on my support systems, I’ve been using a script for my Casper servers running on Linux which emails me a status report on a daily basis. I adapted this script from an earlier one I wrote to monitor Tomcat and alert me if Tomcat was having issues. The script tells me a number of things that are useful to know, including the following:

  • Uptime
  • Free space on all attached drives
  • Who’s logged in via SSH or in the console
  • Virtual memory statistics
  • Current system tasks
  • SMB connections information
  • Recent entries in the Apache server logs
  • Recent entries in the JSS server log

In my case, my Casper servers are hosted on Red Hat Enterprise Linux so I’ve focused this script’s development and testing on compatibility with RHEL-based Linux distributions. That said, nothing in it is RHEL-specific so it should also work on other Linux distributions. For more information, see below the jump.


This script has been tested on the following Linux distributions:

  • Red Hat Enterprise Linux 6.x
  • CentOS 6.x

Script location:

The scripts are stored in /scripts on both my Casper production and Casper test servers. I created this directory, you can use whatever directory you prefer.


The following entry has been added to the root crontab in order to send a daily report at 10:00 PM

0 22 * * * /scripts/casper_server_report.sh 2>&1 >> /dev/null

Permissions for the scripts:

Change permissions on casper_server_report.sh to match the following:

Owner – root (r/w/x)
Group – wheel (r/x)
Everyone (r/x)

The script is available below. It is also available on GitHub at the following address:


Categories: Casper, JSS, Linux, Scripting
  1. bofh
    December 15, 2015 at 11:42 am

    Did you consider using a monitoring tool like check_mk/omd/munin for doing those things?
    Just wondering why you are using this instead of those toolsets.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: