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

Re: [PATCH] Power control

Christopher Fowler cfowler@outpostsentinel.com
Fri, 29 Jun 2007 13:01:22 -0700 (PDT)


I did this a while back with our version of 7.X.  Instead of it
executing an external power command it send a message to a daemon that
was responsible for chatting with various power strips.  The problem
with supporting different vendors of strips is that they each have their
own access method.  The powerd daemon was responsible for knowing what
strip was on what serial power and would char with the strip to execute
the power command.  To the user it was off,on,and reboot.  Regardless if
you were using APC, Baytech, etc.  As long as powerd had support for
that model of strip then you could control it via conserver.

I did add a feature that would make sure that the user had R/W on the
console and power control capability on the console.  If not they were
sent a message from conserver that they did not have sufficient rights
to control power on that device.

Being able to control power from console is an amazing benefit.  I've
used it many times to rescue systems in trouble.


On Fri, 2007-06-29 at 14:44 -0400, Bill Peck wrote:
> I have put together a patch that adds power control to conserver.  I 
> have to say that I'm not really a C programmer and I'm sure this will 
> need to be cleaned up before its accepted.  But I had an itch and wanted 
> to contribute.
> 
> I've implemented the following commands for Default and Console:
> powerreset, poweroff, and powersubst.
> 
> Here is an example from my Default Global section...
> 
>         powerreset /usr/sbin/power-reset --system C;
>         poweroff /usr/sbin/power-off --system C;
>         powersubst C=cs;
> 
> 
> a snippit from the help section:
> 
>  e    change escape sequence            f    force attach read/write
>  g    group info                        i    information dump
>  k0   iniate power off                  k1   iniate power reset
>  L    toggle logging on/off             l?   break sequence list
> 
> 
> I'd appreciate any feedback and if anyone else finds this useful.
> 
> Obviously this doesn't handle the configuring of the command that does 
> the actual work.  But I think thats outside the scope of conserver. 
> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users