summaryrefslogtreecommitdiff
path: root/sysutils/nut-devel/files/nut_upslog.sample
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-08-21 08:21:51 -0700
committerCy Schubert <cy@FreeBSD.org>2022-08-28 14:16:40 -0700
commitdec4ecc3afecab035a4d4fa59c35093d9f53ffd5 (patch)
tree414c5dcc9f41e47c13e2bdfa9450429614e6ad62 /sysutils/nut-devel/files/nut_upslog.sample
parentsysutils/nut-devel: Disable new nut_monitor feature (diff)
sysutils/nut*: Add upslog support for multiple UPSs
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 -m option and forks almost immediately following the getopt(3) invokation to monitor each individual UPS using a separate upslog process. This is not ideal but better than scripting. Lightweight threads might be a better solution. 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,/var/db/nut/ups1.pid -m ups1@localhost,/var/log/nut/ups2.log,/var\ /db/nut/ups2.pid" Sending a TERM signal to the parent PID, kill `cat /var/db/nut/upslog.pid`, will terminate the entire process tree. This patch submitted upstream, is in the process of being refined and accepted. PR: 265963 Reported by: vvd@unislabs.com
Diffstat (limited to 'sysutils/nut-devel/files/nut_upslog.sample')
0 files changed, 0 insertions, 0 deletions