See what the System load command is

Source: Internet
Author: User
Tags set time

What are the commands for viewing the payload?


A.uptime command



1.uptime explanation


The uptime command is primarily used to obtain information such as host run time and query Linux system load. The uptime command used to show only how long the system was running. Now, you can show how long the system has been running, the information is displayed in order: The current time, how long the system has been running, how many users are currently logged in, the average load of the system in the past 1 minutes, 5 minutes, and 15 minutes.


2. How to use


Uptime


650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8B/2F/wKioL1hGrS-zJeHzAAA1JnKTbqI545.png-wh_500x0-wm_3 -wmp_4-s_2915118175.png "title=" 21.png "alt=" Wkiol1hgrs-zjehzaaa1jnktbqi545.png-wh_50 "/>

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>

Show Details

10:19:04//System Current time

Up 257 days, 18:56//host has run time, the greater the time, the more stable your machine.

Number of users//user connections, which is the total number of connections, not the number of users

Load average//System average load, statistics last 1, 5, 15 minutes of system average load

So what is the average system load? The average system load is the average number of processes running in a queue during a specific time interval.

If the current number of active processes per CPU core is not greater than 3, then the performance of the system is good. If the number of tasks per CPU core is greater than 5, then there is a serious problem with the performance of this machine



Two.w command


1.W explanation


The Linux w command is used to display user information currently logged into the system.

Execute this instruction to know who is currently logged in to the system, and what program they are executing.


Executing the w instruction alone displays all users, and you can also specify the user name to display information about only one user.


2. How to use


w [-fhlsuv][User name]


3. Parameter description


-F turn on or off to show where users are logged into the system.

-H does not display the header information column for each field.

-L uses a detailed format list, which is a preset value.

-S uses a concise format list, which does not show the CPU time consumed by user login times, terminal stage jobs, and programs.

-U ignores the name of the executing program and the information that the program consumes CPU time.

-V Displays version information.


Example: viewing system load


650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s5.51cto.com/wyfs02/m01/8b/33/wkiom1hgrugj1v4qaaadpmdc-wk870.png-wh_500x0-wm_3-wmp_4-s_3069613824.png "title = "22.png" alt= "Wkiom1hgrugj1v4qaaadpmdc-wk870.png-wh_50"/>


The main content of the detailed


Load average//System average load, statistics last 1, 5, 15 minutes of system average load

So what is the average system load? The average system load is the average number of processes running in a queue during a specific time interval.

If the current number of active processes per CPU core is not greater than 3, then the performance of the system is good. If the number of tasks per CPU core is greater than 5, then there is a serious problem with the performance of this machine


The first number represents the average number of tasks that are used in the CPU within 1 minutes


The second number represents the average number of tasks that are using the CPU within 5 minutes


The third number represents the average number of tasks that are using the CPU within 15 minutes


Example: Do not show where the user is logged in


W-f


650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8B/2F/wKioL1hGrVaAbrxNAAAdT2XAEiI460.png-wh_500x0-wm_3 -wmp_4-s_110994556.png "title=" 23.png "alt=" Wkiol1hgrvaabrxnaaadt2xaeii460.png-wh_50 "/>

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>

Three. Top command


1.top explanation


The top command is a common performance analysis tool under Linux that shows the resource usage of individual processes in the system in real time, similar to the Task Manager for Windows. Here is a detailed description of how it is used. Top is a dynamic display process where the current state can be refreshed continuously with the user key. If the command is executed in the foreground, it will monopolize the foreground until the user terminates the program. more accurately, The top command provides real-time status monitoring of the system's processor. It displays a list of the most "sensitive" tasks in the system. This command can be used by CPU. Memory usage and execution time to sort tasks, and many of the features of the command can be set through interactive commands or in personal customization files.


2. Command format:

Top [parameters]


3. Command function:

Displays information about the processes currently being executed by the system, including process IDs, memory usage, CPU utilization, etc.


4. Command parameters:

-B Batch Processing

-C Displays the complete ruling command

-I ignores the failure process

-S Secret mode

-S cumulative mode

-i< time > Set time interval

-u< User name > Specify user name

-p< Process number > Specify process

-n< number of times > cycle display


Top


650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8B/2F/wKioL1hGrYCTdo2hAAEIVPXXIck377.png-wh_500x0-wm_3 -wmp_4-s_87809373.png "title=" 24.png "alt=" Wkiol1hgryctdo2haaeivpxxick377.png-wh_50 "/>

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>

The final explanation of some output information:

Load average:0.09, 0.05, 0.01

The three numbers represent the average system load for different time periods (one minute, five minutes, and 15 minutes), and the number of them is, of course, the smaller the better. "How many cores are the number of loads" rule: in multicore processing, your system's average value should not be higher than the total number of processor cores

The memory used by the process can be top, with 3 columns Virt RES SHR, indicating the memory used by the process, Virt identifies the total amount of memory that the process can use, including the memory that the process is using, the mapped file, and the memory shared by other processes. Res identifies the size of this process that really consumes memory. The SHR identifies the memory and library sizes that can be shared with other processes.


Example: Specify root to view the usage of each process for the user name


Top-u Root


650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s2.51cto.com/wyfs02/m02/8b/33/wkiom1hgrzxsavreaadsknd5rdu936.png-wh_500x0-wm_3-wmp_4-s_3009564485.png "title = "25.png" alt= "Wkiom1hgrzxsavreaadsknd5rdu936.png-wh_50"/>


See what the System load command is

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.