Archive

Archive for the ‘Linux’ Category

Ubuntu 9.10 Karmic Koala: Temperature above threshold, cpu clock throttled

November 13th, 2009 Nick 4 comments

I recently upgraded my Ubuntu install to the latest Karmic Koala, and to be honest I’ve not been totally impressed.   A range of little bugs that had been fixed before seem to have reappeared – just little things such as problems with icons in Gnome panel, nothing I couldn’t live with.

However, yesterday I got a message saying that there was less than 2GB left on my hard drive.   The last time I checked I had over 20GB free, so where did it all go?   After a bit of investigating I found two giant 10GB kernel log files /var/log/kern.log.

It seemed that the computer was constantly logging the same messages:

CPU0: Temperature above threshold, cpu clock throttled (total events = 208[ 8973.550089] CPU0: Temperature/speed normal

CPU0: Temperat cpu clock throttled (total events = 2080190)

I had a look on Google and it turns out that it is a bug with the new Karmic Koala update:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/453444

So far there’s no patch for it, so the best solution I came up with was just to turn off the logging.

Step 1:
Look in /etc/rsyslog.conf and it will either have the configuration for system logging, or in the case of my machine it points to include all files in /etc/rsyslog.d/   In my case there was only one file in here so it made things simpler.

Step 2:
Open the configuration file in an editor and find the line which specifies kernel logging and comment it, something like:

#kern.*                         -/var/log/kern.log

Step 3:
Now restart the system log daemon:   sudo restart rsyslog

It is the logging which hogs the processor so by turning it off the problem is at least not noticeable.

Logging and monitoring server load

September 1st, 2009 Nick No comments

We decided it would be a good idea to be able to periodically log server load so we can identify potential problems So I wrote a little script that outputs the current server load along with a timestamp in CSV format which can easily be called via CRON and send the output to a log file which can then be imported into a spreadsheet.

getload.c

Just compile it and run it. The output should be something like:

"1251834476","0.21"

It turns out that Nagios logs server load anyway, but not quite as accurately as this.

Categories: Linux Tags: , , , , , , ,

rsync – non recursive copying

August 11th, 2009 Nick No comments

I was looking for a way to get rsync to copy all the files in a particular directory and not recurse into the sub-directories.   Unfortunately I couldn’t find an appropriate parameter and a quick search on Google turned up nothing (apart from a lot of other people asking the same question!)

So as a last resort I decided to use my brain, and I came up with a simple solution that works.   It’s of the form:

rsync -avc --exclude "*/" ./source/* ./destination/

The above will copy all the files from the directory called “source” into the directory “destination” and will not recurse into any subdirectories of “source”.