You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Installation


Install nut-client

$ sudo apt-get install nut-client


Configure

Update nut-config

$ vi /etc/nut/nut.conf


Set mode to netclient

MODE=netclient


Update upsmon.conf

$ vi upsmon.conf


Update MONITOR

RUN_AS_USER root
MONITOR qnapups@192.168.1.50 1 admin 123456 slave

For our QNAP master

  • upsname = qnapups
  • user = admin
  • password = 123456


Restart Nut Client


$ systemctl restart nut-client


Get Status of Nut Client


$ systemctl status nut-client


● 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: active (running) since Tue 2021-08-24 12:39:49 EDT; 2s ago
    Process: 162230 ExecStart=/sbin/upsmon (code=exited, status=0/SUCCESS)
   Main PID: 162234 (upsmon)
      Tasks: 2 (limit: 19043)
     Memory: 1.1M
     CGroup: /system.slice/nut-monitor.service
             ├─162231 /lib/nut/upsmon
             └─162234 /lib/nut/upsmon

Aug 24 12:39:49 deepthought systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
Aug 24 12:39:49 deepthought upsmon[162230]: fopen /run/nut/upsmon.pid: No such file or directory
Aug 24 12:39:49 deepthought upsmon[162230]: UPS: qnapups@192.168.1.60 (slave) (power value 1)
Aug 24 12:39:49 deepthought upsmon[162230]: Using power down flag file /etc/killpower
Aug 24 12:39:49 deepthought systemd[1]: nut-monitor.service: Can't open PID file /run/nut/upsmon.pid (yet?) after start: Operation not permi>
Aug 24 12:39:49 deepthought upsmon[162231]: Startup successful
Aug 24 12:39:49 deepthought systemd[1]: nut-monitor.service: Supervising process 162234 which is not our child. We'll most likely not notice>
Aug 24 12:39:49 deepthought systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.


Check connection 


$ upsc qnapups@192.168.1.60


  • No labels