# tuptime

> System uptime tracking tool that preserves historical uptime/downtime statistics across reboots with detailed reporting

Stars: 318 · Language: Python · License: GPL-2.0 · Categories: System

- Repository: https://github.com/rfmoz/tuptime
- Page: https://www.trmn.sh/tools/tuptime

## Install

- Package Manager: `Available via apt (Debian/Ubuntu), dnf (Fedora), pacman (Arch), pkg (FreeBSD)`
- One-liner Script: `bash < <(curl -Ls https://raw.githubusercontent.com/rfmoz/tuptime/master/tuptime-install.sh)`
- Manual: `git clone --depth=1 https://github.com/rfmoz/tuptime.git && cp tuptime/src/tuptime /usr/bin/tuptime`

## Overview

Tuptime is a system monitoring tool that tracks and reports historical uptime and downtime statistics across system reboots. Unlike the standard uptime command which only shows current session data, tuptime maintains a persistent SQLite database of all system startups and shutdowns, providing comprehensive statistics including longest uptimes, average downtimes, and system reliability metrics.

The tool operates without running as a daemon, executing only during system startup and shutdown events. It includes cron job integration to periodically update records and handle unexpected shutdowns like power failures. Tuptime can output data in multiple formats including tabular views (-t), detailed lists (-l), and CSV format for integration with other tools.

The tool is designed for system administrators who need to track system reliability over time. It provides detailed statistics such as total system life, startup counts, shutdown types (clean vs bad shutdowns), and can filter data by date ranges or boot sessions. Tuptime also handles edge cases like NTP clock adjustments and virtualized environments that can cause false startup records in other monitoring tools.

### Installation

```bash
# via Package Manager
Available via apt (Debian/Ubuntu), dnf (Fedora), pacman (Arch), pkg (FreeBSD)
```

```bash
# via One-liner Script
bash < <(curl -Ls https://raw.githubusercontent.com/rfmoz/tuptime/master/tuptime-install.sh)
```

```bash
# via Manual
git clone --depth=1 https://github.com/rfmoz/tuptime.git && cp tuptime/src/tuptime /usr/bin/tuptime
```

## Alternatives

- [nvitop](https://www.trmn.sh/tools/nvitop.md): Interactive NVIDIA GPU and process monitor in Python with tree view, filtering, signal sending, a CUDA device selector (nvisel), and APIs for custom tools. (Python, 7.2k stars)
- [auto-cpufreq](https://www.trmn.sh/tools/auto-cpufreq.md): Linux CPU speed and power optimizer that adjusts governor and turbo boost based on battery state, CPU load and temperature. Includes CLI, daemon and GUI. (Python, 7.9k stars)
- [bpytop](https://www.trmn.sh/tools/bpytop.md): Terminal-based system resource monitor showing CPU, memory, disk, network and process usage with interactive interface (Python, 10.9k stars)
- [BorgBackup](https://www.trmn.sh/tools/borg.md): Deduplicating backup program with optional compression and authenticated encryption, supporting ssh, sftp, s3, b2 and rclone targets, and mountable archives. (Python, 13.9k stars)
- [glances](https://www.trmn.sh/tools/glances.md): Cross-platform system monitoring tool with real-time stats display via terminal, web interface, or API (Python, 33.9k stars)

---

Canonical: https://www.trmn.sh/tools/tuptime
