ubuntu:ups
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| ubuntu:ups [2026/07/19 12:14] – [Smart-UPS einrichten Master] franz | ubuntu:ups [2026/08/25 11:35] (aktuell) – [Voraussetzungen] franz | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== NUT-Master für APC Smart-UPS SMC1500IC unter Ubuntu einrichten\\ | + | ====== |
| - | Master ====== | + | |
| - | + | ||
| - | + | ||
| - | ====== UPS einrichten Master | + | |
| Zeile 24: | Zeile 20: | ||
| Der SmartConnect-Netzwerkanschluss ersetzt die USB-Verbindung für NUT nicht.\\ | Der SmartConnect-Netzwerkanschluss ersetzt die USB-Verbindung für NUT nicht.\\ | ||
| </ | </ | ||
| - | |||
| ===== Voraussetzungen ===== | ===== Voraussetzungen ===== | ||
| Zeile 34: | Zeile 29: | ||
| * Root- oder sudo-Berechtigung | * Root- oder sudo-Berechtigung | ||
| - | Beispiel-IP des NUT-Masters: | + | Beispiel-IP des NUT-Masters: |
| - | + | ||
| - | < | + | |
| - | 192.168.1.20 | + | |
| - | + | ||
| - | </ | + | |
| Diese Adresse muss durch die tatsächliche IP-Adresse des Servers ersetzt werden. | Diese Adresse muss durch die tatsächliche IP-Adresse des Servers ersetzt werden. | ||
| Zeile 146: | Zeile 136: | ||
| Die Datei ''/ | Die Datei ''/ | ||
| + | |||
| <code bash> | <code bash> | ||
| sudo nano / | sudo nano / | ||
| - | |||
| </ | </ | ||
| Zeile 160: | Zeile 150: | ||
| vendorid = \051d | vendorid = \051d | ||
| desc = "APC Smart-UPS SMC1500IC" | desc = "APC Smart-UPS SMC1500IC" | ||
| - | |||
| </ | </ | ||
| Zeile 166: | Zeile 155: | ||
| Bedeutung der Einstellungen: | Bedeutung der Einstellungen: | ||
| - | ^Einstellung^Bedeutung| | | | | | | | | | | | | | + | ^ Einstellung ^ Bedeutung |
| - | |'' | + | | '' |
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| Wenn mehrere APC-USV-Geräte am selben Server angeschlossen sind, kann zusätzlich die Produkt-ID angegeben werden: | Wenn mehrere APC-USV-Geräte am selben Server angeschlossen sind, kann zusätzlich die Produkt-ID angegeben werden: | ||
| - | <code ini> | + | <code ini>\\ |
| - | productid = 0003\ | + | productid = 0003\\ |
| </ | </ | ||
| Zeile 186: | Zeile 178: | ||
| productid = \0003 | productid = \0003 | ||
| desc = "APC Smart-UPS SMC1500IC" | desc = "APC Smart-UPS SMC1500IC" | ||
| - | |||
| </ | </ | ||
| - | |||
| - | |||
| - | |||
| ===== 6. IP-Adresse des Servers feststellen ===== | ===== 6. IP-Adresse des Servers feststellen ===== | ||
| Zeile 331: | Zeile 319: | ||
| <code ini> | <code ini> | ||
| MONITOR apc@localhost 1 monmaster MASTER_PASSWORT_HIER_EINTRAGEN master | MONITOR apc@localhost 1 monmaster MASTER_PASSWORT_HIER_EINTRAGEN master | ||
| - | |||
| MINSUPPLIES 1 | MINSUPPLIES 1 | ||
| - | |||
| SHUTDOWNCMD "/ | SHUTDOWNCMD "/ | ||
| - | |||
| POWERDOWNFLAG / | POWERDOWNFLAG / | ||
| + | |||
| </ | </ | ||
| + | |||
| ==== Ubuntu 24.04 beziehungsweise NUT 2.8 ==== | ==== Ubuntu 24.04 beziehungsweise NUT 2.8 ==== | ||
| Zeile 369: | Zeile 356: | ||
| Die Konfigurationsdateien enthalten Passwörter und sollten nur für root und die Gruppe '' | Die Konfigurationsdateien enthalten Passwörter und sollten nur für root und die Gruppe '' | ||
| - | <code bash> | ||
| - | sudo chown root:nut / | ||
| + | <code bash>\\ | ||
| + | sudo chown root:nut / | ||
| </ | </ | ||
| Zeile 377: | Zeile 364: | ||
| <code bash> | <code bash> | ||
| sudo chmod 640 / | sudo chmod 640 / | ||
| - | |||
| </ | </ | ||
| Zeile 385: | Zeile 371: | ||
| <code bash> | <code bash> | ||
| ls -l / | ls -l / | ||
| - | |||
| </ | </ | ||
| Eine mögliche Ausgabe lautet: | Eine mögliche Ausgabe lautet: | ||
| + | < | ||
| - | < | ||
| -rw-r----- 1 root nut / | -rw-r----- 1 root nut / | ||
| -rw-r----- 1 root nut / | -rw-r----- 1 root nut / | ||
| </ | </ | ||
| - | |||
| ===== 11. NUT-Dienste starten ===== | ===== 11. NUT-Dienste starten ===== | ||
| Zeile 462: | Zeile 446: | ||
| <code bash> | <code bash> | ||
| upsc apc@\localhost | upsc apc@\localhost | ||
| + | |||
| </ | </ | ||
| Zeile 469: | Zeile 454: | ||
| <code bash> | <code bash> | ||
| upsc apc@localhost ups.\model | upsc apc@localhost ups.\model | ||
| + | |||
| </ | </ | ||
| Zeile 474: | Zeile 460: | ||
| <code bash> | <code bash> | ||
| upsc apc@localhost ups.\status | upsc apc@localhost ups.\status | ||
| + | |||
| </ | </ | ||
| Zeile 479: | Zeile 466: | ||
| <code bash> | <code bash> | ||
| upsc apc@localhost battery.\charge | upsc apc@localhost battery.\charge | ||
| + | |||
| </ | </ | ||
| Zeile 484: | Zeile 472: | ||
| <code bash> | <code bash> | ||
| upsc apc@localhost battery.\runtime | upsc apc@localhost battery.\runtime | ||
| + | |||
| </ | </ | ||
| Zeile 489: | Zeile 478: | ||
| <code bash> | <code bash> | ||
| upsc apc@localhost ups.\load | upsc apc@localhost ups.\load | ||
| + | |||
| </ | </ | ||
| Zeile 495: | Zeile 485: | ||
| < | < | ||
| - | \OL | + | OL |
| </ | </ | ||
| Zeile 501: | Zeile 491: | ||
| Wichtige Statusmeldungen: | Wichtige Statusmeldungen: | ||
| - | ^ Status ^ Bedeutung | + | ^Status^Bedeutung| | | | | | | | | | | | | | | | | | | | | | |
| - | | '' | + | |'' |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| Mehrere Statuswerte können gleichzeitig angezeigt werden. | Mehrere Statuswerte können gleichzeitig angezeigt werden. | ||
| Zeile 515: | Zeile 498: | ||
| Beispiel: | Beispiel: | ||
| < | < | ||
| - | \\ | + | |
| - | OL CHRG\\ | + | \ |
| + | OL CHRG\ | ||
| </ | </ | ||
| Zeile 522: | Zeile 506: | ||
| Das bedeutet: | Das bedeutet: | ||
| - | * Netzversorgung \vorhanden | + | * Netzversorgung \vorhanden * Batterie wird geladen |
| - | * Batterie wird geladen | + | |
| ===== 13. Netzwerkzugriff mit UFW erlauben ===== | ===== 13. Netzwerkzugriff mit UFW erlauben ===== | ||
| Zeile 627: | Zeile 611: | ||
| Der folgende Befehl darf nicht während des normalen Betriebs testweise ausgeführt werden: | Der folgende Befehl darf nicht während des normalen Betriebs testweise ausgeführt werden: | ||
| - | <code bash>\\ | + | <code bash> |
| - | upsdrvctl shutdown\\ | + | upsdrvctl shutdown |
| </ | </ | ||
| Zeile 635: | Zeile 620: | ||
| Dadurch verlieren alle an der USV angeschlossenen Geräte unmittelbar ihre Stromversorgung. | Dadurch verlieren alle an der USV angeschlossenen Geräte unmittelbar ihre Stromversorgung. | ||
| + | |||
| ===== 17. Fehlerdiagnose ===== | ===== 17. Fehlerdiagnose ===== | ||
| Zeile 642: | Zeile 628: | ||
| <code bash> | <code bash> | ||
| lsb_release -\a | lsb_release -\a | ||
| + | |||
| </ | </ | ||
| Zeile 648: | Zeile 635: | ||
| <code bash> | <code bash> | ||
| - | \lsusb | + | lsusb |
| </ | </ | ||
| Zeile 656: | Zeile 644: | ||
| <code bash> | <code bash> | ||
| sudo systemctl status nut-server nut-monitor --no-\pager | sudo systemctl status nut-server nut-monitor --no-\pager | ||
| + | |||
| </ | </ | ||
| Zeile 663: | Zeile 652: | ||
| <code bash> | <code bash> | ||
| sudo journalctl -u nut-server -u nut-monitor -n 100 --no-\pager | sudo journalctl -u nut-server -u nut-monitor -n 100 --no-\pager | ||
| + | |||
| </ | </ | ||
| Zeile 670: | Zeile 660: | ||
| <code bash> | <code bash> | ||
| sudo journalctl -u nut-driver-enumerator.service -u nut-server.service -u nut-monitor.service -n 150 --no-\pager | sudo journalctl -u nut-driver-enumerator.service -u nut-server.service -u nut-monitor.service -n 150 --no-\pager | ||
| + | |||
| </ | </ | ||
| + | |||
| ==== Fehler: Driver failed to start ==== | ==== Fehler: Driver failed to start ==== | ||
| Zeile 768: | Zeile 760: | ||
| ==== / | ==== / | ||
| - | <code ini>\\ | + | <code ini> |
| - | MODE=netserver\\ | + | MODE=netserver |
| </ | </ | ||
| + | |||
| ==== / | ==== / | ||
| - | <code ini>\\ | + | <code ini> |
| - | [apc]\\ | + | [apc] |
| - | driver = usbhid-ups\\ | + | driver = usbhid-ups |
| - | port = auto\\ | + | port = auto |
| - | vendorid = 051d\\ | + | vendorid = 051d |
| - | desc = "APC Smart-UPS SMC1500IC" | + | desc = "APC Smart-UPS SMC1500IC" |
| </ | </ | ||
| + | |||
| ==== / | ==== / | ||
| - | <code ini>\\ | + | <code ini> |
| - | LISTEN 127.0.0.1 3493\\ | + | LISTEN 127.0.0.1 3493\ |
| - | LISTEN 192.168.1.20 3493\\ | + | LISTEN 192.168.1.20 3493\ |
| </ | </ | ||
| + | |||
| ==== / | ==== / | ||
| - | <code ini>\\ | + | <code ini> |
| - | [monmaster]\\ | + | [monmaster] |
| - | password = MASTER_PASSWORT_HIER_EINTRAGEN\\ | + | password = MASTER_PASSWORT_HIER_EINTRAGEN\ |
| upsmon master | upsmon master | ||
| - | [monclient]\\ | + | [monclient] |
| - | password = CLIENT_PASSWORT_HIER_EINTRAGEN\\ | + | password = CLIENT_PASSWORT_HIER_EINTRAGEN\ |
| - | upsmon slave\\ | + | upsmon slave |
| </ | </ | ||
| + | |||
| ==== / | ==== / | ||
| - | <code ini>\\ | + | <code ini> |
| MONITOR apc@localhost 1 monmaster MASTER_PASSWORT_HIER_EINTRAGEN master | MONITOR apc@localhost 1 monmaster MASTER_PASSWORT_HIER_EINTRAGEN master | ||
| - | |||
| MINSUPPLIES 1 | MINSUPPLIES 1 | ||
| - | |||
| SHUTDOWNCMD "/ | SHUTDOWNCMD "/ | ||
| + | POWERDOWNFLAG / | ||
| - | POWERDOWNFLAG / | ||
| </ | </ | ||
| + | |||
| ===== Ergebnis ===== | ===== Ergebnis ===== | ||
| Zeile 822: | Zeile 821: | ||
| Nach erfolgreicher Einrichtung sollte folgender Befehl die USV-Daten anzeigen: | Nach erfolgreicher Einrichtung sollte folgender Befehl die USV-Daten anzeigen: | ||
| - | <code bash>\\ | + | <code bash> |
| - | upsc apc@localhost\\ | + | upsc apc@localhost |
| </ | </ | ||
| Bei normaler Netzversorgung sollte unter anderem folgender Status erscheinen: | Bei normaler Netzversorgung sollte unter anderem folgender Status erscheinen: | ||
| + | |||
| < | < | ||
| - | \\ | + | ups.status: OL |
| - | ups.status: OL\\ | + | |
| </ | </ | ||
ubuntu/ups.1784456069.txt.gz · Zuletzt geändert: von franz