[Nut-upsuser] nut on armhf, r-pi4b IOW

Gene Heskett gheskett at shentel.net
Tue Jan 7 12:28:23 GMT 2020


Greetings all;

Does nut build on an r-pi4b?

I have an r-pi4b running one of my cnc machines and the power bump 
performance due to the size of its psu and the fairly rapid start time 
of my standby generator, does not allow a full powerdown restart to take 
place, leaving the pi in a crashed state.

I've purchased a factory refurbed cyberpower ups rated at 650 WA which I 
intend to figure out a way to hang it on the machine to power the pi 
only, which has a 25 watt 5 volt psu running it.  With no connection to 
the pi other that putting cyberpower in the line cords path, it should 
run the pi for 30 minutes, and the standby will generally start in 
around 5 secs.  So the problem should be solved.

But it would be nice to be able to monitor it.  So, can nut be built to 
run on an armhf platform? Mmmm, possibly silly Q, its available in the 
raspbian buster repo's. So I had apt install it.

But the installer failed to start it, not surprising because its not been 
configured yet nor has whatever cable cyberpower needs been connected.
The apt install log:
pi at rpi4:/media/pi/workspace/rpi4-kernel $ sudo apt install nut
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libupsclient4 nut-client nut-server
Suggested packages:
  nut-monitor nut-cgi nut-ipmi nut-snmp nut-xml
The following NEW packages will be installed:
  libupsclient4 nut nut-client nut-server
0 upgraded, 4 newly installed, 0 to remove and 6 not upgraded.
Need to get 1,358 kB of archives.
After this operation, 4,902 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main 
armhf libupsclient4 armhf 2.7.4-8 [180 kB]
Get:2 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main 
armhf nut-client armhf 2.7.4-8 [243 kB]
Get:3 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main 
armhf nut-server armhf 2.7.4-8 [690 kB]
Get:4 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main 
armhf nut all 2.7.4-8 [245 kB]
Fetched 1,358 kB in 3s (515 kB/s)
Selecting previously unselected package libupsclient4:armhf.
(Reading database ... 261019 files and directories currently installed.)
Preparing to unpack .../libupsclient4_2.7.4-8_armhf.deb ...
Unpacking libupsclient4:armhf (2.7.4-8) ...
Selecting previously unselected package nut-client.
Preparing to unpack .../nut-client_2.7.4-8_armhf.deb ...
Unpacking nut-client (2.7.4-8) ...
Selecting previously unselected package nut-server.
Preparing to unpack .../nut-server_2.7.4-8_armhf.deb ...
Unpacking nut-server (2.7.4-8) ...
Selecting previously unselected package nut.
Preparing to unpack .../archives/nut_2.7.4-8_all.deb ...
Unpacking nut (2.7.4-8) ...
Setting up libupsclient4:armhf (2.7.4-8) ...
Setting up nut-client (2.7.4-8) ...
Created 
symlink /etc/systemd/system/multi-user.target.wants/nut-monitor.service 
→ /lib/systemd/system/nut-monitor.service.
Job for nut-monitor.service failed because the service did not take the 
steps required by its unit configuration.
See "systemctl status nut-monitor.service" and "journalctl -xe" for 
details.
invoke-rc.d: initscript nut-client, action "start" failed.
● nut-monitor.service - Network UPS Tools - power device monitor and 
shutdown controller
   Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; 
vendor preset: enabled)
   Active: failed (Result: protocol) since Tue 2020-01-07 07:19:19 EST; 
116ms ago
  Process: 32343 ExecStart=/sbin/upsmon (code=exited, status=0/SUCCESS)

Jan 07 07:19:19 rpi4 systemd[1]: Starting Network UPS Tools - power 
device monitor and shutdown controller...
Jan 07 07:19:19 rpi4 upsmon[32343]: upsmon disabled, please adjust the 
configuration to your needs
Jan 07 07:19:19 rpi4 upsmon[32343]: Then set MODE to a suitable value 
in /etc/nut/nut.conf to enable it
Jan 07 07:19:19 rpi4 systemd[1]: nut-monitor.service: Can't open PID 
file /run/nut/upsmon.pid (yet?) after start: No such file or directory
Jan 07 07:19:19 rpi4 systemd[1]: nut-monitor.service: Failed with 
result 'protocol'.
Jan 07 07:19:19 rpi4 systemd[1]: Failed to start Network UPS Tools - 
power device monitor and shutdown controller.
Setting up nut-server (2.7.4-8) ...
Created 
symlink /etc/systemd/system/multi-user.target.wants/nut-server.service 
→ /lib/systemd/system/nut-server.service.
nut-driver.service is a disabled or a static unit, not starting it.
Setting up nut (2.7.4-8) ...
Processing triggers for systemd (241-7~deb10u2+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
pi at rpi4:/media/pi/workspace/rpi4-kernel $

So, is there enough help in the man pages?, or do you see any 
showstoppers in the above trace?

Thanks all.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>



More information about the Nut-upsuser mailing list