[Nut-upsuser] powercom UPS shoutdown discussion

Kjell Claesson kjell.claesson at telia.com
Thu Aug 17 16:06:54 UTC 2006


Hi Martin, sorry for the delay, but i been off line for a day.

That is why you should keep the traffic on the list so someone else
can answer you.

tor 2006-08-17 klockan 09:48 +0300 skrev Martin Ivanov:
> Thank you for your response.
> The point is that I have configured my system to shut down at the event "upsc Inform at localhost ups.status"!="OL", not at "LB". So there will be no /etc/killpower file created. At an ups.status != "OL" event, the following script named "notifyme" is run:
> 
> echo `date` >> /root/upsLog
> echo "	No power, shutting down the system!" >> /root/upsLog
> sleep 30
> control=`/usr/local/ups/bin/upsc Inform at localhost ups.status`
> if [ $control != OL ]
> then
>  /sbin/telinit 0
> fi
> 
> I tried adding the line: "touch /etc/powerdown" to the "notifyme" script and the lines:
> 
> if (test -f /etc/powerdown)
> 	then
> 		echo "Killing the power, bye!"
> 		/usr/local/ups/bin/upsdrvctl shutdown
> 
> 		sleep 120
> 
> fi
> 
> to the /etc/rc.d/rc.6 script, but when I simulated a power failure, the system shut down, but the UPS did not. I think I did not add the lines at the correct place in the rc.6 script, or probably there is poor communication between the UPS and the software, for I am not sure the software I am using is for my UPS. I just found out that the powercom driver gives "OL" when the UPS is connected to the mains, and "OB BOOST" when it is disconnected.
> Besides, I am not quite sure whether I need to make the UPS itself go down in case of power failure, because if it does not go down, it has the chance to get charged when power returns. Now after in case of power failure the PC shuts down and the UPS goes on buzzing, but it can go on buzzing like that for quite a lot time before the battery gets damaged, because the PC is off and the power consumption from the UPS battery is minimal, am I not right? 
> So what would you recommend to me? MAke the UPS itself power off after system shutdown in case of power failure, or leave it buzzing till  power returns?
> In case you advise me to make the UPS go down itself after the system shutdown, I will be thankful to you if you tell me  if the method I suggest to achieve that is working and where in the shutdown script I need to add it?

See that you have come a long way on getting things to work.

About the early mail.
------------quote-------------
The result of "/usr/local/ups/bin/powercom -DDDD -u marto -a Inform" is:

Network UPS Tools - PowerCom and similars protocol UPS driver $
Revision: 0.5 $ (2.0.4)

debug level is '4'
Values of arguments:
 manufacturer            : 'PowerCom'
 model name              : 'Unknown'
 serial number           : 'Unknown'
 line voltage            : '220'
 type                    : 'KIN1500AP'
 number of bytes from UPS: '16'
 method of flow control  : 'no_flow_control'
 validation sequence: '{{7,0},{8,0},{8,0}}'
 shutdown arguments: '{{0,10},n}'
 frequency calculation coefficients: '{0.000210,0.000000}'
 load percentage calculation coefficients:
'{6.134300,-0.380800,1.075000,0.181100}'
 battery percentage calculation coefficients:
'{5.000000,0.326800,-825.000000,0.465110,0.000000}'
 voltage calculation coefficients: '{0.828570,0.000000}'
Flow control disable

input.frequency   (raw data): [raw: 96]
input.frequency: 49.61
output.frequency   (raw data): [raw: 97]
output.frequency: 49.10
ups.load  (raw data): [raw: 37]
ups.load: 40.0
battery.charge (raw data): [raw: 210]
battery.charge: (null)
input.voltage (raw data): [raw: 123]
input.voltage: 236.3
input.voltage (raw data): [raw: 123]
output.voltage: 236.3
STATUS: OL

8<-------snip------------
Would you please tell me what the problem is, for I have no idea.
And then, when these technical problems get fixed, I will start
experimentin with the types: Trust,
KP625AP,KIN2200AP,Egys,KIN525AP,KIN1500AP. How shall I know that I have
come on a successful configuration?
------end quote----------

To know if the driver type setting is right it's only to test and see
the type that gives the right readings.

The type you use now seems to give some strange readings when OnBattery.
But the reading looks sane to me when you are OnLine.

The BOOST you see when on battery looks like a bug.
As i can see in the code, if the input voltage is lower then the
line voltage in the config it gives BOOST. But it may due to that the
AVR_ON bit is not read correctly by your driver setting.

Then about the shutdown. Reading the code from the driver some of the 
ups need a minute and seconds argument to shutdown.

The type you use now is only sending the second value. So in the
ups.conf you may add

shutdownArguments = {{0,10},y}

This will send 0 minutes 10 seconds and tell the driver to use both
parameters.

You can test it by adding this and do a upsdrvctr shutdown, and it
should power off in 10 seconds. (Don't use the ups to feed you computer
during this test!)

The best is to make one piece at the time to function.
So start whit getting the driver to act OK. Then you can
start the upsd and configure the monitor to do the things
you want. But you have come a long way GOOD WORK Martin.

When everything works you may tell us the settings and type of ups
so we can add it to the list and enter the information.

Regards
Kjell
 




More information about the Nut-upsuser mailing list