I often use dd to copy large files or make images from hard drives. It's annoying to watch something without any progress indicator, so I use the little known kill switch on dd.

From the man page:

Sending a USR1 signal to a running ‘dd’ process makes it print I/O statistics to standard error and then resume copying.

$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid

We have a watchport/w sensor and I wanted to start monitoring it with zabbix. I did a little googling and the only thing this sensor does is set the DCD line on a usb modem to high when there is water, otherwise it's low (not connected).

I couldn't find anything to test for the carrier easily (cu maybe, but it seems a bit clumsy). I found on the tty_ioctl man page the code to do this in C, so I just modified it and made a little app to check the port.

I wanted to monitor the ambient temperature in my computer room and decided to try using the built in sensors on my servers. ipmitool showed an ambient temperature, so I did some sed to get just the temperature.


[thomas@hotstuff: ~] $ sudo ipmitool sdr type "Temperature" |grep Ambient
Ambient Temp | 08h | ok | 7.1 | 22 degrees C

A talk I gave at PICC 12 on mock

Slides available here

A talk on func, the fedora unified network controller. Ben Rose and I gave this talk at pug-ip (python users group in princeton) at the Princeton Public library on March 12, 2012.

FUNCtional system administration google-doc

FUNCtional system administration pdf

Update: I noticed that the syntax for vacationStart and vacationEnd do not permit integer comparisons. So I changed them from 1.3.6.1.4.1.1466.115.121.1.40 to 1.3.6.1.4.1.1466.115.121.1.15. This change allows you to make a gnarwl search string that uses the current time to check if a vacation is active.

I'm in the process of setting up gnarwl with our 389 (fedora directory server) and needed to import the vacation attributes and objectclass into 389. I only added the attributes I needed for vacation from the included ISP schema file.

This is just a case of RTFM but I thought I'd share...

I'm setting up ingo with dovecot sieve. I first verified that dovecot's sieve server is working properly by using the thunderbird sieve plugin (which is a sort of pointless plugin, you end up having to write in sieve language anyway, i'd expect a nicer gui front end like ingo has).

While playing around with getting host entries to work with ldap, I found that my previous code for using gethostbyname was not running clean on puias6. Here is an updated version


#include
#include
#include
#include
#include
#include

int main(int argc, char **argv) {
int i;
struct hostent *hp;
struct in_addr **addr_list;

if (argc < 2) {
printf("Usage: %s hostname\n", argv[0]);
exit(1);
}

We store our host information in ldap. Previously using ldap for host lookups was done by adding the appropriate entries to /etc/ldap.conf and changing nsswitch.conf.

With 6, nss_ldap has been replaced by nslcd, so I needed to change our setup a little.
I put the following into nslcd.conf