> I am not using APC :-(
> By the way, what is APC?
> If its one of those UPS companies then am definitely not using it...
> Mine is a "merge"(thats what the sticker says)
> Its from Wipro!
> If APC means some technology in UPS then i will have to dig deeper :)
>
> But on the surface,are there no scripts that have all these info in it?

Dude,

Is your UPS connected to your system via USB at all ? That is the only 
way for the Host OS to figure out the UPS status.

Search your vendor's site and see if they have a driver available 
already (Doh ! Solaris ? What is that ?). If not read the libusb 
documentation - it is a relatively trivial matter to write a ugen / 
libusb userland driver and read() from the ifin/ifout/cntrl interfaces. 
The tough part is to reverse engineer which interface, how many bytes, 
which bytes and what those bytes mean without any documentation.

Start experimenting now:
Switch on AC power, Read a few bytes, dump the values
Turn off AC power, Read the same bytes, dump the values
See which bytes change - Probably "bit" - this is your charge / 
discharge flag.

To find out the residual charge on the UPS, switch off AC power and 
write a program which prints the bytes you read in a loop. And then see 
which bytes seem to be decreasing. If your UPS does something stupid 
like encoding these values in BCD, you will spend a little more time 
along the way cursing the damn manufacturer for being such a git.

Ananth


Reply via email to