tuptime: Track Your System Uptime History

If you've ever wondered about your server's actual reliability over time – not just since the last reboot – you need tuptime. While the standard uptime command only tells you how long your system has been running since it last started, tuptime gives you the full historical picture.

tuptime: Track Your System Uptime History

What is tuptime?

tuptime is a tool that tracks and reports historical and statistical uptime data for your Linux systems. It records every boot and shutdown, building a database of your system's availability over time.

Why It Matters

Understanding your system's uptime patterns is valuable for:

  • Reliability metrics – See your actual uptime percentage over weeks, months, or years
  • Maintenance planning – Identify patterns in reboots and downtime
  • Accountability – Document system availability for SLA compliance
  • Curiosity – Find out how many times you've actually rebooted that "always on" server

What You Get

Running tuptime gives you insights like:

  • Total system uptime since installation
  • Number of boots and average uptime per boot
  • Longest and shortest uptimes
  • Current uptime ranking compared to historical boots
  • Uptime percentage over various time periods

The tool can generate reports in multiple formats and even track multiple systems, making it perfect for homelab enthusiasts managing several servers.

Installation

bash

# Debian/Ubuntu
sudo apt install tuptime

# From source
git clone https://github.com/rfmoz/tuptime.git
cd tuptime
sudo install -m 755 tuptime/src/tuptime /usr/bin/tuptime

After installation, enable it to run at boot and shutdown:

bash

sudo systemctl enable tuptime.service
sudo systemctl start tuptime.service

Quick Example

bash

$ tuptime
System startups:	42 since 2024-01-15 10:23:45
System shutdowns:	41 ok - 0 bad
System uptime:		89.2% - 125 days, 3 hours, 15 minutes
System downtime:	10.8% - 15 days, 2 hours, 45 minutes
Average uptime:		2 days, 23 hours, 54 minutes

For anyone running a homelab or managing servers, tuptime is a lightweight way to truly understand your infrastructure's reliability. It's one of those set-it-and-forget-it tools that quietly builds valuable data in the background.