Linux some common high-level commands -top

 "  Record high-level commands some common Linux "

The top command: dynamically displays the current process consumes the most resources information, three seconds to refresh.

top basic view:

top - 17:11:03 up  6:52,  2 users,  load average: 0.00, 0.00, 0.00
Tasks:  82 total,   1 running,  81 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1020296k total,   289188k used,   731108k free,    12268k buffers
Swap:  2064376k total,        0k used,  2064376k free,    97536k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1186 root      20   0  403m  12m 5872 S  0.3  1.3   0:02.60 httpd
 1577 nobody    20   0 1203m  37m 8424 S  0.3  3.7   0:08.47 httpd
 1860 root      20   0 15020 1284 1000 R  0.3  0.1   0:00.19 top
    1 root      20   0 19232 1488 1220 S  0.0  0.1   0:00.83 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/

First, the first five lines Detailed statistics

first row:

top - 17:11:03 up  6:52,  2 users,  load average: 0.00, 0.00, 0.00

 

Up 6:52 17:11:03     # current system time, the system has been running for 6 hours 52 minutes
2 the Users    # There are currently 2 users log into the system the Load Average: 0.00, 0.00, 0.00    # 1 minute, 5 minutes, 15 minutes system load Happening 

 

second line:

Tasks:  82 total,   1 running,  81 sleeping,   0 stopped,   0 zombie

 # Task (process): A total of 82 current process, an operation, 81 in a sleep state, stop state 0, 0 zombie state

 

The third row:

People (s): 0.0% us, 0.3% sy, 0.0% Ni, 99.7% id, when 0.0%, 0.0% hi, 0.0% si, 0.0% st

#cpu status:

# Us-- user space occupied by cpu percentage

# Sy-- kernel space occupied by cpu percentage

# Ni-- changed priority process cpu occupancy percentage

# Id-- idle cpu percentage

# Wa - I / O Input / output waiting cpu occupancy percentage

# Hi-- hardware interrupt cpu occupancy percentage

# Si-- soft interrupt cpu occupancy percentage

# St-- virtual cpu cpu percentage of the actual waiting time

 

Fourth row:

Mem:   1020296k total,   289188k used,   731108k free,    12268k buffers

 # Total physical memory, total amount of memory in use, the total amount of free memory, the kernel buffer zone stock


The fifth line:

Swap:  2064376k total,        0k used,  2064376k free,    97536k cached

 # Total amount swap swap, swap the total amount used, the total amount of free exchange zone, buffer

 

Second, the process Detailed information

PID  USER      PR  NI   VIRT   RES   SHR  S  %CPU  %MEM    TIME+    COMMAND
1186 root      20   0   403m   12m  5872  S   0.3   1.3    0:02.60  httpd
1577 nobody    20   0  1203m   37m  8424  S   0.3   3.7    0:08.47  httpd

 

# PID-- process ID

# USER-- process owner user name

# PR-- process scheduling priority value

# NI-- process nice value (priority), the smaller the value the higher the priority

# VIRT-- the total amount of virtual memory used by the process in kb

# RES-- resident memory size in kb

Shared memory size # SHR-- process used in kb

# S-- process status, D uninterruptible sleep state run R T S sleep state tracking / stop mode Z Zombie state

#% CPU-- last update to the current occupancy percentage of CPU time

The percentage of physical memory used by the process #% MEM--

#TIME + - CPU time used by the process in total, 1/100 second unit

# COMMAND-- command name / command line

Guess you like

Origin www.cnblogs.com/wdana/p/12021701.html