upslog - UPS status logger
upslog ups logfile interval [format]
upslog is a daemon that will poll a UPS at periodic intervals, fetch the variables that interest you, format them, and write them to a file.
The default format string includes variables that are supported by many common UPS models. See the description below to make your own.
You can use - for stdout, but upslog will remain in the foreground.
Remember that a poll is not instantaneous, so it will slip back as the program runs. If you require tighter timing, you should write your own logger using the upsfetch library.
%% - insert a single %
%TIME format% - insert the time with strftime formatting
%ETIME% - insert the number of seconds, ala time_t. This is now a 10 digit number.
%HOST% - insert the local hostname
%UPSHOST% - insert the host of the UPS being monitored
%PID% - insert the pid of upslog
%VAR varname% - insert the value of variable varname
The default format string is:
%TIME @Y@m@d @H@M@S% %VAR battpct% %VAR utility% %VAR loadpct% [%VAR status%] %VAR upstemp% %VAR acfreq%
upslog writes its pid to upslog.pid, and will reopen the log file if you send it a SIGHUP. This allows it to keep running when the log is rotated by an external program.
NUT mailing list archives and information: http://lists.exploits.org/
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |