Linux operating system-command-top

Source: Internet
Author: User

Concept

Top,display Linux tasks, that is: Show Linux processes/tasks.

A usage within Linux

Top

This command means: "Resource usage per process" is displayed. In our performance testing process, we often need to use this command to view the load status of the server.

An introduction to the fields in the output list line 1th

Line 1th

Note

16:33:23

Current time

Up 5:58

The system has been running for 5 hours and 58 minutes.

If the machine is running for more than 24 hours,

Then "N Days" will appear on the left.

4 Users

Number of currently logged on users

Load Average

System load

The three values are:

1 minutes, 5 minutes, 15 minutes ago to the current average of system load

Line 2nd

Line 2nd –tasks

Note

Total

Total number of processes 150

1 Running

Running Processes 1

149 Sleeping

Process of sleep 159

0 stopped

The process of stopping

0 Zombie

Zombie Process

Line 3rd

Line 3rd –cpu (s)

Note

0.2%us

User space consumption CPU percentage (user usage)

0.2%sy

CPU Percentage of kernel space (System usage)

If it is too high, it indicates a long system call, such as frequent IO operations

0.0%ni

CPU percentage of processes that have changed priority in user process space

99.6%id

Percentage of idle CPU

0.0%wa

Percentage of CPU time waiting for input and output

0.0%hi

Hard Interrupt

IO Interrupt

0.0%si

Soft interrupt

Network outage

0.0%st

Percentage of time that the virtual CPU waits for the actual CPU

Full Name: Steal time

A high steal value may mean that the host vendor sells the virtual machine over the server over and over again. If you upgrade a virtual machine and the steal value is not down, you should look for another service provider.

A low steal value means that your application works well on the current virtual machine. Your virtual machine responds faster because your virtual machines don't often compete fiercely with other virtual machines for CPU time. This also implies that your hosting provider does not sell virtual services over an excessive amount, which is definitely a good thing.

Line 4th

Line 4th –mem

Note

2061556 k Total

Total Physical Memory

1626384 K Used

Total amount of physical memory used

435172 k Free

Amount of free memory

56504 K Buffers

Amount of memory used as the kernel buffer

"Buffer" is called "buffering"

"Buffer is the data that is about to be written to disk, and the data is stored intact."

Line 5th

Line 5th –swap

Note

0k Total

Total Swap Area

0k used

Total number of swap areas used

0k Free

Total Free Swap Area

173428k Cached

Total number of swap areas cached

"Cache" is called "Caching"

"The cache is the data being read from the disk and waiting to be used."

The so-called 6th line

Line 6th – Process information

Note

Pid

Process ID

PPID: Parent Process ID

USER

User name of the process owner

UID: User ID of the process owner

PR

Priority level

NI

Nice value

A negative value indicates a high priority,

Positive values indicate low priority

VIRT

Total amount of virtual memory used by the process, in kilobytes

Virt=swap+res

Res

The amount of physical memory that the process uses, not swapped out, in kilobytes

Res=code+data

Shr

Shared memory size, in kilobytes

S

Process status

d= non-disruptive sleep state

R= Run
S= Sleep
t= Tracking/Stopping
z= Zombie Process

%cpu

CPU time consumption percentage last updated to current

%MEM

Percentage of physical memory used by the process

time+

Total CPU time used by the process, Unit 1/100 sec

COMMAND

Command name/command line

Linux operating system-command-top

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.