Richard Chapman
2009-May-22 07:41 UTC
[Nut-upsuser] Where are usbhid-ups driver parameters defined - and what do some of them mean?
I am using the usbhid-ups driver with a Belkin UPS. upsc shows several parameters which I would like to both understand and probably change. In particular the following part of upsc output: battery.charge.low: 30 battery.charge.warning: 30 battery.runtime: 120 My questions are: 1) What is the difference between battery.charge.low and battery.charge.warning? I presume these are % thresholdsWhich of these triggers the low battery event? 2) Is there some way to change these? 30% charge seems to me to be sailing a little close to the wind. As the battery ages - I'm sure the UPS will cut out long before "zero" is reached. Also - if it comes back up with < 30% charge - and another power fail occurs soon after - that is not good. Are these set i the source code - or is there another config file somewhere. upsrw doesn't appear to be able to change these. 3) What exactly is battery.runtime. Can anyone point me to documentation which describes these parameters? Thanks Richard.
Rob MacGregor
2009-May-22 08:07 UTC
[Nut-upsuser] Where are usbhid-ups driver parameters defined - and what do some of them mean?
On Fri, May 22, 2009 at 08:41, Richard Chapman <rchapman at aardvark.com.au> wrote:> I am using the usbhid-ups driver with a Belkin UPS. > upsc shows several parameters which I would like to both understand and > probably change. In particular the following part of upsc output: > > battery.charge.low: 30 > battery.charge.warning: 30 > battery.runtime: 120 > > My questions are: > > 1) What is the difference between battery.charge.low and > battery.charge.warning? I presume these are % thresholdsWhich of these > triggers the low battery event? > 2) Is there some way to change these? 30% charge seems to me to be sailing a > little close to the wind. As the battery ages - I'm sure the UPS will cut > out long before "zero" is reached. Also - if it comes back up with ?< 30% > charge - and another power fail occurs soon after - that is not good. Are > these set i the source code - or is there another config file somewhere. > upsrw doesn't appear to be able to change these. > 3) What exactly is battery.runtime.This answer in the list archive (http://osdir.com/ml/monitoring.nut.user/2007-12/msg00014.html) covers at least some of your questions. This (http://www.mscs.dal.ca/~selinger/ups/backups.html) slightly old page describes the variables you list. In short, not all UPS units support changing the low battery level and the battery.runtime is the runtime in seconds of your UPS on batteries. The link says it's without load, but I have a unit that changes that reported value based upon load. Either way, 120 seconds is not enough time to shut down. Either your UPS is under specified (ie the load is high) or the batteries are very, very, old. -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn't become a monster. Friedrich Nietzsche
Arjen de Korte
2009-May-22 08:21 UTC
[Nut-upsuser] Where are usbhid-ups driver parameters defined - and what do some of them mean?
Citeren Richard Chapman <rchapman op aardvark.com.au>:> I am using the usbhid-ups driver with a Belkin UPS. > upsc shows several parameters which I would like to both understand > and probably change. In particular the following part of upsc output: > > battery.charge.low: 30 > battery.charge.warning: 30 > battery.runtime: 120 > > My questions are: > > 1) What is the difference between battery.charge.low and > battery.charge.warning? I presume these are % thresholdsWhich of > these triggers the low battery event?The 'upsc' is meant to be used by shell scripts and therefor the verbosity of the output is limited and we assume when you run this, you already know this. You're not the first to ask this, so maybe we should add a '-v' option to make the output more verbose and also display the descriptions of variables that are listed in data/cmdvartab. You can also take a peek in docs/new-names.txt from the distribution archive for a complete overview.> 2) Is there some way to change these? 30% charge seems to me to be > sailing a little close to the wind. As the battery ages - I'm sure > the UPS will cut out long before "zero" is reached. Also - if it > comes back up with < 30% charge - and another power fail occurs > soon after - that is not good. Are these set i the source code - or > is there another config file somewhere. upsrw doesn't appear to be > able to change these.In that case either the driver author didn't know how to do this, or your UPS doesn't support changing these values. I would guess the first applies here, since in many cases it would be possible to change at least battery.charge.low. If you're worried about the above, you need a UPS that also supports battery.charge.restart, to postpone restarting the load if the battery hasn't been recharged. Most consumer grade UPSes don't support this.> 3) What exactly is battery.runtime.The estimated runtime on battery remaining. In case of the usbhid-ups driver, this value is reported by the UPS itself. But please note that not all devices will give a useable value to work with. So before using this for just about anything, please make sure that for *your* UPS this is usuable. Best regards, Arjen -- Please keep list traffic on the list