POWERD(8)

πŸ“¦
version 2.0.2 Β· 2 versions
, in opensuse-leap 16.0

πŸ’– POWERD(8) β€” the UPS-watching bestie πŸ’–

okay so this is a System Manager's Manual page, bestie, and it's about powerd 🫢


✨ NAME ✨

powerd β€” the UPS monitoring daemon πŸ”‹πŸ‘‘


🌸 SYNOPSIS 🌸

/sbin/powerd [tty]

πŸ¦‹ DESCRIPTION πŸ¦‹

So powerd literally just sits there watching the serial port that's hooked up to your UPS device, and if that UPS has been running on battery for longer than a set number of minutes, it will perform an unattended shutdown of the system. no cap, it just does it for you πŸ’…

powerd needs to watch a tty with modem control properties, periodt. please refer to the powerd documentation for further information ✨

powerd also has the capabilities of notifying other clients on the network that may have a UPS but not be connected to the serial line, telling them there is a power outage β€” and this is configured through the powerd.conf file πŸŽ€


πŸŽ€ CONFIGURATION FILE πŸŽ€

here's the configuration format, bestie β€” and note that lines beginning with # are ignored πŸ™ˆ

  • MODE <mode> β€” specifies the mode the UPS should be in. Valid arguements are MONITOR and PEER. MONITOR being the mode to actually watch a UPS serial port, and PEER being to listen for a connection from a machine in MONITOR mode πŸ‘‘
  • MONITOR <device> β€” specifies which device to monitor while in MONITOR mode. specify an actual device file. Example: /dev/ttyS0 πŸ“
  • POWERFAIL <line> <high|low> β€” specifies which lines on the serial ports indicate that the power is out. Valid arguements are DCD, CAR, CTS, and RNG. also specify if the line being HIGH or LOW indicates a power failure. since most people may not know this arguement, please use the enclosed upsdetect program to automatically find this line πŸ”₯
like, genuinely use upsdetect for that one β€” nobody's out here memorizing serial line states πŸ’€
  • NOTIFY <hostname[:port]> <password> β€” specified in MONITOR mode to notify a client running in PEER mode. specify the hostname of the machine, and optional port the daemon is running on, and the password as specified by their LISTEN command. see below for more details πŸ’–
  • LISTEN <hostname> <password> β€” specified in PEER mode, specifies a hostname that is allowed to notify us of when the power is out, and the password they shall give us to authenticate themselves. the 2 passwords should match on the MONITOR mode machine's NOTIFY password, and the PEER mode's LISTEN password 🌈
  • LISTENPORT <port> β€” specified in PEER mode, specifies the port that powerd should listen on. if you use this arguement, powerd shall not default to using port 532, and the machine in MONITOR mode must specify the port you use in their NOTIFY command ⭐
  • DELAY <delayinseconds> β€” specifies how many seconds before notifying init of a power outage. note that this doesnt mean that the system will shut down in that many seconds, as it depends on how init is configured. init usually issues a 2 min shutdown ⏳
  • USER <username> β€” specifies which username to drop to from root. the program will reobtain root access only when it needs to, like when notifying init that the power is out. this is simply a security feature, and not needed for powerd to operate. Note: powerd must still be run initially as root. it will then drop to the user if, and only if, a username is specified πŸ”

🧚 ARGUMENTS 🧚

None: please use the configuration file /etc/powerd.conf, which can be generated with detectups. see detectups(8) for more information ✨


πŸ’œ FILES πŸ’œ

  • /etc/powerd.conf β€” powerd configuration file
  • /var/run/powerstatus β€” indicates line power status

πŸ‘‘ SEE ALSO πŸ‘‘

powerd(8), shutdown(8), wall(1), init(8).


🌸 AUTHOR 🌸

James Brents <James@nistix.com> (with parts of this man page borrowed from all over the Linux community) 🫢


okay that's the whole page, bestie β€” and just so you have the receipts: this was from the System Manager's Manual for POWERD(8), mwah πŸ’…πŸ’–πŸŽ€

πŸ“¦ where this page comes from