Archive for July, 2007

Collecting Usage Statistics

Thursday, July 19th, 2007

One of many goals I have is to be able to collect usage statistics for Linux machines at the university. I want to see the utilization of a computer lab over time and calculate the amount of usage of a group of computers. Which means I need to find out how long each login session on each computer lasts and eventually get that into a graph of the computers I’m interested in. Sounds easy.

However, its rather hard to find other bits of code on the internet of people collecting usage statistics from a group of Linux machines. I had to write a PAM module not long ago and it was easy to use the session functionality to make a report for each login of how long that session lasted and send that to the XMLRPC interface that collects all this mess. It works, but why was adding this functionality into a PAM module the easiest thing to do? Isn’t there an easy way to lift this information from the system with a bit of Python?

I’ve been looking at wtmp. It stores the data I want but its horrible to work with. I either need yet more C code to work with a bad API or a C Python module to still work with a bad API and grok wtmp’s strangeness. I could screen scrape the “last” command, but that’s really prone to error with the way it represents dates.

How do other folks mine this kind of data?

More T61 Goodness

Wednesday, July 4th, 2007

I have built patched modules to drive the Intel 4965 wireless card in the ThinkPad T61. A lesser version of the same code is available in later Fedora 7 kernels but the PCI ID is different for the card in the T61. I’ve build Fedora Kmod packages that build the iwl4965 module from the iwlwifi-0.0.32 package. Its not the neatest package I’ve build, but it works.

Also, there is a small bug in the new Inte 945GM video driver where the driver is attempting to scale the image even though the LCD panel is running at its native resolution. This produces an image that doesn’t appear “crisp” or appears out of focus. So here are some rebuild xorg-x11-drv-i810 packages with the proper patch. I found this out from the following post: http://www.spinics.net/lists/xorg/msg25117.html

The packages are here: http://linuxczar.net/code/t61