downtimed8
System downtime monitoring and reporting daemon
Usage
downtimed [-D]
[-d
datadir]
[-F]
[-f
timefmt]
[-l
log]
[-p
pidfile]
[-S]
[-s
sleep]
downtimed -v
Overview
The downtimed daemon waits in the background, frequently updating a time stamp file on the disk. If the daemon is killed with a signal associated with a normal system shutdown procedure, it records the shutdown time on the disk.
When the daemon is restarted during the next boot process, it reports how long the system was down and whether it was properly shut down or crashed. The downtime report is output to the system log or to a specified log file. Also a record is appended to the downtime database.
Options
-
-D -
Do not create nor update the downtime database.
-
-d datadir -
The directory where the time stamp files as well as the downtime database are located. The default directory is determined at compile time.
-
-f timefmt -
Specify the time and date format to use when reporting using strftime(3) syntax. The default is "%F %T".
-
-l log -
Logging destination. If the argument contains a slash (/) it is interpreted to be a path name to a log file, which will be created if it does not exist already. Otherwise it is interpreted as a syslog facility name. The default logging destination is "daemon" which means that the messages are written to syslog with the daemon facility code.
-
-p pidfile -
The location of the file which keeps track of the process ID of the running daemon process. The system default location is determined at compile time. May be disabled by specifying "none".
-
-s sleep -
Defines how long to sleep between each update of the on-disk time stamp file. More frequent updates result in more accurate downtime reporting in the case of a system crash. Less frequent updates decrease the amount of disk writes performed. The default is to sleep 15 seconds between each update. If you are using a flash memory based SSD or other disk which has limited amount of write cycles per block, it might be a good idea to set the sleep time to a higher value to prolong the lifetime of the storage device.
-
-v -
Display the program version number, copyright message and the default settings.
Signals
- SIGHUP
-
Close and re-open the output log. Use in case you want to rotate the log file.
- SIGTERM and SIGINT
-
Terminate gracefully. These signals signify that a graceful system shutdown is in process.
Exit status
The daemon exits 0 on success, and >0 if an error occurs.
Releases
7 releases since Debian 7 (Wheezy); the text changed 2 times.
-F since Debian 9 (Stretch);
-f since Debian 8 (Jessie).