Wiki GeRgOsNet Notes d’administration système, réseau et domotique

Vous consultez une ancienne version, enregistrée le 12 septembre 2019 par GreG. Voir la version actuelle.

Onduleur

Migration depuis l’ancien wiki MediaWiki

  • Distribution : Debian / Nut version 2.4.3
  • Onduleur : MGE Pulsar Evolution 500 et MGE Pulsat Evolution 1500
  • Installation du paquet :
apt-get install nut
  • Configuration :
  • Ficher nut.conf
pico /etc/nut/nut.conf

MODE=standalone
  • Fichier ups.conf

Il faut trouver vos onduleurs connecter en usb :

lsusb

Donne :

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 005: ID 0463:ffff MGE UPS Systems UPS
Bus 003 Device 004: ID 04e8:328e Samsung Electronics Co., Ltd 
Bus 003 Device 002: ID 0463:ffff MGE UPS Systems UPS
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 0b95:1780 ASIX Electronics Corp. AX88178
Bus 002 Device 002: ID 9710:7830 MosChip Semiconductor MCS7830 Ethernet
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Nos onduleurs sont donc sur les ports : /dev/bus/usb/003/002 et /dev/bus/usb/003/005 . Si vous n'avez qu'un seul onduleur vous pouvez mettre le port en auto .

pico /etc/nut/ups.conf 

[upsreseau]
driver=usbhid-ups
#port=auto
port=/dev/bus/usb/003/002
desc = "MGE 500"

[upsbureau]
driver=usbhid-ups
#port=auto
port=/dev/bus/usb/003/005
desc = "MGE 1500"
  • Fichier upsd.conf
pico /etc/nut/upsd.conf 

MAXAGE 15
LISTEN 127.0.0.1 3493
MAXCONN 1024

Si vous voulez que le serveur reponde à n'importe qu'elle ip :

MAXAGE 15
LISTEN 0.0.0.0 3493
MAXCONN 1024
  • Fichier upsd.users
pico /etc/nut/upsd.users 

[admin]
   password = monpassword
   actions = SET
   instcmds = ALL

[upsmonitor]
   password  = monpassword
   upsmon master
  • Fichier upsmon.conf
pico /etc/nut/upsmon.conf

MONITOR upsreseau@localhost 1 upsmonitor monpassword "master"
MONITOR upsbureau@localhost 1 upsmonitor monpassword "master"

MINSUPPLIES 1 

FINALDELAY 5
HOSTSYNC 15
SHUTDOWNCMD "/sbin/shutdown -h +0"
POWERDOWNFLAG /etc/killpower

POLLFREQ 5
POLLFREQALERT 5
DEADTIME 15
NOCOMMWARNTIME 300
RBWARNTIME 43200
  • Utilisation :
  • Démarrer Nut :
/etc/init.d/nut start
  • Démarrer les drivers en mode debug :
upsdrvctl -DDDD start
  • Liste des onduleurs :
upsc -L

Donne :

upsreseau: MGE 500
upsbureau: MGE 1500
  • Connaitre l'état :
upsc upsreseau
  • Envoyer des commandes à l'onduleur :

Connaitre les commandes dispo :

upscmd -l upsreseau@localhost

Lancer une commande :

upscmd -u admin -p password upsreseau@localhost test.battery.start

Script Cacti :

http://www.eric-a-hall.com/software/cacti-nut/