Difference between revisions of "UPS Handling with NUT"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{{!}} class="wikitable" style="float: right; width: 322px;" border="2" | {{{!}} class="wikitable" style="float: right; width: 322px;" border="2" | ||
{{!}}+ Proven on: | {{!}}+ Proven on: | ||
{{!}}- | {{!}}- <!-- Debian --> | ||
{{!}} style="text-align: center; width: 60px;" {{!}} [[File:Logo Debian.png{{!}}60px{{!}}link=https://www.debian.org/{{!}}center{{!}}middle{{!}}frameless]] | {{!}} style="text-align: center; width: 60px;" {{!}} [[File:Logo Debian.png{{!}}60px{{!}}link=https://www.debian.org/{{!}}center{{!}}middle{{!}}frameless]] | ||
{{!}} style="text-align: center; width: 40px;" {{!}} 11 (bullseye) | {{!}} style="text-align: center; width: 40px;" {{!}} 11 (bullseye) | ||
{{!}} | {{!}} | ||
<br> | |||
{{!}}} | {{!}}} | ||
{{{!}} class="wikitable" style="border-collapse: collapse; width: 33%; left;" | |||
{{{!}} class="wikitable" style="border-collapse: collapse; width: 33%; left;" | {{!}}- style="text-align: center;" | ||
{{!}}- style="text-align: center;" | |||
! style="width: 50%;" colspan="2" {{!}} As always... | ! style="width: 50%;" colspan="2" {{!}} As always... | ||
{{!}}- | {{!}}- | ||
{{!}} {{!}} | {{!}} {{!}} | ||
Start with: | Start with: | ||
{{!}} {{!}} | {{!}} {{!}} | ||
*<code>sudo apt update</code> | *<code>sudo apt update</code> | ||
*<code>sudo apt upgrade</code> | *<code>sudo apt upgrade</code> | ||
{{!}}} | {{!}}} | ||
[https://networkupstools.org/index.html Network UPS Tools] | |||
Network UPS Tools | |||
= Install NUT = | = Install NUT = | ||
Line 27: | Line 28: | ||
* <code>sudo vi /etc/nut/nut.conf</code> | * <code>sudo vi /etc/nut/nut.conf</code> | ||
MODE=netserver | MODE=netserver | ||
* <code>sudo vi /etc/nut/ups.conf</code> | * <code>sudo vi /etc/nut/ups.conf</code> | ||
[cyberpower] | [cyberpower] | ||
driver = usbhid-ups | driver = usbhid-ups | ||
port = auto | port = auto | ||
* <code>sudo upsdrvctl start</code> | * <code>sudo upsdrvctl start</code> | ||
* <code>ip a</code> | * <code>ip a</code> | ||
* <code>sudo vi /etc/nut/upsd.conf</code> | * <code>sudo vi /etc/nut/upsd.conf</code> | ||
LISTEN 192.168.2.219 | LISTEN 192.168.2.219 | ||
LISTEN 127.0.0.1 3493 | LISTEN 127.0.0.1 3493 | ||
LISTEN ::1 3493 | LISTEN ::1 3493 | ||
* <code>sudo vi /etc/nut/upsd.users</code> | * <code>sudo vi /etc/nut/upsd.users</code> | ||
[upsmon] | [upsmon] | ||
password = supersecretpassword | password = supersecretpassword | ||
upsmon master | upsmon master | ||
* <code>sudo vi /etc/nut/upsmon.conf</code> | * <code>sudo vi /etc/nut/upsmon.conf</code> | ||
MONITOR myups@192.168.2.219 1 monuser supersecretpassword master | MONITOR myups@192.168.2.219 1 monuser supersecretpassword master | ||
Line 58: | Line 50: | ||
* <code>sudo service nut-server restart</code> | * <code>sudo service nut-server restart</code> | ||
* <code>sudo service nut-server status</code> | * <code>sudo service nut-server status</code> | ||
* <code>upsc cyberpower</code> | * <code>upsc cyberpower</code> | ||
* <code>upscmd -l cyberpower</code> | * <code>upscmd -l cyberpower</code> |
Revision as of 19:35, 3 February 2022
11 (bullseye) |
|
As always... | |
---|---|
Start with: |
|
Install NUT
sudo apt install nut
Configure NUT
sudo vi /etc/nut/nut.conf
MODE=netserver
sudo vi /etc/nut/ups.conf
[cyberpower] driver = usbhid-ups port = auto
sudo upsdrvctl start
ip a
sudo vi /etc/nut/upsd.conf
LISTEN 192.168.2.219 LISTEN 127.0.0.1 3493 LISTEN ::1 3493
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