Difference between revisions of "UPS Handling with NUT"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
Line 31: Line 31:
  MODE=netserver
  MODE=netserver


{{{!}} class="wikitable" style="border-collapse: collapse; width: 100%;"  
{{{!}} class="wikitable" style="border-collapse: collapse;"  
{{!}}-
{{!}}-  
{{!}} style="width: 33.3333%;" {{!}} none
{{!}} style="width: 33.3333%;" {{!}} none
{{!}} style="width: 33.3333%;" {{!}}
{{!}} style="width: 33.3333%;" {{!}}
Disable automatic startup of NUT
{{!}} style="width: 33.3333%;" {{!}}
{{!}} style="width: 33.3333%;" {{!}}
{{!}}-
<br>
{{!}}-  
{{!}} style="width: 33.3333%;" {{!}} standalone
{{!}} style="width: 33.3333%;" {{!}} standalone
{{!}} style="width: 33.3333%;" {{!}} This MODE is for local only configuration
{{!}} style="width: 33.3333%;" {{!}} This MODE is for local only configuration
{{!}} style="width: 33.3333%;" {{!}}
{{!}} style="width: 33.3333%;" {{!}}
{{!}}-
<br>
{{!}}-  
{{!}} style="width: 33.3333%;" {{!}} netserver
{{!}} style="width: 33.3333%;" {{!}} netserver
{{!}} style="width: 33.3333%;" {{!}} This MODE is open to the network. (A NUT server)
{{!}} style="width: 33.3333%;" {{!}} This MODE is open to the network. (A NUT server)
{{!}} style="width: 33.3333%;" {{!}}
{{!}} style="width: 33.3333%;" {{!}}
{{!}}-
<br>
{{!}}-  
{{!}} style="width: 33.3333%;" {{!}} netclient
{{!}} style="width: 33.3333%;" {{!}} netclient
{{!}} style="width: 33.3333%;" {{!}} This MODE is for client machines that will access a NUT server
{{!}} style="width: 33.3333%;" {{!}} This MODE is for client machines that will access a NUT server
{{!}} style="width: 33.3333%;" {{!}}
{{!}} style="width: 33.3333%;" {{!}}
<br>
{{!}}}
{{!}}}
info
info

Revision as of 20:16, 3 February 2022

Proven on:
Logo Debian.png
11 (bullseye)


As always...

Start with:

  • sudo apt update
  • sudo apt upgrade

Network UPS Tools

Install NUT

  • sudo apt install nut

Configure NUT

Select your mode

  • sudo vi /etc/nut/nut.conf
MODE=netserver
none

Disable automatic startup of NUT


standalone This MODE is for local only configuration


netserver This MODE is open to the network. (A NUT server)


netclient This MODE is for client machines that will access a NUT server


info

Select your hardware

  • sudo vi /etc/nut/ups.conf
[cyberpower]
       driver = usbhid-ups
       port = auto

Start & test

  • sudo upsdrvctl start
  • ip a

Set up communications

  • sudo vi /etc/nut/upsd.conf
LISTEN 192.168.2.219
LISTEN 127.0.0.1 3493
LISTEN ::1 3493

Set up access

  • sudo vi /etc/nut/upsd.users
[upsmon]
       password = supersecretpassword
       upsmon master
  • sudo vi /etc/nut/upsmon.conf

MONITOR myups@192.168.2.219 1 monuser supersecretpassword master

Manage NUT

  • sudo service nut-server restart
  • sudo service nut-server status
  • upsc cyberpower
  • upscmd -l cyberpower