On Dec 7, 2015, at 4:21 PM, Gernot Zander <debian at scorpio.in-berlin.de> wrote:> > Hi, > > am 7 Dez schrieb Marks, Connor: >> Well I just need to monitor the UPS battery for testing and I do about >> 10 UPS's a day. So having to restart my computer every time gets old >> real quick. > > In that case - what about not starting nut-client (upsmon) at all? upsc > (to see the output of the ups) requires nut-server only. > > Or, if you really want upsmon: > - Set up a dummy ups _and_ the ups to be tested. > - in upsmon.conf set > MONITOR dummyups at localhost 1 monmaster masterpass master > MONITOR testups at localhost 0 monmaster masterpass master > and > MINSUPPLIES 1 > > That way the dummy ups will "power your computer" and the testups will > supply 0 power so its power outage gets ignored.To simplify, you could eliminate "dummyups" and use "MINSUPPLIES 0". Or Rob's suggestion of changing "SHUTDOWNCMD" would work - it really depends on what portion of upsmon you are still using (if at all). As Gernot mentioned, upsc does not require upsmon, and neither does upslog. (I can't remember if you mentioned what flavor of Linux you are using, but the service names ("nut-server" for upsd, and "ups-client" for upsmon) might be slightly different.) -- Charles Lepple clepple at gmail
Hi, am 7 Dez schrieb Charles Lepple:>> MONITOR dummyups at localhost 1 monmaster masterpass master >> MONITOR testups at localhost 0 monmaster masterpass master >> MINSUPPLIES 1 > To simplify, you could eliminate "dummyups" and use "MINSUPPLIES 0".Maybe there's a bug. To monitor an UPS wich doesn't supply power to a raspi I used: MONITOR usv1vr at localhost 0 monmaster XXXXX master MONITOR usv2vr at localhost 0 monmaster XXXXX master MINSUPPLIES 0 But each time usv1.vr does its selftest or has a voltage dip I get mail "raspixx on battery". That's why I added the dummy ups. It didn't came to a shutdown yet, fortunatly, so I'm not sure. CU, Gernot
8 ??????? 2015??. 6:05:23 CET, Gernot Zander <debian at scorpio.in-berlin.de> ?????:>Hi, > >am 7 Dez schrieb Charles Lepple: >>> MONITOR dummyups at localhost 1 monmaster masterpass master >>> MONITOR testups at localhost 0 monmaster masterpass master >>> MINSUPPLIES 1 >> To simplify, you could eliminate "dummyups" and use "MINSUPPLIES 0". > >Maybe there's a bug. To monitor an UPS wich doesn't supply power to a >raspi I used: >MONITOR usv1vr at localhost 0 monmaster XXXXX master >MONITOR usv2vr at localhost 0 monmaster XXXXX master >MINSUPPLIES 0 > >But each time usv1.vr does its selftest or has a voltage dip I get mail >"raspixx on battery". That's why I added the dummy ups. It didn't came >to a shutdown yet, fortunatly, so I'm not sure. > >CU, >Gernot > > > >_______________________________________________ >Nut-upsdev mailing list >Nut-upsdev at lists.alioth.debian.org >http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdevWhy bug? You monitor the ups, so you're assumed interested about its state changes (wording might be wrong for this case in a particular implementation of NOTIFYCMD - but feel free to write your own as in the old days). You wrote that it feeds zero supplies of this host so you don't power off because of its events. Also as noted by somebody else, feel free to adapt SHUTDOWNCMD e.g. to a script that would echo 'upsmon would shut down thus host now' | wall so instead of shutting down you just get a console message (and/or syslog via 'logger', email, etc.) that the shutdown routine would've kicked in if you didn't override it in this manner. Hope this helps, Jim Klimov -- Typos courtesy of K-9 Mail on my Samsung Android