Archive for 'Programming' Category

Modifying Windows Multimedia keyboard volume keys

By jbayer - Last updated: Thursday, May 29, 2014

I recently got a new keyboard, and wanted to use the volume keys.  They worked, but only changed the volume by 2% for each keystroke;  I determined that by setting the volume to 0 and then counting how may keystrokes it took to get to full volume. While Windows recognizes the volume keys, after extensive […]


Starting & stopping CF-Engine

By jbayer - Last updated: Wednesday, January 15, 2014

We are slowly implementing CF-Engine 3 in our environment.  Inevitably, there are occasionally problems on specific systems.  Sometimes we need to disable CF-Engine while debugging since the files that are being worked on are maintained by CF-Engine and would be overwritten during the debugging process. We also put a line in to /etc/cron.d/cfengine to restart […]


Find big files

By jbayer - Last updated: Wednesday, October 2, 2013

Someone is using a lot of space, and you want to find out who.  More specifically, you would like to identify the large files and automatically send them an email about it. This script will do that for you.  It’s called findbig, and can be called by hand or from a cron job.  It will […]


Detecting hardware virtualization in Linux

By jbayer - Last updated: Friday, May 10, 2013

For historical reasons, most systems which ship have the virtualization flag turned off.  If you aren’t expecting this, and try to install KVM in a Linux system, you can get unusual errors which don’t necessarily indicate the problem. This script performs a few simple tests to see if virtualization is active or not.  I can’t […]


Bacula & WeBacula Installation Script

By jbayer - Last updated: Thursday, April 25, 2013

Note:  The script was updated on 5/17/2013 due to a typo. We recently had an issue where we lost 3 drives in a RAID 5 array, causing the entire system to be lost.  Unfortunately, some data was lost due to the hosting service’s backups  not being complete. As a result of this, we decided to […]


Zabbix install script updated to v1.9

By jbayer - Last updated: Sunday, October 14, 2012

Here is the latest update to my zabbix installation script.  It defaults to Zabbix 2.0.1, but it checks to see what the latest version is and gives you the option to install it, along with everything else necessary. I noticed that when doing an upgrade, that the config files aren’t always updated properly.  In some […]


Monitoring Memcached servers

By jbayer - Last updated: Wednesday, August 15, 2012

If you are using memcached, you may want to know if it is running or not, and if it isn’t, to get it started. The attached script will do that.  Run it as on the server which is running the memcached instance(s), as root, from cron, once a minute, and it will check. In our […]


Count files in all subdirectories, by directory

By jbayer - Last updated: Friday, June 22, 2012

This is a quickie. I had a need to see how many files were in each directory (not including files in directories underneath) This little script will do just that, and save the output in a file called “b.csv” (I was lazy).  The file will be formatted as a comma separated csv, which you can load into […]


Zabbix 2.0.0 Install Script

By jbayer - Last updated: Friday, May 25, 2012

So Zabbix 2.0.0 was recently released.  It has a lot of improvements, and I’ve updated my script to install the new version. Download onto a bare-bones CentOS, Scientific Linux or RHEL install and run it. The script is also now capable of building and installing the Zabbix Proxy.  One thing, the proxy requires a database, […]


How to email the output of a cronjob to different addresses

By jbayer - Last updated: Thursday, May 10, 2012

Cron is a wonderful tool on a Linux/Unix box.  Normally, when a job runs and some output is generated, it is emailed to the owner of the job.  You can alter this by added the following line to the crontab file: However, if you have a number of jobs which are run by a […]