Archive for December, 2011

Upgrading Existing CentOS 5 with Percona Server

By jbayer - Last updated: Saturday, December 31, 2011

Percona has fixed a number of bugs and made improvements to MySql.  If you want to upgrade your mysql server to Percona Server, the following steps are necessary to upgrade an existing CentOS 5 server.  Be sure to backup your database BEFORE doing this. Install Percona Yum repository: rpm -Uhv Identify the mysql rpms: […]


Upstart on CentOS 6+ and redir

By jbayer - Last updated: Friday, December 30, 2011

This is a follow-up to the redir posting I made a while ago. I had to install it on a CentOS 6.2 system.  Redhat (and CentOS) are now using upstart instead of the old System V inittab to control jobs.  Without getting into the reasons, while it gives greater flexibility, it is also more complicated. […]


Find large files

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

There is no easy way to find large files on a system.  The attached file contains a command called lsbig, which will do just that.  It also prints out stars and the length of the stars show the usage of each folder / file from smallest to largest on the box. Usage is very simple. […]


Installing Zabbix on a CentOS/RedHat system (Updated)

By jbayer - Last updated: Friday, December 23, 2011

I needed to do several repeated installs of Zabbix, on both a CentOS 5.6 and Centos 6.1 system.  I also noted that Zabbix had been updated, along with a couple of other version changes.  This version also allows you to do upgrades on an existing system.  However, the upgrade has only been tested on installations […]


Flush a memcached server

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

We use memcached a lot here.  Occasionally we need to flush the entire cache, and would prefer not to do a restart. The attached script does just that.  To use it: [server [port]] server defaults to localhost, and port defaults to 11211 You will be prompt to confirm.  You must type YES in all […]


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 […]


Monitor long MySql queries

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

At work we have a very large mysql database, over 250 gig in size, and it is extremely busy.  We need to know when a query is taking too long;  the reason could be a code bug, or just a very long operation.  Regardless, these long queries have the possibility to hang the server. The […]