Both sides previous revision Previous revision Next revision | Previous revision |
home_server:home_server_setup:other_services:nut [2022-12-27 Tue wk52 21:22] – [NUT Key commands and scripts] baumkp | home_server:home_server_setup:other_services:nut [2023-05-13 Sat wk19 10:20] (current) – [NUT (Network UPS Tools) Setup] baumkp |
---|
{{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]]. |
*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 |
</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 |