On 2014-02-27 14:21, Charles Lepple wrote:> On Feb 27, 2014, at 7:07 AM, jimklimov at cos.ru <mailto:jimklimov at cos.ru> > wrote: > >> This apparently implies that, unlike some docs say, the snmp-ups >> driver can send the shutdown signals (is not crippled by design)? ;) > > We're working on it: > > http://buildbot.networkupstools.org/~buildbot/cayman/docs/latest/docs/man/snmp-ups.html#_shutdown > > A quick check says that the implementation has been there since v2.6.4, > and the documentation caught up after v2.7.1. Without a SNMP UPS to test > against in-house, you can imagine that I am not inclined to arbitrarily > change things there without user feedback :-)Ok, I'll have them give it a try :) Also, is there any command to cancel a pending shutdown, if any was requested previously - so as to reset the doomsday timer (so that, per my earlier example, if several blades are shutting down and asking the UPS to kill itself in a few minutes, every next blade that completes its shutdown to this step, would give a few more minutes of uptime to those which are still processing their stop-scripts)?>> Also, are those oids apc-private or commonly used/standard among snmp >> upses? > > 1.3.6.1.4.1.318 is the APC prefix - I don't think many UPSes use other > vendors' prefixes.hmmm.... right, thanks :)> > This OID is curiously commented out in drivers/apc-mib.c, and has been since the beginning of our revision control history. I don't see why we couldn't add it back in as an instant command. > > I wonder if there was some confusion with .1.3.6.1.4.1.318.1.1.1.6.1.1.0 (upsBasicControlConserveBattery), which is currently mapped to "shutdown.return" > >>>> # turn off UP gracefully (APC) (stays off even if power is restored) >>>> #UPS_OID=".1.3.6.1.4.1.318.1.1.1.6.2.1.0 integer 3" > > This should map to the "shutdown.stayoff" instant command.And this means that the current code in the repository would not work as expected, without fixing the above discrepancies first? Right? Thanks, //Jim Klimov
On Thu, 27 Feb 2014, Jim Klimov wrote: | Also, is there any command to cancel a pending shutdown, if any was | requested previously - so as to reset the doomsday timer (so that, per | my earlier example, if several blades are shutting down and asking the | UPS to kill itself in a few minutes, every next blade that completes | its shutdown to this step, would give a few more minutes of uptime | to those which are still processing their stop-scripts)? The options for upsAdvControlRebootShutdownUps are noRebootShutdownUps(1), rebootShutdownUps(2), rebootShutdownUpsGracefully(3), rebootShutdownSyncGroupUps(4), rebootShutdownSyncGroupUpsGracefully(5) However, in powernet409.mib we see "Setting this value to noRebootShutdownUps(1) has no effect." You'll have to test. -- Tim Rice Multitalents tim at multitalents.net
On Feb 27, 2014, at 9:43 AM, Jim Klimov wrote:>>>>> # turn off UP gracefully (APC) (stays off even if power is restored) >>>>> #UPS_OID=".1.3.6.1.4.1.318.1.1.1.6.2.1.0 integer 3" >> >> This should map to the "shutdown.stayoff" instant command. > > And this means that the current code in the repository would not work > as expected, without fixing the above discrepancies first? Right?I wasn't very clear there: .1.3.6.1.4.1.318.1.1.1.6.2.1.0 *does* currently map to "shutdown.stayoff". (We should probably fix the other OID to map to "shutdown.return", if that is indeed what it does.) -- Charles Lepple clepple at gmail
On Thu, 27 Feb 2014, Charles Lepple wrote: | On Feb 27, 2014, at 9:43 AM, Jim Klimov wrote: | | >>>>> # turn off UP gracefully (APC) (stays off even if power is restored) | >>>>> #UPS_OID=".1.3.6.1.4.1.318.1.1.1.6.2.1.0 integer 3" | >> | >> This should map to the "shutdown.stayoff" instant command. | > | > And this means that the current code in the repository would not work | > as expected, without fixing the above discrepancies first? Right? | | I wasn't very clear there: .1.3.6.1.4.1.318.1.1.1.6.2.1.0 *does* currently map to "shutdown.stayoff". | | (We should probably fix the other OID to map to "shutdown.return", if that is indeed what it does.) I you are refering to # reboot gracefully (APC) (stays off until utility power is restored) MT_UPS_OID=".1.3.6.1.4.1.318.1.1.1.6.2.2.0 integer 3" I have tested it and id does what it says. Latest (i think) APC mib here. ftp://ftp.apc.com/apc/public/software/pnetmib/mib/409/powernet409.mib -- Tim Rice Multitalents (707) 456-1146 tim at multitalents.net