[Nut-upsuser] upssched. Again.
Ciprian Marius Vizitiu
cvizitiu at gbif.org
Mon Jun 25 07:16:42 UTC 2007
> > SERVER=yes
> > MODEL=apcsmart
> > DEVICE=/dev/ttyS0
> > OPTIONS=
> Please change to
OK, done. But it looks like there is a small bug in nut's FC6 init scripts
which prevents this config from working with "restart". I mean if I change
it to "upsdrvctl" you can not issue "service ups restart" because it fails
Stopping UPS monitor: [ OK ]
Stopping upsd: [ OK ]
Shutting down upsdrvctl: Network UPS Tools - UPS driver controller 2.0.3
Stopping UPS: APC750
Starting upsdrvctl: Network UPS Tools - UPS driver controller 2.0.3
Network UPS Tools (version 2.0.3) - APC Smart protocol driver
Driver version 1.99.7, command table version 2.0
/dev/ttyS0 is locked by another process
Driver failed to start (exit status=1)
Starting upsd: Network UPS Tools upsd 2.0.3
Connected to UPS [APC750]: apcsmart-ttyS0
Synchronizing...Read from UPS [APC750] failed: Connection reset by peer
..... giving up
Data for UPS [APC750] is stale - check driver
Can't connect to UPS [APC750] (apcsmart-ttyS0): No such file or directory
[ OK ]
Starting UPS monitor (master): Network UPS Tools upsmon 2.0.3
UPS: APC750 at 127.0.0.1 (master) (power value 1)
Using power down flag file /etc/killpower [ OK ]
And then of course you get the warnings (a clear proof that upsmon is
Broadcast message from nut (Sun Jun 24 21:55:48 2007):
Communications with UPS APC750 at 127.0.0.1 lost
Broadcast message from nut (Sun Jun 24 21:55:53 2007):
UPS APC750 at 127.0.0.1 is unavailable
Instead one must do "ups stop" and then "ups start"; kinda of a silly...
Just out of curiosity why not use apcsmart? 'cos in this situation APC is
the only UPS controlled by NUT.
> > AT ONBATT APC750 at localhost EXCUTE onbattwarn
> Typo? The command here should read EXECUTE.
Yeah... :-s Me angry that upssched doesn't behave. I've been here in January
with my Unitek UPS. Same problem... Haven't fixed it back then have to now.
... OK, fixed the typo; Absolutely no difference. :-|
> What are the contents of 'upsmon.conf', most notably the EXEC
> flag on the relevant NOTIFYFLAG items?
... Oh sorry, forgot about this one; here:
MONITOR APC750 at 127.0.0.1 1 <censored> <censored> master
SHUTDOWNCMD "/sbin/shutdown -h +0"
NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
Oh and just before you ask,
Error: UPSNAME and NOTIFYTYPE must be set.
This program should only be run from upsmon.
... So it's there.
> Is upsmon running?
Not only is shows at ps but each time I unplug the UPS I can see in
Jun 24 21:50:26 mah upsmon: UPS APC750 at 127.0.0.1 on battery
Jun 24 21:50:26 mah wall: wall: user nut broadcasted 1 lines (33
Jun 24 21:51:01 mah upsmon: UPS APC750 at 127.0.0.1 on line power
Jun 24 21:51:01 mah wall: wall: user nut broadcasted 1 lines (36
Looks as if upsmon is working but still no upssched. :-|
PS. OK, just to make sure I've replaced:
Upon the next unplug I could see both the file in /tmp and the log message
from my script; So the script is accessible but upsschedule no? :-o
PPS. selinux disabled... :-|
More information about the Nut-upsuser