home_server:home_server_setup:other_services:nut

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
home_server:home_server_setup:other_services:nut [2022-08-27 Sat wk34 07:04] baumkphome_server:home_server_setup:other_services:nut [2023-05-13 Sat wk19 10:20] (current) – [NUT (Network UPS Tools) Setup] baumkp
Line 1: Line 1:
 {{tag>linux debian nut ups server}} {{tag>linux debian nut ups server}}
 ======NUT (Network UPS Tools) Setup====== ======NUT (Network UPS Tools) Setup======
 +I purchased my current main UPS the Powershield Commander RT PSCRT1100 / Voltronic Power Otima II 1.1K in 2014 and setup NUT about this time, including early conversion to systemd scripts.  I notice the Techno Tim [[https://docs.technotim.live/posts/NUT-server-guide/|Network UPS Tools (NUT) Ultimate Guide]] late 2022 has a perhaps more modern take on this.
  
-NUT is an open source network monitoring and control system. I use a Powershield Commander RT PSCRT1100 a 1100VA/880W, line interactive sinewave UPS. It turns out that this is a slightly modified version of the [[http://voltronicpower.com/en-US/Product/Detail/Otima-II-800VA-5KVA|Voltronic Power Otima II 1.1K]]. Presumably the unit has been slightly modified for Powershield for the Australian market, mainly hardware plugs and presumably some firmware/software setup. In fact Voltronic Power, headquartered in Taiwan, even states they are a leading OEM/ODM manurfacturer of UPSs, AVRs and inverters. The software provided with the UPS is both propriety and bloated. I want a simple efficient command line / daemon based utility that can monitor performance, control as necessary and report on abnormal operation. Unfortunately the [[http://networkupstools.org/documentation.html|NUT project documentation]] is not simple to follow. I set this up quite some time ago, so this will not necessarily be up to date.+By the way a couple years ago the UPS battery fail alarm went off.  It would seem the UPS batteries failed after about 5-6 years of operation.  These battery seems to be common lead-acid gel type 12 VDC at 9 AMP-hr (although they look to be the same as 7.2 AMP batteries....)  I basically set and forgot them.  I understand 5-6 year life is not unreasonably.  In any case I purchased some new batteries and replaced and the UPS has continued to function well.  The batteries failed again after less than 3 years.  The batteries are 12VDC 9AHr SLA with F@ tabs, the power tab width must be 6.3mm not 4.8mm. Two batteries are required, they are wired in series.  
 + 
 +NUT is an open source network monitoring and control system. I use a Powershield Commander RT PSCRT1100 a 1100VA/880W, line interactive sinewave UPS. It turns out that this is a slightly modified version of the [[http://voltronicpower.com/en-US/Product/Detail/Otima-II-800VA-5KVA|Voltronic Power Otima II 1.1K]]. Presumably the unit has been slightly modified for Powershield for the Australian market, mainly hardware plugs and presumably some firmware/software setup. In fact Voltronic Power, headquartered in Taiwan, even states they are a leading OEM/ODM manufacturer of UPSs, AVRs and inverters. The software provided with the UPS is both propriety and bloated. I want a simple efficient command line / daemon based utility that can monitor performance, control as necessary and report on abnormal operation. Unfortunately the [[http://networkupstools.org/documentation.html|NUT project documentation]] is not simple to follow. I set this up quite some time ago, so this will not necessarily be up to date.
  
 It turns out the ''nutdrv_qx'' driver is usually better suited for Voltronic Power UPSs than the ''Blazer_usb'' one. See NUT [[http://networkupstools.org/protocols/voltronic.html|Voltronic Power UPS Protocol]], it is also list under the Voltronic Power section, (various)USB of the NUT [[http://networkupstools.org/stable-hcl.html|Hardware compatibility list]]. It turns out the ''nutdrv_qx'' driver is usually better suited for Voltronic Power UPSs than the ''Blazer_usb'' one. See NUT [[http://networkupstools.org/protocols/voltronic.html|Voltronic Power UPS Protocol]], it is also list under the Voltronic Power section, (various)USB of the NUT [[http://networkupstools.org/stable-hcl.html|Hardware compatibility list]].
Line 204: Line 207:
  
   *List all the UPS device profile variable ''/bin/upsc KPBUPS@localhost 2>/dev/null''.   *List all the UPS device profile variable ''/bin/upsc KPBUPS@localhost 2>/dev/null''.
-  *A script file to succinctly log the UPS data, using cron to run script every 10 minutes ''sudo Myscripts/UPSScan.sh 2>/dev/null'',<code>#!/bin/bash+  *A script file to succinctly log the UPS data, using cron to run script every 10 minutes ''sudo Myscripts/UPSScan.sh 2>/dev/null'',<code bash>#!/bin/bash
 # Logging output for NUT UPS Monitor output # Logging output for NUT UPS Monitor output
  
Line 228: Line 231:
         printf("\n") }'                                                 >>"$strf"         printf("\n") }'                                                 >>"$strf"
 </code> </code>
-  *A script file to rotate a log file out to a dated gzip log file, with a new empty log file, the log file with path is the script input ''sudo rotatelog.sh /var/log/UPSLog.Log'', again can be use with cron monthly to rotate a log file. <code>+  *A script file to rotate a log file out to a dated gzip log file, with a new empty log file, the log file with path is the script input ''sudo rotatelog.sh /var/log/UPSLog.Log'', again can be use with cron monthly to rotate a log file. <code bash>
 #!/bin/bash #!/bin/bash
 logfile=$1 logfile=$1
Line 244: Line 247:
   *To list the available UPS commands: "upscmd -l KPBUPS"   *To list the available UPS commands: "upscmd -l KPBUPS"
   *Some other scripts:   *Some other scripts:
-    *To email notifications from nut: nut-notify.sh (not tested)<code>+    *To email notifications from nut: nut-notify.sh (not tested)<code bash>
 #!/bin/sh #!/bin/sh
 #echo "$*" | mailx -s "UPS Notice" baumkp@gmail.com #echo "$*" | mailx -s "UPS Notice" baumkp@gmail.com
Line 271: Line 274:
 </code> </code>
  
-Example to disable the UPS beeper: ''upscmd beeper.disable''+Example to disable the UPS beeper: ''upscmd KPBUPS@localhost beeper.disable'' it will then prompt for NUT user and password. 
 The command will prompt for a user then password.  This is a valid user and password define for the NUT installation as defined in the file ''/etc/nut/upsd.users'' as noted above. The command will prompt for a user then password.  This is a valid user and password define for the NUT installation as defined in the file ''/etc/nut/upsd.users'' as noted above.
 +
 <code> <code>
                       T         Voltage      Battery                S                       T         Voltage      Battery                S
  • /app/www/public/data/attic/home_server/home_server_setup/other_services/nut.1661555080.txt.gz
  • Last modified: 2023-04-30 Sun wk17 17:43
  • (external edit)