Archive for 'Administration' Category

Enable/disable core dumps

By jbayer - Last updated: Tuesday, January 10, 2012

While it normally isn’t a good idea to have core dumps enabled on a production server, sometimes that is the only way to debug a problem. There are several things which are needed to be done to enable core dumps on a modern Linux.  The attached script does this automatically for you.  It  has been […]

1,958 views

Skip duplicate entries in a slave with MySql

By jbayer - Last updated: Tuesday, January 10, 2012

While setting up some replication, I got a duplicate key error on the slave. Since I knew it wasn’t a problem, I just wanted to bypass it and continue with the replication. The attached script will do that. Briefly, it checks the slave status and if there is a Duplicate entry error, then it stops […]

651 views

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 http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm Identify the mysql rpms: […]

889 views

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

2,677 views

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

1,154 views

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: flushmemcached.sh [server [port]] server defaults to localhost, and port defaults to 11211 You will be prompt to confirm.  You must type YES in all […]

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

580 views

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

695 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,722 views

Easy remote virt-manager

By jbayer - Last updated: Monday, October 24, 2011

First, some background: We have a number of large hosts which run KVM for virtual machines.  All these machines are remote, as in more than 1000 miles away.  The host systems all run Redhat 5.6.  We access our systems remotely using putty. The problem is in how to run virt-manager remotely, easily.   Solution First, […]

2,894 views
asd