Nächste: Audio-Dienste, Vorige: Kontinuierliche Integration, Nach oben: Dienste [Inhalt][Index]
The (gnu services pm)
module provides a Guix service definition for
the Linux Power Profiles Daemon, which makes power profiles handling
available over D-Bus.
The available profiles consist of the default ‘balanced’ mode, a ‘power-saver’ mode and on supported systems a ‘performance’ mode.
Wichtig: The
power-profiles-daemon
conflicts with other power management tools liketlp
. Using both together is not recommended.
This is the service type for the
Power
Profiles Daemon. The value for this service is a
power-profiles-daemon-configuration
.
To enable the Power Profiles Daemon with default configuration add this line to your services:
Data type representing the configuration of
power-profiles-daemon-service-type
.
power-profiles-daemon
(default: power-profiles-daemon
) (type: file-like)Package object of power-profiles-daemon.
Das Modul (gnu services pm)
stellt eine Guix-Dienstdefinition für das
Linux-Werkzeug TLP zur Stromverbrauchsverwaltung zur Verfügung.
TLP macht mehrere Stromspar-Modi auf Anwendungsebene („User Space“) und im
Kernel verfügbar. Im Gegensatz zum upower-service
handelt es sich um
kein passives Werkzeug zur Überwachung, sondern TLP passt selbst jedes Mal
Einstellungen an, wenn eine neue Stromquelle erkannt wird. Mehr
Informationen finden Sie auf der TLP-Homepage.
Der Diensttyp für das TLP-Werkzeug. In der Vorgabeeinstellung wird die
Akkulaufzeit für die meisten Systeme optimiert, aber Sie können sie nach
Belieben anpassen, indem Sie eine gültige tlp-configuration
hinzufügen:
(service tlp-service-type
(tlp-configuration
(cpu-scaling-governor-on-ac (list "performance"))
(sched-powersave-on-bat? #t)))
Im Folgenden ist jeder Parameterdefinition ihr Typ vorangestellt. Zum
Beispiel bedeutet ‘Boolescher-Ausdruck foo’, dass der Parameter
foo
als boolescher Ausdruck festgelegt werden sollte. Typen, die mit
Vielleicht-
beginnen, bezeichnen Parameter, die nicht in der
TLP-Konfigurationsdatei vorkommen, wenn Sie keinen Wert für sie setzen oder
den Wert ausdrücklich auf %unset-value
setzen.
Verfügbare tlp-configuration
-Felder sind:
tlp-configuration
-Parameter: „package“ tlp ¶Das TLP-Paket.
tlp-configuration
-Parameter: Boolescher-Ausdruck tlp-enable? ¶Setzen Sie dies auf wahr, wenn Sie TLP aktivieren möchten.
Die Vorgabe ist ‘#t’.
tlp-configuration
-Parameter: Zeichenkette tlp-default-mode ¶Der vorgegebene Modus, wenn keine Stromversorgung gefunden werden kann. Angegeben werden können AC (am Stromnetz) und BAT (Batterie/Akku).
Die Vorgabe ist ‘"AC"’.
tlp-configuration
-Parameter: Nichtnegative-ganze-Zahl disk-idle-secs-on-ac ¶Die Anzahl an Sekunden, die der Linux-Kernel warten muss, bis er sich mit dem Plattenspeicher synchronisiert, wenn die Stromversorgung auf AC steht.
Die Vorgabe ist ‘0’.
tlp-configuration
-Parameter: Nichtnegative-ganze-Zahl disk-idle-secs-on-bat ¶Wie disk-idle-ac
, aber für den BAT-Modus.
Die Vorgabe ist ‘2’.
tlp-configuration
-Parameter: Nichtnegative-ganze-Zahl max-lost-work-secs-on-ac ¶Periodizität, mit der im Zwischenspeicher geänderte Speicherseiten („Dirty Pages“) synchronisiert werden („Cache Flush“), ausgedrückt in Sekunden.
Die Vorgabe ist ‘15’.
tlp-configuration
-Parameter: Nichtnegative-ganze-Zahl max-lost-work-secs-on-bat ¶Wie max-lost-work-secs-on-ac
, aber für den BAT-Modus.
Die Vorgabe ist ‘60’.
tlp-configuration
-Parameter: Vielleicht-Leerzeichengetrennte-Zeichenketten-Liste cpu-scaling-governor-on-ac ¶Regulator der Frequenzskalierung der CPU („Frequency Scaling Governor“) im AC-Modus. Beim intel_pstate-Treiber stehen powersave (stromsparend) und performance (leistungsfähig) zur Auswahl. Beim acpi-cpufreq-Treiber stehen ondemand, powersave, performance und conservative zur Auswahl.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Leerzeichengetrennte-Zeichenketten-Liste cpu-scaling-governor-on-bat ¶Wie cpu-scaling-governor-on-ac
, aber für den BAT-Modus.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl cpu-scaling-min-freq-on-ac ¶Legt die minimale verfügbare Frequenz für den Skalierungsregulator im AC-Modus fest.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl cpu-scaling-max-freq-on-ac ¶Legt die maximale verfügbare Frequenz für den Skalierungsregulator im AC-Modus fest.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl cpu-scaling-min-freq-on-bat ¶Legt die minimale verfügbare Frequenz für den Skalierungsregulator im BAT-Modus fest.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl cpu-scaling-max-freq-on-bat ¶Legt die maximale verfügbare Frequenz für den Skalierungsregulator im BAT-Modus fest.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl cpu-min-perf-on-ac ¶Beschränkt den minimalen Leistungszustand („P-State“), um die Stromverteilung („Power Dissipation“) der CPU im AC-Modus zu regulieren. Werte können als Prozentsatz bezüglich der verfügbaren Leistung angegeben werden.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl cpu-max-perf-on-ac ¶Beschränkt den maximalen Leistungszustand („P-State“), um die Stromverteilung („Power Dissipation“) der CPU im AC-Modus zu regulieren. Werte können als Prozentsatz bezüglich der verfügbaren Leistung angegeben werden.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl cpu-min-perf-on-bat ¶Wie cpu-min-perf-on-ac
im BAT-Modus.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl cpu-max-perf-on-bat ¶Wie cpu-max-perf-on-ac
im BAT-Modus.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Boolescher-Ausdruck cpu-boost-on-ac? ¶Die CPU-Turbo-Boost-Funktionen im AC-Modus aktivieren.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Boolescher-Ausdruck cpu-boost-on-bat? ¶Wie cpu-boost-on-ac?
im BAT-Modus.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Boolescher-Ausdruck sched-powersave-on-ac? ¶Dem Linux-Kernel erlauben, die Anzahl benutzter CPU-Kerne und Hyperthreads anzupassen, wenn er unter leichter Last steht.
Vorgegeben ist ‘#f’.
tlp-configuration
-Parameter: Boolescher-Ausdruck sched-powersave-on-bat? ¶Wie sched-powersave-on-ac?
, aber für den BAT-Modus.
Die Vorgabe ist ‘#t’.
tlp-configuration
-Parameter: Boolescher-Ausdruck nmi-watchdog? ¶Ob die rechtzeitige Behandlung nichtmaskierbarer Unterbrechungen durch den „NMI-Watchdog“ des Linux-Kernels überprüft werden soll.
Vorgegeben ist ‘#f’.
tlp-configuration
-Parameter: Vielleicht-Zeichenkette phc-controls ¶Auf Linux-Kernels, auf die der PHC-Patch angewandt wurde, wird hierdurch die Prozessorspannung angepasst. Ein Beispielwert wäre ‘"F:V F:V F:V F:V"’.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Zeichenkette energy-perf-policy-on-ac ¶Legt das Verhältnis von Prozessorleistung zu Stromsparsamkeit im AC-Modus fest. Angegeben werden können performance (hohe Leistung), normal, powersave (wenig Stromverbrauch).
Die Vorgabe ist ‘"performance"’.
tlp-configuration
-Parameter: Zeichenkette energy-perf-policy-on-bat ¶Wie energy-perf-policy-ac
, aber für den BAT-Modus.
Die Vorgabe ist ‘"powersave"’.
tlp-configuration
-Parameter: Leerzeichengetrennte-Zeichenketten-Liste disks-devices ¶Festplattengeräte.
tlp-configuration
-Parameter: Leerzeichengetrennte-Zeichenketten-Liste disk-apm-level-on-ac ¶Stufe für das „Advanced Power Management“ auf Festplatten.
tlp-configuration
-Parameter: Leerzeichengetrennte-Zeichenketten-Liste disk-apm-level-on-bat ¶Wie disk-apm-bat
, aber für den BAT-Modus.
tlp-configuration
-Parameter: Vielleicht-Leerzeichengetrennte-Zeichenketten-Liste disk-spindown-timeout-on-ac ¶Zeitspanne, bis die Festplatte inaktiv wird (ein „Spin-Down“). Für jede deklarierte Festplatte muss hier je ein Wert angegeben werden.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Leerzeichengetrennte-Zeichenketten-Liste disk-spindown-timeout-on-bat ¶Wie disk-spindown-timeout-on-ac
, aber für den BAT-Modus.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Leerzeichengetrennte-Zeichenketten-Liste disk-iosched ¶Ein-/Ausgaben-Planungsprogramm für Plattengeräte auswählen. Für jede deklarierte Festplatte muss ein Wert angegeben werden. Möglich sind zum Beispiel cfq, deadline und noop.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Zeichenkette sata-linkpwr-on-ac ¶Stufe des „Aggressive Link Power Management“ (ALPM) für SATA. Angegeben werden können min_power (wenigster Stromverbrauch), medium_power (mittlerer Stromverbrauch), max_performance (maximale Leistung).
Die Vorgabe ist ‘"max_performance"’.
tlp-configuration
-Parameter: Zeichenkette sata-linkpwr-on-bat ¶Wie sata-linkpwr-ac
, aber für den BAT-Modus.
Die Vorgabe ist ‘"min_power"’.
tlp-configuration
-Parameter: Vielleicht-Zeichenkette sata-linkpwr-blacklist ¶Bestimmte SATA-Geräte („SATA-Host-Devices“) vom Link Power Management ausschließen.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-An-Aus-Boolescher-Ausdruck ahci-runtime-pm-on-ac? ¶Verwaltung des Stromverbrauchs zur Laufzeit für AHCI-Steuerungseinheiten („Controller“) und AHCI-Platten im AC-Modus aktivieren.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-An-Aus-Boolescher-Ausdruck ahci-runtime-pm-on-bat? ¶Wie ahci-runtime-pm-on-ac
im BAT-Modus.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Nichtnegative-ganze-Zahl ahci-runtime-pm-timeout ¶Nach wie vielen Sekunden der Inaktivität die Platten in den Bereitschaftsmodus gehen („Suspended“).
Die Vorgabe ist ‘15’.
tlp-configuration
-Parameter: Zeichenkette pcie-aspm-on-ac ¶Stufe des „PCI Express Active State Power Management“. Zur Auswahl stehen default (Voreinstellung), performance (hohe Leistung), powersave (wenig Stromverbrauch).
Die Vorgabe ist ‘"performance"’.
tlp-configuration
-Parameter: Zeichenkette pcie-aspm-on-bat ¶Wie pcie-aspm-ac
, aber für den BAT-Modus.
Die Vorgabe ist ‘"powersave"’.
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl start-charge-thresh-bat0 ¶Ab welchem Prozentwert die Batterie 0 anfangen soll, zu laden. Wird nur auf manchen Laptops unterstützt.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl stop-charge-thresh-bat0 ¶Ab welchem Prozentwert die Batterie 0 aufhören soll, zu laden. Wird nur auf manchen Laptops unterstützt.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl start-charge-thresh-bat1 ¶Ab welchem Prozentwert die Batterie 1 anfangen soll, zu laden. Wird nur auf manchen Laptops unterstützt.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Nichtnegative-ganze-Zahl stop-charge-thresh-bat1 ¶Ab welchem Prozentwert die Batterie 1 aufhören soll, zu laden. Wird nur auf manchen Laptops unterstützt.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Zeichenkette radeon-power-profile-on-ac ¶Taktgeschwindigkeitsstufe („Clock Speed Level“) für Radeon-Grafik. Zur Auswahl stehen low (niedrig), mid (mittel), high (hoch), auto (automatisch), default (Voreinstellung).
Die Vorgabe ist ‘"high"’.
tlp-configuration
-Parameter: Zeichenkette radeon-power-profile-on-bat ¶Wie radeon-power-ac
, aber für den BAT-Modus.
Die Vorgabe ist ‘"low"’.
tlp-configuration
-Parameter: Zeichenkette radeon-dpm-state-on-ac ¶Methode für die dynamische Energieverwaltung („Dynamic Power Management“, DPM) auf Radeon. Zur Auswahl stehen battery (Batterie), performance (Leistung).
Die Vorgabe ist ‘"performance"’.
tlp-configuration
-Parameter: Zeichenkette radeon-dpm-state-on-bat ¶Wie radeon-dpm-state-ac
, aber für den BAT-Modus.
Die Vorgabe ist ‘"battery"’.
tlp-configuration
-Parameter: Zeichenkette radeon-dpm-perf-level-on-ac ¶Leistungsstufe („Performance Level“) des Radeon-DPM. Zur Auswahl stehen auto (automatisch), low (niedrig), high (hoch).
Die Voreinstellung ist ‘"auto"’.
tlp-configuration
-Parameter: Zeichenkette radeon-dpm-perf-level-on-bat ¶Wie radeon-dpm-perf-ac
, aber für den BAT-Modus.
Die Voreinstellung ist ‘"auto"’.
tlp-configuration
-Parameter: An-Aus-Boolescher-Ausdruck wifi-pwr-on-ac? ¶WLAN-Stromsparmodus.
Vorgegeben ist ‘#f’.
tlp-configuration
-Parameter: An-Aus-Boolescher-Ausdruck wifi-pwr-on-bat? ¶Wie wifi-power-ac?
, aber für den BAT-Modus.
Die Vorgabe ist ‘#t’.
tlp-configuration
-Parameter: Ja-Nein-Boolescher-Ausdruck wol-disable? ¶Rechnerstart nach Netzwerkanforderung („Wake on LAN“) deaktivieren.
Die Vorgabe ist ‘#t’.
tlp-configuration
-Parameter: Nichtnegative-ganze-Zahl sound-power-save-on-ac ¶Nach wie vielen Sekunden der Stromsparmodus für die Audioverarbeitung auf Intel-HDA- und AC97-Geräten aktiviert wird. Ein Wert von 0 deaktiviert den Stromsparmodus.
Die Vorgabe ist ‘0’.
tlp-configuration
-Parameter: Nichtnegative-ganze-Zahl sound-power-save-on-bat ¶Wie sound-powersave-ac
, aber für den BAT-Modus.
Die Vorgabe ist ‘1’.
tlp-configuration
-Parameter: Ja-Nein-Boolescher-Ausdruck sound-power-save-controller? ¶Steuerungseinheit („Controller“) im Stromsparmodus auf Intel-HDA-Geräten deaktivieren.
Die Vorgabe ist ‘#t’.
tlp-configuration
-Parameter: Boolescher-Ausdruck bay-poweroff-on-bat? ¶Optisches Laufwerk in einer UltraBay/MediaBay im BAT-Modus aktivieren. Laufwerke können erneut gestartet werden, indem Sie den Hebel zum Auswerfen lösen (und wieder einsetzen) oder, auf neueren Modellen, indem Sie den Knopf zum Auswerfen des eingelegten Datenträgers drücken.
Vorgegeben ist ‘#f’.
tlp-configuration
-Parameter: Zeichenkette bay-device ¶Name des Geräts für das optische Laufwerk, das gestartet werden soll.
Die Vorgabe ist ‘"sr0"’.
tlp-configuration
-Parameter: Zeichenkette runtime-pm-on-ac ¶Laufzeitenergieverwaltung („Runtime Power Management“) von PCI(e)-Bus-Geräten. Zur Auswahl stehen on (angeschaltet) und auto (automatisch).
Die Vorgabe ist ‘"on"’.
tlp-configuration
-Parameter: Zeichenkette runtime-pm-on-bat ¶Wie runtime-pm-ac
, aber für den BAT-Modus.
Die Voreinstellung ist ‘"auto"’.
tlp-configuration
-Parameter: Boolescher-Ausdruck runtime-pm-all? ¶Runtime Power Management for all PCI(e) bus devices, except blacklisted ones.
Die Vorgabe ist ‘#t’.
tlp-configuration
-Parameter: Vielleicht-Leerzeichengetrennte-Zeichenketten-Liste runtime-pm-blacklist ¶Die angegebenen PCI(e)-Geräteadressen von der Laufzeitenergieverwaltung („Runtime Power Management“) ausnehmen.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Leerzeichengetrennte-Zeichenketten-Liste runtime-pm-driver-blacklist ¶PCI(e)-Geräte von der Laufzeitenergieverwaltung („Runtime Power Management“) ausnehmen, wenn sie den angegebenen Treibern zugeordnet sind.
tlp-configuration
-Parameter: Boolescher-Ausdruck usb-autosuspend? ¶USB-Geräte automatisch in den Ruhezustand versetzen („USB-Autosuspend“).
Die Vorgabe ist ‘#t’.
tlp-configuration
-Parameter: Vielleicht-Zeichenkette usb-blacklist ¶Die angegebenen Geräte vom USB-Autosuspend ausnehmen.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Boolescher-Ausdruck usb-blacklist-wwan? ¶WWAN-Geräte vom USB-Autosuspend ausnehmen.
Die Vorgabe ist ‘#t’.
tlp-configuration
-Parameter: Vielleicht-Zeichenkette usb-whitelist ¶Für die angegebenen Geräte USB-Autosuspend aktivieren, selbst wenn
Autosuspend durch den Treiber oder wegen usb-blacklist-wwan?
deaktiviert werden würde.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Vielleicht-Boolescher-Ausdruck usb-autosuspend-disable-on-shutdown? ¶USB-Autosuspend vor dem Herunterfahren aktivieren.
Der Vorgabewert ist ‘disabled’ (d.h. deaktiviert).
tlp-configuration
-Parameter: Boolescher-Ausdruck restore-device-state-on-startup? ¶Zustand von funkfähigen Geräten (Bluetooth, WLAN, WWAN) vom letzten Herunterfahren beim Hochfahren des Systems wiederherstellen.
Vorgegeben ist ‘#f’.
tlp-configuration
parameter: string cpu-energy-perf-policy-on-ac ¶Set CPU energy/performance policy when on AC mode. Possible values, in order of increasing power saving, are performance, balance_performance, default, balance_power and power.
tlp-configuration
parameter: string cpu-energy-perf-policy-on-bat ¶Set CPU energy/performance policy when on BAT mode. Possible values, in order of increasing power saving, are performance, balance_performance, default, balance_power and power.
Das Modul (gnu services pm)
stellt eine Schnittstelle zu Thermald zur
Verfügung, einem Dienst zur CPU-Frequenzskalierung („CPU Frequency
Scaling“), mit dem Überhitzung verhindert wird.
Dies ist der Diensttyp für Thermald, den Linux Thermal Daemon, der für die Hitzeregulierung von Prozessoren zuständig ist. Er ändert deren thermischen Zustand („Thermal State“) und verhindert, dass sie überhitzen.
Datentyp, der die Konfiguration des thermald-service-type
repräsentiert.
adaptive?
(Vorgabe: #f
)Die sich anpassenden Tabellen aus DPTF (Dynamic Power and Thermal Framework) benutzen, falls vorhanden.
ignore-cpuid-check?
(Vorgabe: #f
)Ergebnis der Prüfung per CPUID auf unterstützte Prozessormodelle ignorieren.
thermald
(Vorgabe: thermald)Paketobjekt von thermald.
The (gnu services pm)
module also provides a service definition for
PowerTOP, a power consumption analysis and
tuning tool. When started, it tunes Linux kernel settings to reduce power
consumption.
The service type for PowerTOP. No configuration is necessary. When the
service starts, it executes powertop --auto-tune
.
Available powertop-configuration
fields are:
powertop-configuration
parameter: package powertop ¶The PowerTOP package. Defaults to powertop
in the (gnu
packages linux)
module
The (gnu services power)
module provides a service definition for
apcupsd, a utility to interact with
APC (APC by Schneider Electric or formerly American Power
Conversion Corporation) UPS (Uninterruptible Power Supply)
devices. Apcupsd also works with some OEM (Original Equipment
Manufacturer)-branded products manufactured by APC.
The service type for apcupsd. For USB UPSes no configuration is necessary,
however tweaking some fields to better suit your needs might be desirable.
The defaults are taken from the upstream configuration and they are not very
conservative (for example, the default battery-level
of 5% may be
considered too low by some).
The default event handlers do send emails, read more in apcupsd-event-handlers.
Available apcupsd-configuration
fields are:
apcupsd
(default: apcupsd
) (type: package)The apcupsd
package to use.
shepherd-service-name
(default: apcupsd
) (type: symbol)The name of the shepherd service. You can add the service multiple times with different names to manage multiple UPSes.
auto-start?
(default: #t
) (type: boolean)Should the shepherd service auto-start?
pid-file
(default: "/var/run/apcupsd.pid"
) (type: string)The file name of the pid file.
debug-level
(default: 0
) (type: integer)The logging verbosity. Bigger number means more logs. The source code uses
up to 300
as debug level value, so a value of 999
seems
reasonable to enable all the logs.
run-dir
(default: "/var/run/apcupsd"
) (type: string)The directory containing runtime information. You need to change this if you desire to run multiple instances of the daemon.
name
(Typ: Vielleicht-Zeichenkette)Use this to give your UPS a name in log files and such. This is particularly useful if you have multiple UPSes. This does not set the EEPROM. It should be 8 characters or less.
cable
(default: usb
) (type: enum-cable)The type of a cable connecting the UPS to your computer. Possible generic
choices are 'simple
, 'smart
, 'ether
and 'usb
.
Alternatively, a specific cable model number may be used: '940-0119A
,
'940-0127A
, '940-0128A
, '940-0020B
, '940-0020C
,
'940-0023A
, '940-0024B
, '940-0024C
, '940-1524C
,
'940-0024G
, '940-0095A
, '940-0095B
, '940-0095C
,
'940-0625A
, 'M-04-02-2000
.
type
(default: usb
) (type: enum-type)The type of the UPS you have.
apcsmart
Newer serial character device, appropriate for SmartUPS models using a serial cable (not an USB).
usb
Most new UPSes are an USB.
net
Network link to a master apcupsd through apcupsd’s Network Information Server. This is used if the UPS powering your computer is connected to a different computer for monitoring.
snmp
SNMP network link to an SNMP-enabled UPS device.
netsnmp
Same as the SNMP above but requires use of the net-snmp library. Unless you
have a specific need for this old driver, you should use the 'snmp
instead.
dumb
An old serial character device for use with simple-signaling UPSes.
pcnet
A PowerChute Network Shutdown protocol which can be used as an alternative to an SNMP with the AP9617 family of smart slot cards.
modbus
A serial device for use with newest SmartUPS models supporting the MODBUS protocol.
device
(default: ""
) (type: string)For USB UPSes, usually you want to set this to an empty string (the default). For other UPS types, you must specify an appropriate port or address.
apcsmart
Set to the appropriate /dev/tty** device.
usb
A null string setting enables auto-detection, which is the best choice for most installations.
net
Set to hostname:port
.
snmp
Set to hostname:port:vendor:community
. The
hostname is the ip address or hostname of the UPS on the network. The
vendor can be can be "APC" or "APC_NOTRAP". "APC_NOTRAP" will disable
SNMP trap catching; you usually want "APC". The port is usually 161.
The community is usually "private".
netsnmp
Same as the 'snmp
.
dumb
Set to the appropriate /dev/tty** device.
pcnet
Set to ipaddr:username:passphrase:port
. The
ipaddr is the IP address of the UPS management card. The
username and the passphrase are the credentials for which the
card has been configured. The port is the port number on which to
listen for messages from the UPS, normally 3052. If this parameter is empty
or missing, the default of 3052 will be used.
modbus
Set to the appropriate /dev/tty** device. You can also leave it empty for MODBUS over USB or set to the serial number of the UPS.
poll-time
(default: 60
) (type: integer)The interval (in seconds) at which apcupsd polls the UPS for status. This setting applies both to directly-attached UPSes (apcsmart, usb, dumb) and networked UPSes (net, snmp). Lowering this setting will improve the apcupsd’s responsiveness to certain events at the cost of higher CPU utilization.
on-batery-delay
(default: 6
) (type: integer)The time in seconds from when a power failure is detected until we react to
it with an onbattery event. The 'powerout
event will be triggered
immediately when a power failure is detected. However, the
'onbattery
event will be trigger only after this delay.
battery-level
(default: 5
) (type: integer)If during a power failure, the remaining battery percentage (as reported by the UPS) is below or equal to this value, the apcupsd will initiate a system shutdown.
Anmerkung:
battery-level
,remaining-minutes
, andtimeout
work in a conjunction, so the first that occurs will cause the initation of a shutdown.
remaining-minutes
(default: 3
) (type: integer)If during a power failure, the remaining runtime in minutes (as calculated internally by the UPS) is below or equal to this value, apcupsd will initiate a system shutdown.
Anmerkung:
battery-level
,remaining-minutes
, andtimeout
work in a conjunction, so the first that occurs will cause the initation of a shutdown.
timeout
(default: 0
) (type: integer)If during a power failure, the UPS has run on batteries for this many seconds or longer, apcupsd will initiate a system shutdown. The value of 0 disables this timer.
Anmerkung:
battery-level
,remaining-minutes
, andtimeout
work in a conjunction, so the first that occurs will cause the initation of a shutdown.
annoy-interval
(default: 300
) (type: integer)The time in seconds between annoying users (via the 'annoyme
event)
to sign off prior to system shutdown. 0 disables.
annoy-delay
(default: 60
) (type: integer)The initial delay in seconds after a power failure before warning users to get off the system.
no-logon
(default: disable
) (type: enum-no-logon)The condition which determines when users are prevented from logging in during a power failure.
kill-delay
(default: 0
) (type: integer)If this is non-zero, the apcupsd will continue running after a shutdown has been requested, and after the specified time in seconds attempt to kill the power. This is for use on systems where apcupsd cannot regain control after a shutdown.
net-server
(default: #f
) (type: boolean)If enabled, a network information server process will be started.
net-server-ip
(default: "127.0.0.1"
) (type: string)An IP address on which the NIS server will listen for incoming connections.
net-server-port
(default: 3551
) (type: integer)An IP port on which the NIS server will listen for incoming connections.
net-server-events-file
(type: maybe-string)If you want the last few EVENTS to be available over the network by the network information server, you must set this to a file name.
net-server-events-file-max-size
(default: 10
) (type: integer)The maximum size of the events file in kilobytes.
class
(default: standalone
) (type: enum-class)Normally standalone unless you share an UPS using an APC ShareUPS card.
mode
(default: disable
) (type: enum-mode)Normally disable unless you share an UPS using an APC ShareUPS card.
stat-time
(default: 0
) (type: integer)The time interval in seconds between writing the status file, 0 disables.
log-stats
(default: #f
) (type: boolean)Also write the stats as a logs. This generates a lot of output.
data-time
(default: 0
) (type: integer)The time interval in seconds between writing the data records to the log file, 0 disables.
facility
(type: maybe-string)The logging facility for the syslog.
event-handlers
(type: apcupsd-event-handlers)Handlers for events produced by apcupsd.
For a description of the events please refer to ‘man 8 apccontrol’.
Each handler shall be a gexp. It is spliced into the control script for the daemon. In addition to the standard Guile programming environment, the following procedures and variables are also available:
conf
Variable containing the file name of the configuration file.
powerfail-file
Variable containing the file name of the powerfail file.
cmd
The event currently being handled.
name
The name of the UPS as specified in the configuration file.
connected?
Is #t
if apcupsd
is connected to the UPS via a serial port
(or a USB port). In most configurations, this will be the case. In the
case of a Slave machine where apcupsd is not directly connected to the UPS,
this value will be #f
.
powered?
Is #t
if the computer on which apcupsd
is running is
powered by the UPS and #f
if not. At the moment, this value is
unimplemented and always #f
.
(err fmt args...)
Wrapper around format
outputting to (current-error-port)
.
(wall fmt args...)
Wrapper around format
outputting via wall
.
(apcupsd args...)
Call apcupsd
while passing the correct configuration file and all
the arguments.
(mail-to-root subject body)
Send an email to the local administrator. This procedure assumes the
sendmail
is located at /run/privileged/bin/sendmail
(as
would be the case with opensmtpd-service-type
).
Available apcupsd-event-handlers
fields are:
modules
(type: gexp)Additional modules to import into the generated handler script.
killpower
(type: gexp)The handler for the killpower event.
commfailure
(type: gexp)The handler for the commfailure event.
commok
(type: gexp)The handler for the commfailure event.
powerout
(type: gexp)The handler for the powerout event.
onbattery
(type: gexp)The handler for the onbattery event.
offbattery
(type: gexp)The handler for the offbattery event.
mainsback
(type: gexp)The handler for the mainsback event.
failing
(type: gexp)The handler for the failing event.
timeout
(type: gexp)The handler for the timeout event.
loadlimit
(type: gexp)The handler for the loadlimit event.
runlimit
(type: gexp)The handler for the runlimit event.
doreboot
(type: gexp)The handler for the doreboot event.
doshutdown
(type: gexp)The handler for the doshutdown event.
annoyme
(type: gexp)The handler for the annoyme event.
emergency
(type: gexp)The handler for the emergency event.
changeme
(type: gexp)The handler for the changeme event.
remotedown
(type: gexp)The handler for the remotedown event.
startselftest
(type: gexp)The handler for the startselftest event.
endselftest
(type: gexp)The handler for the endselftest event.
battdetach
(type: gexp)The handler for the battdetach event.
battattach
(type: gexp)The handler for the battattach event.
Nächste: Audio-Dienste, Vorige: Kontinuierliche Integration, Nach oben: Dienste [Inhalt][Index]