[Nut-upsuser] battery not installed, but battery still 100% and NUT 2.7.2-4 does not catch this and report a error

Jon Bendtsen jon.bendtsen at jonix.dk
Mon Apr 3 14:24:43 UTC 2017


Hi

debian jessie, nut 2.7.2-4

APC Smart-UPS 1500 connected through USB, running nut driver usbhid-ups


This UPS powers my switches, internet connection and my monitor server that 
monitors this and my other UPSes + runs smokeping and nagios.


But recently a powerloss seemed to have shutdown my monitor PC immediately, so 
it did not shut down the other servers cleanly. Power seem to be lost immediately.


But my APC Smart-UPS 1500 always reported everything OK.

output from CGI scripts

APC Smart-UPS 1500 - powers switches and routers in little rack +++ also this 
server dkfitlet 	Smart-UPS 1500 	ONLINE
	100 % 	227.5 	227.5 	20.8 % 	39.6 °C 	00:17:00 	All data

UPS Model: 	Smart-UPS 1500
Status: 	ONLINE
Runtime: 	00:17:00
Battery: 	27.1 V
Input: 	226.0 V
Output: 	226.0 V
	0.94 A
	50.0 Hz


when I go into treemode though, I see something interesting


APC Smart-UPS 1500 - powers switches and routers in little rack +++ also this 
server dkfitlet
battery.charge 	: 	100
battery.charge.low 	: 	10
battery.charge.warning 	: 	50
battery.mfr.date 	: 	2005/08/26
battery.runtime 	: 	1020
battery.runtime.low 	: 	120
battery.temperature 	: 	39.6
battery.type 	: 	PbAc
battery.voltage 	: 	27.1
battery.voltage.nominal 	: 	24.0
device.mfr 	: 	American Power Conversion
device.model 	: 	Smart-UPS 1500
device.serial 	: 	AS0535132782
device.type 	: 	ups
driver.name 	: 	usbhid-ups
driver.parameter.pollfreq 	: 	30
driver.parameter.pollinterval 	: 	2
driver.parameter.port 	: 	auto
driver.parameter.serial 	: 	AS0535132782
driver.version 	: 	2.7.2
driver.version.data 	: 	APC HID 0.95
driver.version.internal 	: 	0.38
input.sensitivity 	: 	high
input.transfer.high 	: 	253
input.transfer.low 	: 	208
input.voltage 	: 	226.0
output.current 	: 	0.94
output.frequency 	: 	50.0
output.voltage 	: 	226.0
output.voltage.nominal 	: 	230.0
ups.alarm 	: 	No battery installed!
ups.beeper.status 	: 	enabled
ups.delay.shutdown 	: 	20
ups.delay.start 	: 	30
ups.firmware 	: 	653.12.I
ups.firmware.aux 	: 	4.2
ups.load 	: 	20.8
ups.mfr 	: 	American Power Conversion
ups.mfr.date 	: 	2005/08/26
ups.model 	: 	Smart-UPS 1500
ups.productid 	: 	0002
ups.serial 	: 	AS0535132782
ups.status 	: 	ALARM OL
ups.test.result 	: 	No test initiated
ups.timer.reboot 	: 	-1
ups.timer.shutdown 	: 	-1
ups.timer.start 	: 	-1
ups.vendorid 	: 	051d



what? no battery installed, and the status is ALARM? how come NUT doesnt report 
this?


root at dkfitlet:/etc/nut# upslog -s apc1500 -l -
Network UPS Tools upslog 2.7.2
logging status of apc1500 to - (30s intervals)
Init SSL without certificate database
20170403 154055 100 230.4 21.4 [ALARM OL] NA NA
20170403 154125 100 230.4 20.8 [ALARM OL] NA NA
20170403 154155 100 230.4 21.4 [ALARM OL] NA NA




root at dkfitlet:/etc/nut# upsmon -DDD
Network UPS Tools upsmon 2.7.2
kill: No such process
    0.000000	UPS: apc1500 at localhost (monitoring only)
    0.000214	UPS: Smart-UPS_3000 at localhost (monitoring only)
    0.000328	UPS: R3000XR at localhost (monitoring only)
    0.001278	Using power down flag file /etc/killpower
    0.002126	debug level is '3'
    0.005831	Init SSL without certificate database
    0.011754	Trying to connect to UPS [apc1500 at localhost]
    0.013150	Can not connect to localhost in SSL, continue uncrypted
    0.013909	Logged into UPS apc1500 at localhost
    0.014384	pollups: apc1500 at localhost
    0.014501	get_var: apc1500 at localhost / status
    0.014889	parse_status: [ALARM OL]
    0.015012	parsing: [ALARM]
    0.015100	parsing: [OL]
    0.015181	ups_on_line: apc1500 at localhost (first time)


notice the value of parsing, first it is ALARM, and then OL. But if only the 
last value is returned, then everything seems okay and NUT never reports the issue?


for my other UPS'es it looks like this, only ever having OL as value.

    0.015265	Trying to connect to UPS [Smart-UPS_3000 at localhost]
    0.016294	Can not connect to localhost in SSL, continue uncrypted
    0.017190	Logged into UPS Smart-UPS_3000 at localhost
    0.017673	pollups: Smart-UPS_3000 at localhost
    0.017779	get_var: Smart-UPS_3000 at localhost / status
    0.018083	parse_status: [OL]
    0.018178	parsing: [OL]
    0.018261	ups_on_line: Smart-UPS_3000 at localhost (first time)
    0.018344	Trying to connect to UPS [R3000XR at localhost]
    0.019224	Can not connect to localhost in SSL, continue uncrypted
    0.020028	Logged into UPS R3000XR at localhost
    0.020600	pollups: R3000XR at localhost
    0.020704	get_var: R3000XR at localhost / status
    0.021046	parse_status: [OL]
    0.021144	parsing: [OL]
    0.021228	ups_on_line: R3000XR at localhost (first time)




JonB



More information about the Nut-upsuser mailing list