Monthly Archives: June 2007

Automatic Shutdown Script

At home I have a powerful Linux computer with plenty of disk space which I use for storing lots of large files such as ISO images and for assisting with source package builds.

However, it is also a rather noisy, power-consuming computer, and because I don’t need it all the time (maybe once every 2 days) I decided to write a script which will monitor it, and shut it down if it’s
not being used.

So my result: a perl script which monitors for logged in users with “who” and for any active samba shares with “smbstatus”.

Download Jethro’s Automatic Shutdown Script

Read the start of the file for installation/configuration information, but it’s pretty simple. It also isn’t too complex, so if you know basic perl you can add support for other checks that may suit you (eg: NFS, CPU usage, etc).

Hope someone else finds this useful… :-)

rdiff-backup future date errors

I recently came across an interesting error when using the rdiff-backup program:

Cannot change mtime of /backupdestdir/somedir/rdiff-backup.tmp.23 to 3937075508
problem is probably64-32bit conversion

Turns out the cause of this error is if the date of the file in question has been modified in the future – in my particular case 2094. :-)

You can change the modification date to the current date by running the command “touch filename”.