Archive for 'Programming' Category

Perl script to add/remove Maintenance

By jbayer - Last updated: Tuesday, May 1, 2012

I found a perl script to add/remove a single host to maintenance in Zabbix.  I needed more, the ability to add multiple hosts to a single maintenance, as well as an entire group. The script I started with can be found at: http://www.zabbix.org/wiki/Perl_script_to_add/remove_Maintenance The attached file is my modified version.  The changes I made are: […]

1,066 views

Scripts and cron

By jbayer - Last updated: Tuesday, December 13, 2011

Today I’m going to talk about three things;  two fairly common, and the third not so common.  Two are solved with the same script, while the third is a separate include. The problems addressed are the following: Making sure that only one copy of a script can be active at a time Limiting the run […]

593 views

Monitoring ping times to a server with Zabbix

By jbayer - Last updated: Tuesday, November 15, 2011

We needed to monitor ping times from one server to another, neither being the Zabbix server.  Zabbix doesn’t have a way to do this; the only pings that Zabbix can do are from the Zabbix server to another server. I wrote the attached script to solve this problem.  Install the script onto each client that […]

3,848 views

Setting up a private RPM repo

By jbayer - Last updated: Tuesday, August 9, 2011

I had a local need for a private repo, for some of our locally-built RPMS. Since I’ve previously set up a private mirror, I decided to write a script which would both setup the directory structure I needed, and to do whatever rsyncing would be needed for a mirror. To install, just copy it into […]

1,006 views

Software Distribution & Syncronization

By jbayer - Last updated: Monday, February 28, 2011

I recently had to update about 30 different servers with the identical software.  This is an all-too-common occurance for an administrator, and there are many different systems available to do this.  However, most of them do too much and are generally non-trivial to set up and manage.  I wanted a system which would be easy […]

584 views

Using “configure” to build a 32 bit executable on a 64 bit System

By jbayer - Last updated: Thursday, February 10, 2011

If you are on a 64 bit Linux system, and need to build a 32 bit executable (for example if you need to install it on  another, 32 bit, system), you can build it by passing the following argument to the  configure script: ./configure –build=i686-pc-linux-gnu “CFLAGS=-m32” “CXXFLAGS=-m32” “LDFLAGS=-m32”

2,226 views

Running “configure” on a 64 bit system returns missing library errors

By jbayer - Last updated: Thursday, February 10, 2011

Sometimes when building an open-source package using the “configure” script, you will get errors about missing libraries, even though you know the libraries are actually installed.  This usually happens on a 64 bit system. Assuming that the libraries are actually installed, and the pkg-config program is installed and working then what is happening is that […]

626 views

Delay a script by variable time

By jbayer - Last updated: Monday, January 31, 2011

When managing many systems in a server farm or a virtual environment, quite often the same script needs to be run on all the systems.  However, if the script happens to put a severe load on a common resource such as a storage device, the possibility exists that the storage device can be overwhelmed and […]

840 views

Linux-based Security Camera Solution

By jbayer - Last updated: Monday, January 31, 2011

With the explosion of inexpensive video cameras for computer use, (both USB and IP cameras), it has become fairly easy to set up a comprehensive video surveillance system.  You can go out and buy complete kits, which include a set of cameras and a central control station.  Or, you could roll your own, giving you […]

2,089 views

Start, stop, and restart Virtual Machine from the command line

By jbayer - Last updated: Monday, January 31, 2011

These days virtual machines are all the rage.  They make sense in a lot of areas, and can reduce both the floorspace, power requirements, costs, testing, stability, etc.  This article is not about the reasons to have a virtual machine, but rather, how to control them from a command line. Most Linux distributions use libvirt […]

7,298 views
asd