[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: [PATCH] Power control

Chris Fowler cfowler@outpostsentinel.com
Wed, 3 Nov 2010 22:57:35 GMT


On Wed, 2010-11-03 at 14:43 -0700, Bryan Stansell wrote:
> 
> Any feedback appreciated... 

I did this back in 7.2.7 for our application.

I wrote a program that would mange the power strips.  It supported
different scripts using the chat library to control them.  I then wrote
an API that used IPC to instruct this program on what to do.

There were two commands.  On and Off.  Note, reboot is off then on.
There were two arguments.  Strip # and outlet #.  If you wanted to power
off the 7th outlet on the first strip you would send off,1,7.  Conserver
would then use IPC to send the command to the program which then
interfaced with the strip.

The beauty of this system is that outside of conserver, on the CLI of
Linux, we have 3 commands.  On, off, and reboot.  Those are the only 3
commands supported.  If you have a Spectrum, Baytech, or APC you still
used those 3 commands.  The power management program dealt with the
issues of interfacing with the strip.

I modified conserver and added 'O' and 'N' options.  

Chris