tuptime - Man Page

Reports historical and statistical system uptime, preserved across reboots. Total uptime.

Synopsis

tuptime [-h] [-A STARTUP] [-b] [-c] [-d DATETIME_FMT] [-e DECIMALS] [-E STARTUP] [-f FILE] [-g] [-i] [-k] [-l] [-n] [-o TYPE] [-p] [-q] [-r] [-s] [-S STARTUP] [-t] [--tat TIMESTAMP] [--tsince TIMESTAMP] [--tuntil TIMESTAMP] [-U STARTUP] [-v] [-V]

Description

Tuptime reports historical and statistical system uptime, preserved across reboots. Indeed, it can:

Options

Arguments

-h | --helpShow this help message and exit
-A | --at STARTUPLimit to this startup number
-b | --bootidShow boot identifier
-c | --csvOutput in csv format
-d | --date DATETIME_FMTDatetime/timestamp format output
-e | --dec DECIMALSNumber of decimals in percentages
-E | --exclude STARTUPStartup numbers to exclude, comma separated and target ranges with dash (e.g. '2,10-20,50')
-f | --filedb FILEDatabase file (/var/lib/tuptime/tuptime.db)
-g | --gracefulRegister a graceful shutdown
-i | --invertStartup number in reverse count (for -t, -l, --tat) | switch between longest/shortest on default output
-k | --kernelShow kernel version
-l | --listEnumerate system life as list. Mutually exclusive with -t and --tat
-n | --noupAvoid update values into DB
-o | --order TYPEOrder enumerate by [u|r|s|e|d|k]. Only works with -t or -l. (u = uptime | r = runtime | s = sleep time | e = end status | d = downtime | k = kernel)
-p | --powerShow power states run + sleep. Cannot be used in combination with --tsince, --tuntil or --tat
-q | --quietUpdate values into DB without output
-r | --reverseReverse order in listings. Only works with -t or -l
-s | --secondsOutput time in seconds and epoch
-S | --since STARTUPLimit from this startup number
-t | --tableEnumerate system life as table. Mutually exclusive with -l and --tat
--tat TIMESTAMPSystem status at epoch timestamp. Mutually exclusive with -l and -t
--tsince TIMESTAMPLimit from this epoch timestamp
--tuntil TIMESTAMPLimit until this epoch timestamp
-U | --until STARTUPLimit up until this startup number
-v | --verboseVerbose output
-V | --versionShow version

Environment

TUPTIME_DBF

Set an alternative database file path. The argument -f, --filedb takes precedence over this.

Default Output

System startups

Total number of system startups since first timestamp available.

System shutdowns

Total number of shutdowns done correctly or incorrectly.

System life

Time counter since first startup timestamp available.

System uptime / System downtime

Percentage of time and time counter.

Longest uptime / Longest downtime

Time counter and date with the longest/shortest uptime/downtime register.

Average uptime / Average downtime

Average time counter.

Current uptime

Actual time counter and datetime since registered boot timestamp.

Examples

tuptime

Default output.

tuptime -t

Enumerate system life as table. Mutually exclusive with -l and --tat.

tuptime -l

Enumerate system life as list. Mutually exclusive with -t and --tat.

tuptime -k

Add kernel information to the output.

tuptime --csv

Report in csv format.

tuptime -s

Change default human readable datetime/timestamp style and print times in seconds and datetimes in epoch.

tuptime -d '%H:%M:%S %m-%d-%Y'

Change the datetime/timestamp format. By default the output use the configured system locales.

tuptime --tsince -31557600

Report since one year ago.

Files

File paths may vary depending on the operating system and distribution.

/var/lib/tuptime/tuptime.db

Default database file.

/etc/cron.d/tuptime

Scheduled cron file.

/etc/init.d/tuptime

Init file.

/usr/lib/systemd/system/tuptime.service

Systemd service unit file. Register time values into database.

/usr/bin/tuptime

Main and only executable file.

/usr/share/doc/tuptime/

Directory with multiple documentation files.

/usr/lib/systemd/system/tuptime-sync.timer

Systemd .timer unit for use instead of cron. Only executes tuptime-sync.service.

/usr/lib/systemd/system/tuptime-sync.service

Systemd .service unit required by tuptime-sync.timer. Updates time values into database.

/usr/lib/sysusers.d/tuptime.conf

Systemd sysusers configuration file for creating the _tuptime user.

/usr/share/man/man1/tuptime.1

Manual page.

See Also

/usr/share/doc/tuptime/tuptime-manual.txt.gz

Detailed documentation.

https://github.com/rfmoz/tuptime/

Official repository.

Requirements

Python 3.x

Author

Ricardo Fraile <r@rfmoz.eu>

Info

Apr 2026 5.2.6