All Projects → rfrail3 → Tuptime

rfrail3 / Tuptime

Licence: gpl-2.0
Report the historical and statistical real time of the system, keeping it between restarts. Like uptime command but with more interesting output.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tuptime

Democratic Csi
csi storage for container orchestration systems
Stars: ✭ 120 (-43.93%)
Mutual labels:  freebsd
Rar2fs
FUSE file system for reading RAR archives
Stars: ✭ 155 (-27.57%)
Mutual labels:  freebsd
Fnt
apt for fonts, the missing font manager for macOS/linux
Stars: ✭ 187 (-12.62%)
Mutual labels:  freebsd
Serverfarmer
Manage multiple servers with different operating systems, configurations, requirements etc. for many separate customers in an outsourcing model.
Stars: ✭ 122 (-42.99%)
Mutual labels:  freebsd
Rust Battop
Interactive batteries viewer
Stars: ✭ 133 (-37.85%)
Mutual labels:  freebsd
Terrible
An Ansible playbook that apply the principle of the Infrastructure as Code on a QEMU/KVM environment.
Stars: ✭ 161 (-24.77%)
Mutual labels:  freebsd
Mg
Micro (GNU) Emacs-like text editor ❤️ public-domain
Stars: ✭ 117 (-45.33%)
Mutual labels:  freebsd
Minio Service
Collection of MinIO server scripts for upstart, systemd, sysvinit, launchd.
Stars: ✭ 205 (-4.21%)
Mutual labels:  freebsd
Homura
Windows Games Launcher for FreeBSD 🎮
Stars: ✭ 134 (-37.38%)
Mutual labels:  freebsd
Cacule Cpu Scheduler
The CacULE CPU scheduler is based on interactivity score mechanism. The interactivity score is inspired by the ULE scheduler (FreeBSD scheduler).
Stars: ✭ 185 (-13.55%)
Mutual labels:  freebsd
Bsdrp
BSD Router Project
Stars: ✭ 126 (-41.12%)
Mutual labels:  freebsd
Warzone2100
Command the forces of The Project in a battle to rebuild the world after mankind has been nearly destroyed by nuclear missiles. A 100% free and open source real-time strategy game for Windows, macOS, Linux, BSD+
Stars: ✭ 2,094 (+878.5%)
Mutual labels:  freebsd
Objfw
[Official Mirror] A portable framework for the Objective-C language.
Stars: ✭ 161 (-24.77%)
Mutual labels:  freebsd
Freebsd Vscode
Visual Studio Code port for FreeBSD
Stars: ✭ 121 (-43.46%)
Mutual labels:  freebsd
Imunes
Integrated Multiprotocol Network Emulator/Simulator
Stars: ✭ 198 (-7.48%)
Mutual labels:  freebsd
Wikiman
Wikiman is an offline search engine for manual pages, Arch Wiki, Gentoo Wiki and other documentation.
Stars: ✭ 117 (-45.33%)
Mutual labels:  freebsd
Durden
Desktop Environment for Arcan
Stars: ✭ 158 (-26.17%)
Mutual labels:  freebsd
Iowow
The skiplist based persistent key/value storage engine
Stars: ✭ 206 (-3.74%)
Mutual labels:  freebsd
Zfs Snap Diff
helps you with your zfs snapshots
Stars: ✭ 202 (-5.61%)
Mutual labels:  freebsd
Libxo
The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.
Stars: ✭ 185 (-13.55%)
Mutual labels:  freebsd

tuptime

Tuptime is a tool for report the historical and statistical real time of the system, keeping it between restarts. Like uptime command but with more interesting output.

Sample output

Just after install:

System startups:        1  since  21:54:09 24/09/15
System shutdowns:       0 ok  +  0 bad
System life:            21m 30s

System uptime:          100.0%  =  21m 30s
System downtime:        0.0%  =  0s

Average uptime:         21m 30s
Average downtime:       0s

Current uptime:         21m 30s  since  21:54:09 24/09/15

A few days later:

System startups:        110  since  10:15:27 08/08/15
System shutdowns:       107 ok  +  2 bad
System life:            47d 12h 2m 15s

System uptime:          4.04%  =  1d 22h 4m 44s
System downtime:        95.96%  =  45d 13h 57m 30s

Average uptime:         25m 8s
Average downtime:       9h 56m 42s

Current uptime:         23m 33s  since  21:54:09 24/09/15

Swich to -t | --table option:

No.        Startup T.        Uptime         Shutdown T.   End    Downtime
                                                                                                                                
1   10:15:27 08/08/15           42s   10:16:09 08/08/15    OK         16s
2   10:16:26 08/08/15           49s   10:17:15 08/08/15    OK         16s
3   10:17:32 08/08/15        5m 47s   10:23:19 08/08/15    OK         16s
4   10:23:36 08/08/15            9s   10:23:45 08/08/15   BAD         42s
5   10:24:28 08/08/15     2h 9m 27s   12:33:55 08/08/15    OK     41m 44s
    . . .

Or swich to -l | --list option:

Startup:  1  at  10:15:27 08/08/15
Uptime:   42s
Shutdown: OK  at  10:16:09 08/08/15
Downtime: 16s

Startup:  2  at  10:16:26 08/08/15
Uptime:   49s
Shutdown: OK  at  10:17:15 08/08/15
Downtime: 16s

Startup:  3  at  10:17:32 08/08/15
Uptime:   5m 47s
Shutdown: OK  at  10:23:19 08/08/15
Downtime: 16s
. . .

Basic Installation

By package manager

By one-liner script

bash <(curl -Ls https://git.io/tuptime-install.sh)

By manual method

Briefly in a Linux or FreeBSD system...

Clone the repo:

git clone --depth=1 https://github.com/rfrail3/tuptime.git

Copy the 'tuptime' file located under 'latest/' directory to '/usr/bin/' and make it executable:

cp tuptime/src/tuptime /usr/bin/tuptime
chmod ugo+x /usr/bin/tuptime

Assure that the system pass the prerequisites:

python 3.X 

Run first with a privileged user:

tuptime

Pick from 'src/' folder the right file for your cron and init manager, setup both properly. See 'tuptime-manual.txt' for more information.

Highlights about Tuptime internals

  • It doesn't run as a daemon, at least, it only needs execution when the init manager startup and shutdown the system. To avoid issues with a switch off without a proper shutdown, like power failures, a cron job and a .timer unit are shipped with the project to update the registers each n minutes. As a system administrator, you can easily choose the best number for your particular system requirements.

  • It is written in Python using common modules and as few as possible, quick execution, easy to see what is inside it, and modify it for fit for your particular use case.

  • It registers the times in a sqlite database. Any other software can use it. The specs are in the tuptime-manual.txt. Also, it has the option to output the registers in seconds and epoch or/and in csv format, easy to pipe it to other commands.

  • Its main purpose is tracking all the system startups/shutdowns and present that information to the user in a more understandable way. Don't have mail alerts when a milestones are reached or the limitation of keep the last n records.

  • It's written to avoid false startups registers. This is an issue that sometimes happens when the NTP adjust the system clock, on virtualized enviroments, on servers with high load, when the system resynchronized with their RTC clock after a suspend and resume cycle...

  • It can report:

    • Registers as a table or list ordering by any label.
    • The whole life of the system or only a part of it, closing the range between startups/shutdowns or timestamps.
    • Accumulated running and sleeping time over an uptime.
    • The kernel version used and boot idenfiers.
    • The system state at specific point in time.

Alternatives

journalctl --list-boots - Show a tabular list of boot numbers (relative to the current boot), their IDs, and the timestamps of the first and last message pertaining to the boot. Close output than 'tuptime -bit'. https://github.com/systemd/systemd/

uptimed - Is an uptime record daemon keeping track of the highest uptimes a computer system ever had. It uses the system boot time to keep sessions apart from each other. https://github.com/rpodgorny/uptimed

downtimed - Is a program for monitoring operating system downtime, uptime, shutdowns and crashes and for keeping record of such events. https://dist.epipe.com/downtimed/

lastwake - Analyzes the system journal and prints out wake-up and sleep timestamps; for each cycle it tells whether the system was suspended to RAM or to disk (hibernated). https://github.com/arigit/lastwake.py

(bonus) dateutils - Not an alternative, but it is a nifty collection of tools to work with dates. https://github.com/hroptatyr/dateutils

More information

Please, read tuptime-manual.txt for a complete reference guide.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].