[Nut-upsuser] powercom UPS shoutdown discussion

Martin Ivanov tramni at abv.bg
Thu Aug 17 06:48:11 UTC 2006


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?

Thank you for your responsiveness.
Regards, Martin


 >-------- Оригинално писмо --------
 >От:  selinger at mathstat.dal.ca (Peter Selinger)
 >Относно: Re: [Nut-upsuser] powercom user problem
 >До: tramni at abv.bg (Martin Ivanov)
 >Изпратено на: Четвъртък, 2006, Август 17 00:29:50 EEST
 >----------------------------------
 >
 >Martin Ivanov wrote:
 >> 
 >> 1. How to make the UPS power off after the PC powers off in case of power
 >>  failure. Of course when there is no power failure, but I issue shutdown 
 >> command to the system, the UPS must not power off.
 >
 >The answer to this question in contained in the file INSTALL that is
 >distributed with NUT. The answer is under "Configuring shutdowns for
 >low battery events" -> "11. Edit your shutdown scripts: add upsdrvctl
 >shutdown" (line 503). 
 >
 >-- Peter
 >

-----------------------------------------------------------------
http://ide.li/ - портал за българите по света. Статии, новини, форуми, снимки, информация.



More information about the Nut-upsuser mailing list