Use the w command and uptime command in Linux to view the system load

Source: Internet
Author: User

Use the w command and uptime command in Linux to view the system load

In Linux, when querying the CPU and memory loads (usage), we are usually used to using top, atop, or ps, this article will introduce how to use the w command and uptime command to view the system load. I believe you are familiar with the uptime command, it is mainly used to query how long it took to run after the last startup, while the w command is relatively unpopular. The following describes how to use these two commands:

1. w command
[root@bkjia ~]# w14:44:27 up 62 days, 3 min, 2 users, load average: 0.00, 0.01, 0.00USER TTY FROM LOGIN@ IDLE JCPU PCPU WHATroot pts/0 218.18.74.196 13:38 1:01m 0.00s 0.00s -bashroot pts/1 218.18.74.196 14:43 0.00s 0.00s 0.00s w

What is different from who is that Linux that uses man w to query the command is "Show who is logged on and what they are doing. ", w command can query the user information logged on to the current system, and what operations these users are currently doing, this information is of value to the Linux system administrator, in addition, the three numbers after the load average show the average load of the system in the last 1 minute, 5 minutes, and 15 minutes.

2. uptime command
[root@bkjia ~]# uptime14:51:15 up 62 days, 10 min, 2 users, load average: 0.02, 0.01, 0.00

The load average in the uptime command ECHO is similar to the w command, indicating the average number of processes in the process queue in the past 1 minute, 5 minutes, and 15 minutes.

Note that the output value of load average is generally not larger than the number of logical CPUs of the system. For example, the system has four logical CPUs in the current output, if the three load average values are greater than 4 for a long time, the CPU is busy and the load is high, which may affect the system performance, generally, the system performance is not affected. On the contrary, if the output value of load average is smaller than the number of CPUs, it indicates that the CPU is still idle. For example, the output in this example, the CPU is relatively idle.

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.