forked from Lainports/freebsd-ports
upslog is a utility that logs UPS status at regular intervals, specified by the -i option. Unfortunately upslog supports only on UPS. For sites that need to monitor multiple UPSs the options are to cobble an rc script for each or doctor up the nut_upslog.in script to support cloning of the script. Unfortunately an rc script capable of being cloned would become the source of more PRs and would require significanly more tehcnical documentation that by itself might become confusing for the average system administrator. Therefore a new -m option is added to support multiple UPSs using the same invocation of upslog. The patch parses a new -m option and using a single connection to upsd, queries it for stats about multiple UPSs. An rc.conf exemple of how to use this new feature: nut_upslog_flags="-p /var/db/nut/upslog.pid -m ups1@localhost,/var/log/nut\ /ups1.log -m ups2@localhost,/var/log/nut/ups2.log" PR: 265963 Reported by: vvd@unislabs.com
16 lines
499 B
Groff
16 lines
499 B
Groff
--- docs/man/upslog.8.orig 2022-08-30 05:56:02.734873000 -0700
|
|
+++ docs/man/upslog.8 2022-08-30 06:09:47.928348000 -0700
|
|
@@ -134,6 +134,13 @@
|
|
upsname[@hostname[:port]]\&. The default hostname is "localhost"\&.
|
|
.RE
|
|
.PP
|
|
+\fB\-m\fR \fItuple\fR
|
|
+.RS 4
|
|
+Monitor multiple UPSs\&. The format for this option is a tuple of
|
|
+ups and logfile separated by commas\&. An example would be:
|
|
+upsname@hostname:9999,/var/log/nut/cps.log
|
|
+.RE
|
|
+.PP
|
|
\fB\-u\fR \fIusername\fR
|
|
.RS 4
|
|
If started as root, upslog will
|