Just put a current transformer on the incoming cable and connect it to the line in of your computer with a small resistor across it to convert the signal into a voltage. Connect another current transformer to a meter so that you can calibrate the card.
Run an oscilloscope application so that you can check to make sure that you aren't overdriving the input, adjust the value of the resistor down if necessary.
Now you need a simple program to periodically sample and calculate the rms current. Save the samples to a log file. I do this using an Efergy wireless monitor that came with three current transformers but since I only have a single phase supply I only needed one so I used one of the spares and a program written in VB6 on an old Win98SE machine to monitor the current.
To get good accuracy you will need to do some careful calibration but it seems to be pretty stable. Actually the newer Efergy monitors come with a computer hardware interface of some kind and software.
if you want to do this in *nix there are plenty of programs and libraries for reading from the sound card and then you can use all sorts of techniques including shell scripting to analyse the results, sound alarms, etc.
Why not? It's just a simple clip on transformer, similar in design to a clamp on AC ammeter. It is designed for it and legally sold in UK and Norway at least. The current transformer is encased in insulating plastic, it does not make an electrical connection to any wiring only an electromagnetic one.
This is what I have http://efergy.com/eu/products/electricity-monitors/elitev1-m... bought from http://www.clasohlson.com/no although Clas Ohlson no longer sell exactly this model.
If you can borrow a clip on ammeter from an electrician you can compare the them. You can also just integrate the readings over a day and then compare that to the electricity meter. The Efergy display units also do this using a running average. This of course assumes that you have a reasonably stable voltage. In most countries this should not be a problem. The Efergy meters measure current and multiply by the voltage you set to get the power, and the sound card solution will need to do the same, while the electricity meter measures power directly.
To get good accuracy you will need to do some careful calibration but it seems to be pretty stable. Actually the newer Efergy monitors come with a computer hardware interface of some kind and software. if you want to do this in *nix there are plenty of programs and libraries for reading from the sound card and then you can use all sorts of techniques including shell scripting to analyse the results, sound alarms, etc.