NUT service taking 100% CPU on 1 thread when power is cut to the UPS

CacheMeIfYouCan

Dabbler
Joined
Oct 23, 2023
Messages
23
I have an issue with NUT, the UPS monitoring service.

I've connected a Cyberpower CP1500AVRLCD3 UPS to a USB port of my TrueNAS Scale (Cobia). I've configured the NUT service, and all seems ok. Everything is fine until I pull the plug on the UPS to engage the battery. Then the NUT process runs crazy (no pun intended), using 100% on one thread, continuously and until power is recovered. This is really unproductive since this increases power draw by 16W, that's +28% in my case.

Is this the expected behavior, misconfiguration on my part or a bug?

Let me know what other info may be helpful in this investigation.

Code:
admin@serveur4[~]$ upsc cp1500
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 9925
battery.runtime.low: 300
battery.type: PbAcid
battery.voltage: 27.0
battery.voltage.nominal: 24
device.mfr: CPS
device.model: CP1500AVRLCD3
device.serial: BHPNW2000657
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/uhid
driver.parameter.synchronous: auto
driver.version: 2.8.0
driver.version.data: CyberPower HID 0.6
driver.version.internal: 0.47
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
input.voltage: 118.0
input.voltage.nominal: 120
output.voltage: 118.0
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 6
ups.mfr: CPS
ups.model: CP1500AVRLCD3
ups.productid: 0601
ups.realpower.nominal: 900
ups.serial: BHPNW2000657
ups.status: OL
ups.test.result: No test initiated
ups.timer.shutdown: -60
ups.timer.start: -60
ups.vendorid: 0764
admin@serveur4[~]$
 

Attachments

  • e3ldsdt7sk4c1.webp
    92.7 KB · Views: 52

CacheMeIfYouCan

Dabbler
Joined
Oct 23, 2023
Messages
23
Here's more detailed info on the situation on my TrueNAS Scale while in UPS power loss:

A process named 'upssched' uses 100% of one CPU thread (user: nut).

Code:
admin@serveur4[~]$ upsc -l
Init SSL without certificate database
cp1500
admin@serveur4[~]$
admin@serveur4[~]$ upsc cp1500
Init SSL without certificate database
battery.charge: 97
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 6235
battery.runtime.low: 300
battery.type: PbAcid
battery.voltage: 25.1
battery.voltage.nominal: 24
device.mfr: CPS
device.model: CP1500AVRLCD3
device.serial: BHPNW2000657
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.version: 2.8.0
driver.version.data: CyberPower HID 0.6
driver.version.internal: 0.47
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
input.voltage: 0.0
input.voltage.nominal: 120
output.voltage: 120.0
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 9
ups.mfr: CPS
ups.model: CP1500AVRLCD3
ups.productid: 0601
ups.realpower.nominal: 900
ups.serial: BHPNW2000657
ups.status: OB DISCHRG
ups.test.result: No test initiated
ups.timer.shutdown: -60
ups.timer.start: -60
ups.vendorid: 0764
admin@serveur4[~]$



Capture d’écran du 2024-01-10 16-18-40.png

Capture d’écran du 2024-01-10 16-19-40.png
 

CacheMeIfYouCan

Dabbler
Joined
Oct 23, 2023
Messages
23
I've found that an issue was raised with upssched 2.8.0 last year on github.

The symptoms match perfectly the issue I have noticed. As far as I can tell by running "/lib/nut/upsmon -V" it is this version 2.8.0 that is running on my TrueNAS Scale 23.10.0.1.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
It appears it matches to me as well. I think your best bet is to raise the issue as a ticket with IX and ask them to maybe include the fix in the next Scale version.
 

CacheMeIfYouCan

Dabbler
Joined
Oct 23, 2023
Messages
23
I did open a ticket yesterday (before finding the issue on GitHub) but was unsure if they would respond since I haven't bought any hardware from them, nor any service contract.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
but was unsure if they would respond since I haven't bought any hardware from them, nor any service contract.
There is no such requirement to receive attention through the bug reporting process.
 
Last edited:

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
At least it only matters when the power is off so limited problem.
 

CacheMeIfYouCan

Dabbler
Joined
Oct 23, 2023
Messages
23
At least it only matters when the power is off so limited problem.
On an environmental perspective, perhaps. But on a system administration and cost perspective, it does matter a lot. The power draw of my system increases by 40% thus the autonomy of the UPS is reduced by the same proportion.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
I agree of course. But it only matters if the power ever goes off. Do you really lose power that often? Ours kicks in like once a year,. Definitely reduces the runtime if it does go off. I was merely trying to say there are much worse problems you could have had.
 
Top