Pages - Menu

Monday, May 25, 2009

how to monitor dmesg in real time

I was looking around for a way of monitoring dmesg output in realtime.

Some distros allow you to
tail -f /var/log/dmesg
however this file stops being written in Ubuntu after boot, so that's not so useful.

I then found the watch command, which executes a command every 2 seconds (configurable if you like). Just watching dmesg fills my terminal output from the start, which is less than useful, so I use tail to shrink it down a bit. The command:
watch "dmesg | tail -20"
does exactly what I was after.

Monday, February 2, 2009

hard drive temperature monitoring

After having a disk recently die due to heat, I bought an Antec P182 case, designed to keep drives cooler. (FYI: it works really well)

I was interested in monitoring my drive temperatures to see how it goes, and found the hddtemp package can do this. A sudo apt-get install hddtemp will install it for you. Say "Yes" to running the daemon on startup.

To get a list of your drives and where they're mounted, you can use the sudo fdisk -l command, along with df -h and mount to see where partitions end up on the filesystem.

To view the temperature of your drives:
sudo hddtemp /dev/sda
/dev/sda: WDC WD800JD-60LSA5: 40°C

hddtemp sensors also have a wrapper into conky, a lightweight system monitoring display program, with the option ${hddtemp /dev/sda}

General forum consensus seems to be as long as your drives are under 50C, you're fine. 50C-60C is a warning area, and over 60C you're cooking your drives and reducing their lifespan by over half!

Sunday, February 1, 2009

new kernel not appearing in menu.lst

I updated to the latest Intrepid kernel, and when debconf asked if I wished to upgrade my menu.lst, I accidentally answered "Keep Current Version" instead of "Install Package Maintainer's Version", so the entry for the old kernel didn't appear in the boot list.

A sudo update-grub wouldn't fix it, though I found an open Launchpad Bug, in which it's suggested to rename your menu.lst, and update-grub again.

sudo mv /boot/grub/menu.lst /boot/grub/menu.old
sudo update-grub
and I'm back in business!

This does however mean I have to setup custom entries I had before, such as my no splash, my vga parameter, and the chainloader into the Windows partition.