Difference between revisions of "UPS Handling with NUT"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
(Undo revision 1108 by Tinker (talk))
Tag: Undo
 
(53 intermediate revisions by the same user not shown)
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 -->
{{!}}- &lt;!-- Debian --&gt;
{{!}} 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]


= Install NUT =
= Install & Configure NUT =


* <code>sudo apt install nut</code>
== Select your mode ==


= Configure NUT =
{{{!}} class="wikitable" style="border-collapse: collapse; width: 735.333px;"
 
{{!}}+ MODE options:
* <code>sudo vi /etc/nut/nut.conf</code>
{{!}}-
 
{{!}} style="width: 90.175px;" {{!}} '''none'''
MODE=netserver
{{!}} style="width: 400.15px;" {{!}} Disable automatic startup of NUT
 
{{!}}
* <code>sudo vi /etc/nut/ups.conf</code>
{{!}}-
 
{{!}} style="width: 90.175px;" {{!}} '''standalone'''
[cyberpower]
{{!}} style="width: 400.15px;" {{!}} This MODE is for local only configuration
        driver = usbhid-ups
{{!}} [[Standalone NUT usage]]
        port = auto
{{!}}-
{{!}} style="width: 90.175px;" {{!}} '''netserver'''
{{!}} style="width: 400.15px;" {{!}} This MODE is open to the network. (A NUT server)
{{!}} [[Setting up a NUT Server]]
{{!}}-
{{!}} style="width: 90.175px;" {{!}} '''netclient'''
{{!}} style="width: 400.15px;" {{!}} This MODE is for client machines that will access a NUT server
{{!}} [[Setting up a NUT Client]]
{{!}}}
<p class="mwt-heading">See [https://networkupstools.org/docs/man/nut.conf.html the nut.conf documentation] for more details.</p>


* <code>sudo upsdrvctl start</code>
* [[Using NUT with pfSense]]
* <code>ip a</code>
* [[Using NUT to gracefully shut down ESXi]]
* <code>sudo vi /etc/nut/upsd.conf</code>


LISTEN 192.168.2.219
= Managing NUT =
LISTEN 127.0.0.1 3493
The usual:
LISTEN ::1 3493
* <code>sudo service nut-server ['''start'''{{!}}'''stop'''{{!}}'''restart'''{{!}}'''status''']</code>
Client commands:
* <code>upsc '''cyberpower'''</code>
** [https://networkupstools.org/docs/man/upsc.html man page]
* <code>upscmd -l '''cyberpower'''</code>
** [https://networkupstools.org/docs/man/upscmd.html man page]
* <code>upsrw '''cyberpower'''</code>
** [https://networkupstools.org/docs/man/upsrw.html man page]
* <code>nut-scanner</code>
** [https://networkupstools.org/docs/man/nut-scanner.html man page]


* <code>sudo vi /etc/nut/upsd.users</code>
= further Usage Concepts =
* <code>sudo vi /etc/nut/upsmon.conf</code>


= Manage NUT =
NUT gives lots of options.


* <code>sudo service nut-server restart</code>
Things like:
* <code>sudo service nut-server status</code>
* Cleanly shutting down all of the VMs on a server & the server itself too.
* Sending notifications about power issues.
* Managing redundant UPSs on your system.
* etc...


* <code>upsc cyberpower</code>
[[Category:IT]]
* <code>upscmd -l cyberpower</code>
[[Category:Hardware Management]]
[[Category:Linux]]
[[Category:WIP]]

Latest revision as of 10:38, 15 May 2022

Proven on:
Logo Debian.png
11 (bullseye)


As always...

Start with:

  • sudo apt update
  • sudo apt upgrade

Network UPS Tools

Install & Configure NUT

Select your mode

MODE options:
none Disable automatic startup of NUT
standalone This MODE is for local only configuration Standalone NUT usage
netserver This MODE is open to the network. (A NUT server) Setting up a NUT Server
netclient This MODE is for client machines that will access a NUT server Setting up a NUT Client

See the nut.conf documentation for more details.

Managing NUT

The usual:

  • sudo service nut-server [start|stop|restart|status]

Client commands:

further Usage Concepts

NUT gives lots of options.

Things like:

  • Cleanly shutting down all of the VMs on a server & the server itself too.
  • Sending notifications about power issues.
  • Managing redundant UPSs on your system.
  • etc...