Linux: Finding motherboard model

Just had to locate the name of the motherboard on one of my servers, here comes dmidecode to the rescue! ūüôā

To list all info it can find, simply run dmidecode. I executed the following command to find my motherboard model:

thu@dom0:~$ sudo dmidecode|grep "Product Name: "
Product Name: P5Q-E   
Product Name: P5Q-E  

MRTG: ERROR: CFG Error in “Interval”: should be at least 5 Minutes (unless you use rrdtool)

Just setup MRTG the other day. And due to having some old switches to monitor, i chose to run the MRTG cron every minute, in order to be able to read traffic above 100Mbit. But even when i had specified rrdtool in the server config, i got these error messages:

ERROR: CFG Error in "Interval": should be at least 5 Minutes 
(unless you use rrdtool) at /usr/bin/../lib64/mrtg2/MRTG_<wbr> line 739 </wbr>

The solution was pretty simple. Simply add the following line in mrtg.cfg:

Logformat: rrdtool
Interval: 1

Installing NRPE on Red hat 6

Red Hat 6 does not¬†natively¬†support NRPE/Nagios with the default package manager. Luckily,¬†DAG¬†can save the day again, just as with Red Hat 5 ūüôā

Simply add the mirror spesified in the link above to your server and you get the ability to add the NRPE or other Nagios packages without too much hazzle.

In my case with a 64bit system, the way to get NRPE installed was as simple as this:

rpm -Uhv

yum install nagios-nrpe

WhatPulse: Your savefile seems to be corrupt, please reset your local settings.

Whatpulse tends to go corrupt sometimes and simply give the error message “Your savefile seems to be corrupt, please reset your local settings.”. It appears that something breaks the stored data WhatPulse generates sometimes. The solution is to log out and then log in again.

This causes numbers saved since last pulse to be lost, so remember to set up auto pulsing as often as possible ūüėČ

Windows is unable to install to the selected location. Error 0x80300001

After installing drivers during a Windows-installation you might get this error message when you select a drive to install it on “windows is unable to install to the selected location. Error 0x80300001”

This is another (strange) way for Windows to say that you have not inserted the Windows CD/DVD again. Put it back in again, wait a second and then the error message should disappear. (If it does not, try to hit refresh after putting the CD in)

Yum on Red Hat 5 hangs when using proxy

I had a machine that started hanging when running yum update on it. And the only way to actually stop yum then was to kill the process from another shell, pretty strange.

I noticed that it was trying to look up and old proxy server which was not in use anymore, the machine itself got online without issues on other services but then i realised that the file “/etc/sysconfig/rhn/up2date” had a entry for yum proxy settings.

It is also worth checking all files in your “/etc/yum” folder and make sure that none of your repo files have dedicated proxy settings defined since that will override anything from up2date.

When commenting out that proxy setting, yum started behaving again.

Wrong charset for cron

I got a issue on a export job i had that was running daily on which the charset of the data exported wer wrong, and this did not happen when i ran the job manually. I noticed that Cron used the charset “POSIX” instead of en_US.UTF-8 which i used. I fixed this by adding “LANG=en_US.UTF-8” to the file¬†/etc/default/locale.

It appears that when the LANG variable is not set in that file, Cron will fall back to using the POSIX charset.

The effects of old NIC drivers on Data Protector

During the Data Protector migration we noticed that the performance on the new Data Protector Cell Manager was a lot lower than the performance on the old solution. Speeds of around 100Mbit was the best we ever could get from it, although the machine is running on a gigabit network.

To make the case even more strange, performance on other network tasks was quite normal where the gigabit  connection was maxed ASAP.

After some digging, the problem turned out to be that the server was running the old default drivers for the NIC (Broadcom BCM5708S netXtreme II GigE). Windows update has in the latest Windows versions become better on delivering driver updates but that was not the case this time.

After installing the newest drivers from Broadcom`s website the performance jumped straight to gigabit even on Data Protector.

Dataprotector: System error: HOST_NOT_FOUND

I have been working a bit with migrating a Data Protector cell manager, when moving a client i recieved the following error:

[Critical] From: BDA-NET@ " [/boot]"  Time: 02.09.2011 09:08:03
Cannot connect to Media Agent on system , port 49708 (IPC Invalid Hostname or IP Address
System error: HOST_NOT_FOUND) =>

The cause for this was that the client could not look up the cell manager. I solved this by simply adding the cell manager in the hosts file of the client. You can verify this problem by simply doing a ping or nslookup against the cell manager, from the client itself.

Expanding a kVM disk image

Had to expand a KVM virtual machine today. Luckily, that`s pretty straight forward. You simply create a new disk image with the extra size needed, merge it into the original disk and voila. Then you just need to partition in the extra space and you are good to go.


1: Halt your virtual machine.

You need to stop your virtual machine before going wild with the drive. Virsh stop <vm name>, or virsh destroy <vm name> if it somehow wont stop.

2: Create a disk with the extra space needed:

qemu-img create -f raw 5gig.img 5G

3: Merge it into the disk you are working with

cat 5gig.img >> yourdisk.img

4: Boot up and and partition your drive.

Then start up your virtual machine again with virsh start <vm name>. If you use Windows server, all you need to do is to visit disk managent, right click your drive with little free space and choose “extend partition”. The job takes seconds and does not require any reboot.