Archive
Posts from 2011
Dealing with xauth error in locking authority file errors
I recently logged into one of my servers and received the following error: I haven't seen this one before, but based on previous "locking issues" I've encountered in the past I ran strace against xauth to see if an old lock file existed: In the output I saw the following which confirmed my suspicion: A quick check with ls revealed the same thing: I removed both of the lock files and haven't seen the error again. Thought I would pass this on in case someone else encountered this issue.
$ read more →Displaying CPU temperatures on Linux hosts
Intel and AMD keep coming out with bigger and faster CPUs. Each time I upgrade (I'm currently eyeing one of these) to a newer CPU it seems like the heat sinks and cooling fans have tripled in size (I ran across this first hand when I purchased a Zalman CPU cooler last year). If you use Linux and a relatively recent motherboard, there should be a set of sensors on the motherboard that you can retrieve the current temperatures from. To access these sensors you will first need to install the lm_sensors package: Once the software is installed and configured for your hardware you can run the sensors tool to display the current temperatures: This is useful information, especially if you are encountering unexplained reboots…
$ read more →Recovering the MBR from a Windows machine
I was chatting with a friend the other day about recovering the MBR on one of my Windows systems. He is a seasoned admin and recommended the following: Boot from the Windows XP CD (the UBC may also work) and select the recovery console. Once the recovery console comes up you can run fixmbr to fix up the master boot record. Reboot…
$ read more →Fun times with the bash read function and subshells
There are a few shellisms that have bitten me over the years. One issue that has bitten me more than once is the interation of variable assignments when a pipe is used to pass data to a subshell. This annoyance can be easily illustrated with an example: On first glance you would think that the echo statement would display the total amount of memory in the system. But alas, it produces nothing…
$ read more →Getting the number of bytes read and written by your Linux NFS kernel threads (nfsd)
Linux NFS server implementations export a number of statistics through the /proc file system. The nfsstat utility can parse this file and display various performance counters, and the data that is displayed comes from the /proc/net/rpc/nfsd proc entry: So what do these values mean? To figure this out we can surf over to fs/nfsd/stats.c in the kernel source: and then read through the nfsstat manual pages. While debugging an NFS issue a few weeks back I noticed that nfsstat doesn't have an option to print the number of bytes read and written (there is an io line in the output above, but for some reason nfsstat doesn't process it)…
$ read more →