Pages - Menu

Showing posts with label monitoring. Show all posts
Showing posts with label monitoring. Show all posts

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!