## apcupsd.conf v1.1 ## UPSCABLE smart UPSTYPE smartups DEVICE /dev/ttyS0 LOCKFILE /var/lock UPSCLASS standalone UPSMODE disable
Normally you would have many more configuration directives to completely customize your installation, but this example shows you the minimum required.
## apcupsd.conf v1.1 ## UPSCABLE usb UPSTYPE usb DEVICE /dev/usb/hid/hiddev[0-15] LOCKFILE /var/lock UPSCLASS standalone UPSMODE disable
## apcupsd.conf v1.1 ## UPSCABLE smart UPSTYPE smartups DEVICE /dev/ttyS0 LOCKFILE /var/lock UPSCLASS netmaster UPSMODE net NETTIME 10 NETPORT 6666 SLAVE slave1.mynetwork.com SLAVE slave2.mynetwork.com
Note, the main difference from the stand alone configuration is that you have specified UPSCLASS netmaster and UPSMODE net. In addition, you have specified one or more slave machines.
## apcupsd.conf v1.1 ## UPSCABLE ether UPSTYPE smartups LOCKFILE /var/lock UPSCLASS netslave UPSMODE net NETPORT 6666 MASTER master.mynetwork.com
The main difference from the master configuration is that you have specified UPSCABLE ether and UPSCLASS netslave. In addition, you have specified a single controlling master.
In this configuration, the shutdown will be initiated by the master. It is also possible to specify BATTERYLEVEL, MINUTES, and TIMEOUT configuration directives in the Slave machine that will cause the slave to shutdown before the master. This can often be useful if the slave is less important than the master and you wish to reduce battery power consumption so that the master can remain up longer during a power outage.## apcupsd.conf v1.1 ## UPSCABLE ether UPSTYPE net LOCKFILE /var/lock DEVICE server-network-address:3551 UPSCLASS standalone UPSMODE disablewhere on the DEVICE directive you replace the server-network-address with the fully qualified domain name or IP address of a machine running apcupsd with NIS enabled (and normally, but not required, connected to a UPS). The :3551 that follows the server address is the port to use. The default is 3551, but older versions of apcupsd used port 7000.
Please do not confuse this with a master/slave network configuration that is described above. This is a master/slave setup, but much simpler (the master does not know about the slaves), and any NIS server, even a slave, can act as a server to a slave that listens to it.
This mode works principally by reading the STATFLAG record that is sent by the NIS (present in the output of apcaccess). The low 16 bits are the standard APC status flag, and the upper 16 bits represent the internal state of apcupsd, so the slave can see when the power fails and know when to shutdown.