USB controled ON-OFF plug

When you have your own 24/7 server, it would be a pitty not to consider saving power as much as possible..

when it become so simple with today’s equipments !

I am thinking to controled power supply with nice and affordable USB controled plug like this one

Of course home appliance with x25, zwave or other RF based control could be choosed, but I did prefered wired solution this time.

http://www.aviosys.com/8800.html

I did purchase mine at:

http://mafianumerique.com/product_info.php?products_id=1800&language=fr

 

Linux control utility and links:

http://code.google.com/p/usbnetpower8800/source/checkout

http://www.libusb.org/wiki/libusb-1.0

https://github.com/walac/pyusb

Test under ubuntu 10.04 TLS

$ sudo apt-get remove python-usb
$ wget http://sourceforge.net/projects/pyusb/files/PyUSB%201.0/1.0.0-alpha-2/pyusb-1.0.0a2.tar.gz
$ tar xvf pyusb-1.0.0a2.tar.gz
$ cd pyusb-1.0.0a2.tar.gz
$ sudo python setup.py install

$ sudo python ./usbnetpower8800.py on

Windows control utility and links :

Libusb is required from above link

http://www.craftedge.com/products/libusb.html

Then python script from code google will do the job

http://code.google.com/p/usbnetpower8800/source/checkout

C:\Python27\python.exe c:\usbnetpower\usbnetpower8800.py on

 

 

Directory md5 integrity check, and dummy remote backup principles

It might be frequent that for different needs, you want to verify the integrity of your data within a directory..

In the same way when you create or collect important data, that you don’t want to loose it (frequent attachment pathology of human being :) ).

 

I found this recursive md5 utility, file by file, in *command line* very usefull. Here also my example is base on exf windows program

because I used it with automation tool xstarter.

So.. exf do the job:

exf.exe -otf  c:\temp\md5_result.txt -r -d “c:\mydatadir” *.*

Then you get a digest file with all by file md5 fingerprints.

Hum..suddenly you want to compare if any changes  have been done to you previous copy of this archive of

if any file did change so what you need is to compare to this digest file list to the previously saved one.

c:\temp\md5_result.txt  can be simply compare with any tools but there is a small issue: 3 lines are updated with a time stamp that you can remove by using a command line tool like .. sed :

sed.exe –in-place 3d “c:\temp\md5_result.txt”

 

Now we can consider a very simple remote file synchronisation system based on fingerprints comparison.

Wait !! I know , I know, very good tools does exist to do remote data backup synchronisation, like the great rsync.

I want just to expose this simple mechanism, because it will work on a basic setup of server having a FTP tool where

the backup process acts completely passively on the remote server.

The advantage is that it is really widespread tools and setup.

Next time I will exposes test results of rsync usage :)

sed for windows

exf command line

My quick repack of required tools