Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ History and Statistics tuptime use tools to view Linux server system boot time     - Installation Sublime Text 3 (Build 3065) text editor in Ubuntu (Linux)

- Java Performance Tuning the proxy mode (Programming)

- Ubuntu under Spark development environment to build (Server)

- Nginx Performance Tuning Guidelines (Server)

- C # how to generate a folder or file automatically rename (Programming)

- Difference between TCP and UDP protocols (Linux)

- Seven Steps to Help Google Chrome Speed - (Linux)

- How to configure security services under Linux (Linux)

- MySQL uses Federate engine mapping table to achieve operation of the local remote operation table (Database)

- MySQL development common query summary (Database)

- Cacti Linux-based system monitoring and alarm (Linux)

- How MySQL tracking sql statement (Database)

- Ubuntu Linux to create and increase the Swap partition tutorial (Linux)

- Ubuntu is not in the sudoers file problem solving (Linux)

- RedHat virtual machine to install VMware Tools (Linux)

- Getting CentOS Learning Notes (Linux)

- Search Linux commands and files - which, whereis, locate, find (Linux)

- CentOS7 install JAVA notes (Linux)

- Google open source TCP team repaired the Linux kernel TCP flaw (Linux)

- Ubuntu users to install voice switch instructs the applet (Linux)

 
         
  History and Statistics tuptime use tools to view Linux server system boot time
     
  Add Date : 2018-11-21      
         
         
         
  You can use the following tools to view Linux or Unix-like systems running how long:

uptime: Tell your server running a long time.
lastt: Display the reboot and shutdown times.
tuptime: run-time and historical reporting system run-time statistics, which means that the running time between restart. And uptime command is similar, but the output is more interesting.
Find the last restart the system time and date

You can use the following command to get the Linux operating system, restart and shut down the last time and date (on OSX / Unix-like system can also be used):

### Display system restart and shutdown time
who-b
lastreboot
lastshutdown
### Power Information
uptime
cat / proc / uptime
awk '{print "up" $ 1/60 "minutes"}' / proc / uptime
w

Server boot time for finding multiple Linux commands

With tuptime asked to say hello

tuptime command-line tool can report the following information based on the Linux system:

Starts statistical system
Register first start time (ie installation time)
Normal shutdown and accidental shutdown statistics
The average boot time and downtime
Current boot time
Start-up and downtime rate for the first time since the start
Accumulation system uptime, downtime and total
Report every time you start, boot time, shutdown and downtime
installation

Enter the following command to clone the git repository to a Linux system:

$ Cd / tmp
$ Gitclone https://github.com/rfrail3/tuptime.git
$ Ls
$ Cd tuptime
$ Ls

Clone git repository

Make sure you install Python v2.7 with sys, optparse, os, re, string, sqlite3, datetime, disutils and locale module.

You can be installed like this:

$ Sudo tuptime-install.sh
Alternatively, you can manually install (or based on systemd systemd):

$ Sudocp / tmp / tuptime / latest / cron.d / tuptime /etc/cron.d/tuptime
If the system is systemd, copying files and enable the service:

$ Sudocp / tmp / tuptime / latest / systemd / tuptime.service / lib / systemd / system /
$ Sudosystemctl enable tuptime.service
If the system is not systemd, copying the initialization file:

$ Sudocp / tmp / tuptime / latest / init.d / tuptime.init.d-debian7 /etc/init.d/tuptime
$ Sudo update-rc.d tuptime defaults
run

Simply enter the following command:

$ Sudo tuptime

tuptime work

After a kernel update, I restart the system, and then enter the same command again:

$ Sudo tuptime
System startups: 2 since 03:52:16 PM 08/21/2015
System shutdowns: 1 ok -0 bad
Averageuptime: 7 days, 16 hours, 48 minutes and3 seconds
Average downtime: 2 hours, 30 minutes and5 seconds
Currentuptime: 5 minutes and28 seconds since 06:23:06 AM 09/06/2015
Uptime rate: 98.66%
Downtime rate: 1.34%
Systemuptime: 15 days, 9 hours, 36 minutes and7 seconds
System downtime: 5 hours, 0 minutes and11 seconds
System life: 15 days, 14 hours, 36 minutes and18 seconds
You may like this modification date and time format:

$ Sudo tuptime -d '% H:% M:% S% m-% d-% Y'
Sample output:

System startups: 1 since 15: 52: 1608-21-2015
System shutdowns: 0 ok -0 bad
Averageuptime: 15 days, 9 hours, 21 minutes and19 seconds
Average downtime: 0 seconds
Currentuptime: 15 days, 9 hours, 21 minutes and19 seconds since 15: 52: 1608-21-2015
Uptime rate: 100.0%
Downtime rate: 0.0%
Systemuptime: 15 days, 9 hours, 21 minutes and19 seconds
System downtime: 0 seconds
System life: 15 days, 9 hours, 21 minutes and19 seconds
Count each boot, boot time, shutdown and downtime:

$ Sudo tuptime -e
Sample output:

Startup: 1 at 03:52:16 PM 08/21/2015
Uptime: 15 days, 9 hours, 22 minutes and33 seconds
System startups: 1 since 03:52:16 PM 08/21/2015
System shutdowns: 0 ok -0 bad
Averageuptime: 15 days, 9 hours, 22 minutes and33 seconds
Average downtime: 0 seconds
Currentuptime: 15 days, 9 hours, 22 minutes and33 seconds since 03:52:16 PM 08/21/2015
Uptime rate: 100.0%
Downtime rate: 0.0%
Systemuptime: 15 days, 9 hours, 22 minutes and33 seconds
System downtime: 0 seconds
System life: 15 days, 9 hours, 22 minutes and33 seconds
     
         
         
         
  More:      
 
- Python function arguments * args and ** kwargs usage (Programming)
- Compile and install Ubuntu Linux 4.0.5 kernel, network and fix vmware kernel module compilation error (Linux)
- RHEL6 install Python and other packages from source (Linux)
- Oracle view object space usage show_space (Database)
- To help you easily protect the Linux System (Linux)
- Under Ubuntu on how to use iptables firewall (Linux)
- EChart simple and practical control on chart (Programming)
- Process monitoring tools Supervisor start MongoDB (Database)
- In Debian 4.3 compiler under Linux-2.6.28 kernel Summary (Programming)
- Why I do not like the Go language style interface (ie Structural Typing) (Programming)
- How to find the available network adapter on Ubuntu (Linux)
- Under CentOS yum install Nginx smooth switch mounted to Tengine (Server)
- SVN hook code set to synchronize Web directory (Server)
- Understanding the type in C ++ bitset (Programming)
- GitHub multiplayer co-development configuration (Linux)
- C ++ Supplements - Smart Pointers (Programming)
- Graphics of Java Tools (Programming)
- Linux start the process (Linux)
- Linux system security (Linux)
- Apache Spark1.1.0 deployment and development environment to build (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.