Linux Command for Uptime

29/12/2020
Chưa phân loại
Uptime is the time a device, usually a server, is available, turned on and connected without interruption. Among Sysadmins the uptime of a server may be interesting to evaluate the components and configuration, for example, I have an old Slackware server with over 3 years of uptime without human intervention, showing evidence of Slackware stability.

The Linux command uptime is capable of showing the current time, the total uptime time, the quantity of logged in users and the average number of uninterrupted executed processes. This tutorial shows the few ways in which the command uptime allows to print the information.

Linux Command for Uptime

To begin run the command “uptime” without flags as shown in the screenshot below:

# uptime

The first column shows the current time, the second column shows the system is up, the third column should the total uptime (the server was available without interruption for 8:56 hours when checked), the fourth column shows the  number of logged users, the load average.

Note: System  load  averages is the average number of processes that are either in a runnable or uninterruptible state.  A  process in  a runnable state is either using the CPU or waiting to use the CPU.  A process in uninterruptible state  is  waiting  for some  I/O access, eg waiting for disk.  The averages are taken over the three time intervals.  Load averages are not  normal‐ized  for the number of CPUs in a system, so a load average of1 means a single CPU system is loaded all the time while on  a4 CPU system it means it was idle 75% of the time. (source: https://linux.die.net/man/1/uptime).

To show since when was the device online without interruption (the uptime chronological origin) add the -s flag:

# uptime -s

The last option given by the uptime command is -p and it shows the total of uptime.

# uptime -p

Additional information on the uptime tool:

OPTIONS

-p, –pretty – show uptime in pretty format
-h, –help – display this help text and exit.
-s, –since – system up since, in yyyy-mm-dd HH:MM:SS format
-V, –version – display version information and exit

FILES
/var/run/utmp information about who is currently logged on
/proc  process information

The Linux command for uptime doesn’t have too much option, yet you can get additional descriptions of this tool on the man page or online at https://linux.die.net/man/1/uptime.

There are related commands recommended by uptime’s man page such as ps and top for which you can read Using ps command on linux or Top’s man page.

I hope you found this brief article on Linux Command for Uptime useful, thank you for reading it.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to install Sweet Home 3D 5.4 on Linux

Sweet Home 3D 5.4 latest release, is a free interior design app that helps you draw the floor plan of your house, arrange...
28/12/2020

Debian Network Interface Setup

The knowledge regarding the setup of a network interface in Debian GNU/Linux and Debian-related distributions is essential...
29/12/2020

[10 phút ][Ansible] [Cơ bản] [Phần 1] Ansile dùng để làm gì?

Làm hạ tầng giống như làm lập trình (nôm na của câu “Infrastructure As Code”) mà trong các...
30/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

mua Proxy riêng ở đâu, và nó đem lại lợi ích gì cho người sử dụng
22/11/2022

Hướng dẫn sử dụng Proxy Helper Fakeip khi thuê proxy
21/11/2022

PROXY NUÔI TÀI KHOẢN FACEBOOK – KINH NGHIỆM FAKE IP – THUÊ PROXY GIÁ RẺ
14/11/2022

Mua Proxy Nuôi Zalo Giá Rẻ Tại Onet.com.vn
14/11/2022

BẢNG GIÁ MUA PROXY VIỆT NAM và PROXY US Onet.com.vn
14/11/2022