Pages

Thursday, June 29, 2017

tuptime – Shows Historical and Statistical Running Time of Linux Systems

System Administration involves many activities one of which is monitoring and checking for how long your Linux system has been running. It is always a good idea to keep track of system uptime in order to optimize the use of system resources.
Find Linux Uptime, Shutdown and Reboot Time
tuptime – Shows Historical and Statistical Running Time of Linux
In this guide, we shall look at a Linux tool called tuptime that can help System Administrators to know for how long a Linux machine has been up and running.

What is tuptime?

tuptime is a tool used for reporting the historical and statistical running time (uptime) of a Linux system, which keeps it between restarts. This tool works more less like the uptime command but though it provides a more advanced output.
This command line tool can:
  1. Register used kernels.
  2. Register the first boot time.
  3. Count system startups.
  4. Count good and bad shutdowns.
  5. Calculate uptime and downtime percentage since first boot time.
  6. Calculate the largest, shortest and average uptime and downtime.
  7. Calculate the accumulated system uptime, downtime and total.
  8. Print current uptime.
  9. Print formatted table or list with most of the previous values stored.

Requirements

  1. Linux or FreeBSD OS.
  2. Python 2.7 or 3.x installed but latest version is recommended.
  3. Python modules (sys, os, optparse, sqlite3, datetime, locale, platform, subprocess, time).

How to Install tuptime in Linux

First you need to clone the repository by running the command below:
$ git clone https://github.com/rfrail3/tuptime.git
Clone tuptime Tool
Clone tuptime Tool
Then move into the latest directory inside the tuptime directory. Next, copy tuptime script inside the latestdirectory to /usr/bin and set executable permission as shown.
$ cd tuptime/latest 
$ sudo cp tuptime /usr/bin/tuptime
$ sudo chmod ugo+x /usr/bin/tuptime
Configure tuptime
Configure tuptime
Now, copy the cron file tuptime/latest/cron.d/tuptime to /etc/cron.d/tuptime and set executable permission as follows.
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1nBgVo
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment