uprecords
Show system uptime records
TLDR
Display a summary of the top 10 historical uptime records
Display the top 25 records
Display the downtime between reboots instead of the kernel version
Show the most recent reboots
Don't truncate information
SYNOPSIS
uprecords [-a] [-h] [-l limit] [-s] [-V]
PARAMETERS
-a
All records: Show all uptime records instead of just the top ones.
-h
Help: Display help message and exit.
-l limit
Limit: Show only the top `limit` uptime records.
-s
Silent: Suppress header output.
-V
Version: Display version information and exit.
DESCRIPTION
The `uprecords` command is a utility that displays the system's best uptime records. It analyzes the `wtmp` and `btmp` log files to determine system boot times and shutdowns, and then presents a ranked list of the longest periods of continuous uptime. This tool provides a valuable insight into system stability and is used to identify potential issues by comparing uptime durations over time. It's especially useful in server environments or any system where consistent uptime is crucial. The output includes the ranking, uptime duration, start and end times of each record. It offers a historical view of system reliability, helping administrators and users understand the system's behavior and identify potential stability concerns, schedule reboots or maintenance, and evaluate the effects of software/hardware updates on the overall uptime and availability. It's an excellent tool for monitoring long-term performance and for verifying the effectiveness of system administration practices focused on maintaining high availability.
CAVEATS
The accuracy of the uptime records depends on the integrity of the `wtmp` and `btmp` files. Log rotation or accidental deletion of these files can lead to incomplete or inaccurate data.
Uptime is considered as a single continuous time when the system is running normally. In cases with sleep or hibernate it may yield incorrect results.
LOG FILES
The `uprecords` command relies primarily on the wtmp and btmp log files. wtmp records user logins, logouts, system starts, and shutdowns. btmp records failed login attempts. `uprecords` parses `wtmp` to identify system boot and shutdown events and calculate uptimes.
UPTIME CALCULATION
Uptime is calculated as the time difference between consecutive system boot events. `uprecords` identifies boot events based on entries in the `wtmp` file. It then ranks these uptimes from longest to shortest, presenting the user with a sorted list of the best uptime records.
LOCALIZATION
The command output is often localized, meaning the date and time formats used in the output are adapted to the user's locale settings. This can be influenced by environment variables such as `LC_TIME` or `LANG`.
HISTORY
The `uprecords` command has been available on Linux systems for a long time, often included in the `uprecords` package or as part of system utilities. Its primary purpose has consistently been to provide a historical record of system uptimes, aiding in system administration and monitoring. It's evolved with the systemd.