Onduleur [Réglé]
Impossible de valider la configuration de mon onduleur
Système et matériels / Autres matériels et périphériques
funix Membre non connecté
-
- Voir le profil du membre funix
- Inscrit le : 17/12/2012
- Site internet
- Groupes :
Reprise du message précédent
ok le fichier de config a l'air bon, tu peux taper systemctl status apcupsd pour voir si le daemon est bien lancé, ça doit donner une sortie qui ressemble à çaCaché :
● apcupsd.service - APC UPS Power Control Daemon for Linux
Loaded: loaded (/usr/lib/systemd/system/apcupsd.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-11-01 20:05:26 CET; 1 weeks 4 days ago
Main PID: 894 (apcupsd)
Tasks: 3 (limit: 4685)
Memory: 2.8M
CGroup: /system.slice/apcupsd.service
└─894 /usr/sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf
nov. 01 20:05:26 mana.kervao.fr systemd[1]: Starting APC UPS Power Control Daemon for Linux...
nov. 01 20:05:26 mana.kervao.fr systemd[1]: Started APC UPS Power Control Daemon for Linux.
nov. 01 20:05:26 mana.kervao.fr apcupsd[894]: apcupsd 3.14.14 (31 May 2016) mandrake startup succeeded
nov. 01 20:05:26 mana.kervao.fr apcupsd[894]: NIS server startup succeeded
nov. 02 03:58:54 mana.kervao.fr apcupsd[894]: UPS Self Test switch to battery.
nov. 02 03:59:10 mana.kervao.fr apcupsd[894]: Communications with UPS restored.
nov. 02 03:59:11 mana.kervao.fr apcupsd[894]: UPS Self Test completed: Battery OK
Loaded: loaded (/usr/lib/systemd/system/apcupsd.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-11-01 20:05:26 CET; 1 weeks 4 days ago
Main PID: 894 (apcupsd)
Tasks: 3 (limit: 4685)
Memory: 2.8M
CGroup: /system.slice/apcupsd.service
└─894 /usr/sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf
nov. 01 20:05:26 mana.kervao.fr systemd[1]: Starting APC UPS Power Control Daemon for Linux...
nov. 01 20:05:26 mana.kervao.fr systemd[1]: Started APC UPS Power Control Daemon for Linux.
nov. 01 20:05:26 mana.kervao.fr apcupsd[894]: apcupsd 3.14.14 (31 May 2016) mandrake startup succeeded
nov. 01 20:05:26 mana.kervao.fr apcupsd[894]: NIS server startup succeeded
nov. 02 03:58:54 mana.kervao.fr apcupsd[894]: UPS Self Test switch to battery.
nov. 02 03:59:10 mana.kervao.fr apcupsd[894]: Communications with UPS restored.
nov. 02 03:59:11 mana.kervao.fr apcupsd[894]: UPS Self Test completed: Battery OK
et la commande apcaccess status doit donner quelque chose comme cela
Caché :
APC : 001,038,0987
DATE : 2020-11-13 14:01:18 +0100
HOSTNAME : mana.kervao.fr
VERSION : 3.14.14 (31 May 2016) mandrake
UPSNAME : onduleur
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2020-11-01 20:05:26 +0100
MODEL : Back-UPS XS 950U
STATUS : ONLINE
LINEV : 238.0 Volts
LOADPCT : 16.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 24.4 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
SENSE : Medium
LOTRANS : 155.0 Volts
HITRANS : 280.0 Volts
ALARMDEL : 30 Seconds
BATTV : 13.5 Volts
LASTXFER : Automatic or explicit self test
NUMXFERS : 1
XONBATT : 2020-11-02 03:58:54 +0100
TONBATT : 0 Seconds
CUMONBATT: 16 Seconds
XOFFBATT : 2020-11-02 03:59:10 +0100
LASTSTEST: 2020-11-02 03:58:54 +0100
SELFTEST : NO
STATFLAG : 0x05000008
SERIALNO : 3B1713X09434
BATTDATE : 2017-03-30
NOMINV : 230 Volts
NOMBATTV : 12.0 Volts
NOMPOWER : 480 Watts
FIRMWARE : 925.T2 .I USB FW:T2
END APC : 2020-11-13 14:01:22 +0100
DATE : 2020-11-13 14:01:18 +0100
HOSTNAME : mana.kervao.fr
VERSION : 3.14.14 (31 May 2016) mandrake
UPSNAME : onduleur
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2020-11-01 20:05:26 +0100
MODEL : Back-UPS XS 950U
STATUS : ONLINE
LINEV : 238.0 Volts
LOADPCT : 16.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 24.4 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
SENSE : Medium
LOTRANS : 155.0 Volts
HITRANS : 280.0 Volts
ALARMDEL : 30 Seconds
BATTV : 13.5 Volts
LASTXFER : Automatic or explicit self test
NUMXFERS : 1
XONBATT : 2020-11-02 03:58:54 +0100
TONBATT : 0 Seconds
CUMONBATT: 16 Seconds
XOFFBATT : 2020-11-02 03:59:10 +0100
LASTSTEST: 2020-11-02 03:58:54 +0100
SELFTEST : NO
STATFLAG : 0x05000008
SERIALNO : 3B1713X09434
BATTDATE : 2017-03-30
NOMINV : 230 Volts
NOMBATTV : 12.0 Volts
NOMPOWER : 480 Watts
FIRMWARE : 925.T2 .I USB FW:T2
END APC : 2020-11-13 14:01:22 +0100
Si c'est OK la prochaine étape est de pouvoir monitorer ton onduleur d'un navigateur
clicere83 Membre non connecté
-
- Voir le profil du membre clicere83
- Inscrit le : 29/04/2013
- Groupes :
Funix, les retours des commandes ci-dessous :
Caché :
apcupsd.service - LSB: apcupsd monitors power and takes action if necessary
Loaded: loaded (/etc/rc.d/init.d/apcupsd; generated)
Active: active (running) since Mon 2020-11-16 12:27:37 CET; 50min ago
Docs: man:systemd-sysv-generator(8)
Tasks: 3 (limit: 4915)
Memory: 2.9M
CGroup: /system.slice/apcupsd.service
└─2894 /sbin/apcupsd -f /etc/apcupsd/apcupsd.conf
nov. 16 12:27:37 localhost.localdomain systemd[1]: Starting LSB: apcupsd monitors power and takes action if necessary...
nov. 16 12:27:37 localhost.localdomain apcupsd[2894]: apcupsd 3.14.14 (31 May 2016) mandrake startup succeeded
nov. 16 12:27:37 localhost.localdomain apcupsd[2894]: NIS server startup succeeded
nov. 16 12:27:37 localhost.localdomain apcupsd[2812]: Lancement de la gestion UPS : [ OK ]
nov. 16 12:27:37 localhost.localdomain systemd[1]: Started LSB: apcupsd monitors power and takes action if necessary.
Loaded: loaded (/etc/rc.d/init.d/apcupsd; generated)
Active: active (running) since Mon 2020-11-16 12:27:37 CET; 50min ago
Docs: man:systemd-sysv-generator(8)
Tasks: 3 (limit: 4915)
Memory: 2.9M
CGroup: /system.slice/apcupsd.service
└─2894 /sbin/apcupsd -f /etc/apcupsd/apcupsd.conf
nov. 16 12:27:37 localhost.localdomain systemd[1]: Starting LSB: apcupsd monitors power and takes action if necessary...
nov. 16 12:27:37 localhost.localdomain apcupsd[2894]: apcupsd 3.14.14 (31 May 2016) mandrake startup succeeded
nov. 16 12:27:37 localhost.localdomain apcupsd[2894]: NIS server startup succeeded
nov. 16 12:27:37 localhost.localdomain apcupsd[2812]: Lancement de la gestion UPS : [ OK ]
nov. 16 12:27:37 localhost.localdomain systemd[1]: Started LSB: apcupsd monitors power and takes action if necessary.
Caché :
PC : 001,036,0885
DATE : 2020-11-16 13:19:54 +0100
HOSTNAME : localhost.localdomain
VERSION : 3.14.14 (31 May 2016) mandrake
UPSNAME : localhost.localdomain
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2020-11-16 12:27:37 +0100
MODEL : Back-UPS RS 1500
STATUS : ONLINE
LINEV : 230.0 Volts
LOADPCT : 27.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 126.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
SENSE : High
LOTRANS : 194.0 Volts
HITRANS : 264.0 Volts
ALARMDEL : 30 Seconds
BATTV : 26.9 Volts
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STATFLAG : 0x05000008
SERIALNO : JB0946010357
BATTDATE : 2020-07-25
NOMINV : 230 Volts
NOMBATTV : 24.0 Volts
NOMPOWER : 865 Watts
FIRMWARE : 8.g9a.I USB FW:g9a
END APC : 2020-11-16 13:19:56 +0100
DATE : 2020-11-16 13:19:54 +0100
HOSTNAME : localhost.localdomain
VERSION : 3.14.14 (31 May 2016) mandrake
UPSNAME : localhost.localdomain
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2020-11-16 12:27:37 +0100
MODEL : Back-UPS RS 1500
STATUS : ONLINE
LINEV : 230.0 Volts
LOADPCT : 27.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 126.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
SENSE : High
LOTRANS : 194.0 Volts
HITRANS : 264.0 Volts
ALARMDEL : 30 Seconds
BATTV : 26.9 Volts
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STATFLAG : 0x05000008
SERIALNO : JB0946010357
BATTDATE : 2020-07-25
NOMINV : 230 Volts
NOMBATTV : 24.0 Volts
NOMPOWER : 865 Watts
FIRMWARE : 8.g9a.I USB FW:g9a
END APC : 2020-11-16 13:19:56 +0100
funix Membre non connecté
-
- Voir le profil du membre funix
- Inscrit le : 17/12/2012
- Site internet
- Groupes :
Pour vérifier que le serveur est bien lancé et que tu peux le monitorer si tu lances en root
netstat -paunt | grep 3551
tu devrais avoir quelque chose comme
tcp 0 0 0.0.0.0:3551 0.0.0.0:* LISTEN 894/apcupsd
Maintenant il faut que tu puisses monitorer tout ça d'un navigateur, et là je crains qu'il faille mettre en place un serveur web car ça fonctionne avec du script cgi. Il faut placer le fichier multimon.cgi dans le répertoire cgi-bin de ton serveur et rajouter tu rajoutes dans le fichier /etc/apcupsd/hosts.conf
MONITOR nom-machine "Ma machine"
te concernant localhost pourrait marcher à la place de nom-machine ensuite. Chez moi il y a MONITOR 127.0.0.1 "Local Host"
Ensuite tu accèdes à la page de monitoring avec l'URL http:\\localhost\cgi-bin\multimon.cgi et ça te donne

et en cliquant sur l'onduleur
nic80 Membre non connecté
-
- Voir le profil du membre nic80
- Inscrit le : 06/08/2018
- Groupes :
-
Modérateur
Apcupsd est toujours développé ?
Je vois que la version date de 2016. Et je vois un "mandrake startup succeded", c' est normal sur une Mageia ?
funix Membre non connecté
-
- Voir le profil du membre funix
- Inscrit le : 17/12/2012
- Site internet
- Groupes :
clicere83 Membre non connecté
-
- Voir le profil du membre clicere83
- Inscrit le : 29/04/2013
- Groupes :
tcp 0 0 127.0.0.1:3551 0.0.0.0:* LISTEN 2866/apcupsd
[root@localhost ~]# locate multimon.cgi
/var/www/cgi-bin/multimon.cgi
[root@localhost ~]# cat /etc/apcupsd/hosts.conf
# Network UPS Tools - hosts.conf
#
# This file does double duty - it lists the systems that multimon will
# monitor, and also specifies the systems that upsstats is allowed to
# watch. It keeps people from feeding random addresses to upsstats,
# among other things. upsimage also uses this file to know who it
# may speak to. upsfstats too.
#
# Usage: list systems running upsd that you want to monitor
#
# MONITOR <address> "<host description>"
#
# Please note, MONITOR must start in column 1 (no spaces permitted)
#
# Example:
# MONITOR 10.64.1.1 "Finance department"
# MONITOR 10.78.1.1 "Sierra High School data room #1"
#
MONITOR "Local Host"
MONITOR 127.0.0.1 "Local Host"
https://localhost/cgi-bin/multimon.cgi => KO
Édité par clicere83 Le 18/11/2020 à 12h01
funix Membre non connecté
-
- Voir le profil du membre funix
- Inscrit le : 17/12/2012
- Site internet
- Groupes :
clicere83 Membre non connecté
-
- Voir le profil du membre clicere83
- Inscrit le : 29/04/2013
- Groupes :
J'ai bien la page d'état de mon onduleur.
Par contre, j'ai un message sur la page d'accueil :
Not available: upsfetch: tcp_open failed for "Local port 3551
Merci Funix,
Édité par clicere83 Le 18/11/2020 à 18h25
funix Membre non connecté
-
- Voir le profil du membre funix
- Inscrit le : 17/12/2012
- Site internet
- Groupes :
Sinon il faut que tu retiennes un paramètre dans le fichier apcupsd.conf c'est MINUTES
# If during a power failure, the remaining runtime in minutes
# (as calculated internally by the UPS) is below or equal to MINUTES,
# apcupsd, will initiate a system shutdown.
MINUTES 3
Par défaut au bout de 3min après coupure de courant et donc sous onduleur apcupsd va lancer un arrêt automatique de ta machine, ce délai est évidemment modifiable et dépend de la capacité de ton onduleur.
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie