Description of top command parameters in FreeBSD

Source: Internet
Author: User

 

Use of top monitoring commands on FreeBSD

The top monitoring tool displays the processes whose CPU usage is the first few, and provides real-time CPU activity.

 

Syntax: top [-s time] [-d count] [-q] [-h] [-n number] [-f filename] [-o field] [-U usename]

-S displays the system process information on the screen. By default, top does not display the system process information.

-B uses the "batch" method to run top. In this way, all input from the terminal will be ignored, but the interaction key (such as ^ C and ^ \)

Continue to use. This is the default running mode for running top output to a dumb terminal or to a non-terminal.

-I run the top program interactively. In this mode, the command is immediately processed by the process. Whether the command can be understood by top or not,

The screen will be updated immediately. This is the default running mode of top.

-I does not display idle processes. By default, top and idle process information are output together.

-T does not display the top process itself

-N does not use the top command in interactive mode. It works in the same "batch" mode.

-S time sets the screen refresh latency, in seconds. The default value is 5 seconds.

-D count: set the number of screen refresh times. After the refresh is completed, the system exits.

-If you are authorized by nice, using-q can make top running faster. In this way, problems can be found faster when the system responds slowly.

 

This option can be used only by root under FreeBSD.

-N number: set the number of processes displayed on each screen. If the number value exceeds the maximum number of processes, the setting is invalid.

-U replace username with the Display User ID to speed up command running

-V immediately exits after the program version is displayed. If you want to view the version number during top running, enter "? "

-O sorts the information by specified fields. The field name must be the name of the visible column on the input screen, and must be in lowercase.

 

For example, "cpu", "size", "res", and "time", but there are many differences between different operating systems. Note that not every UNIX operating system supports this option.

-U only displays the information of the process that belongs to the user name.

 

Screen Control Command

You can use the following command to control the top

^ L-refresh the screen

Q-exit

H or? -Show Help

D-modify the number of refresh display times

E-display the error generated by the latest "kill" or "renice" command

I-display/Do Not Display idle Processes

I-same as 'I'

K-kill process; send a signal to a process list

N or #-modify the number of display processes

O-sort by specific fields (pri, size, res, cpu, time)

R-renice a process

S-Modify the input Update Time

U-only displays processes belonging to a user (+ selects all users)

 

The following three general information is displayed in sequence:

I. system information:

 

Last pid: 22228; load averages: 0.25, 0.97, 1.56 up 44 + 03: 25: 56 21:39:36

274 processes: 3 running, 259 sleeping, 12 zombie

CPU states: 2.9% user, 0.0% nice, 4.2% system, 0.4% interrupt, 92.5% idle

Mem: 483 M Active, 120 M Inact, 222 M Wired, 25 M Cache, 112 M Buf, 153 M Free

Swap: 2048 M Total, 143 M Used, 1905 M Free, 6% Inuse

 

The first line shows the system information, including:

+ Load averages: average Load for 1 minute, 5 minutes, and 15 minutes

+ System: system name and current date.

Generally, as long as the number of active processes per CPU is not greater than 3, the system performance is good. If the number of active processes per CPU is greater than 5, it indicates that the performance of this machine has a serious problem.

+ The total number of processes in the last update, and the number of running, sleep, idle, and zomb statuses are listed respectively.

+ CPU state: the percentage of the user's time in use, the percentage of CPU time used by the system, the percentage of CPU time used by tasks whose priority is changed by nice commands, and the percentage of CPU idle time.

(Tasks whose priorities are changed by nice commands only refer to those tasks whose nice values are negative ). The time spent on tasks whose priorities are changed by nice commands will also be calculated in the system and user time. Therefore, the total time may exceed.

 

Ii. Memory Information

Memory: 610008 K (24424 K) real, 995344 K (30304 K) virtual, 12588 K free Page #1/4

Memory: Memory usage statistics, including the actual (real) Memory activity value/total value, virtual Memory usage value/total value, and remaining Memory.

DESCRIPTION OF MEMORY

 

Mem: 9220 K Active, 1032 K Inact, 3284 K Wired, 1 MB Cache, 2 M Buf, 1320 K

Free Swap: 91 M Total, 79 M Free, 13% Inuse, 80 K In, 104 K Out

 

K: Kilobyte (K)

M: Megabyte (MB)

%: 1/100 (percentage)

Active: Number of Active pages

Inact: number of inactive pages

Wired: Number of pages that have been written, including the cached file data page number

Cache: Number of pages used for VM-level disk Buffering

Buf: Number of pages used for BIO-level disk Buffering

Free: idle page

Total: Total available swap Areas

Free: A total of idle swap Areas

Inuse: swap zone usage

In: pages paged in from swap devices (recent interval)

Out: pages paged out to swap devices (recent interval)

 

3. Process Information

Cpu pid username pri ni size res state time % WCPU % CPU COMMAND

1 33 root 152 20 0 K 0 K run 153: 43 1.18 1.18 vxfsd

0 1751 root 154 20 2500 K 868 K sleep 2084: 19 0.52 0.52 ARMServer

0 1730 root 154 20 4500 K 332 K sleep 1664: 55 0.44 0.44 acactmgr

Lists the information of each processor in the system. When the information cannot be displayed on one screen, it is divided into multiple screens for display. You can refer to the preceding commands for viewing the information of l, k, and t.

(1) CPU: processor number (listed only when the multi-processor system is used)

(2) PID: Process number

(3) USERNAME: User Name

(4) PRI: task priority

(5) NICE: The nice value of the task. A process with a lower value has priority on the system. You can increase the speed of some processes by changing the nice value, but this is actually a transaction,

Because those nice-value processes will run slowly at this time.

(6) SIZE: the SIZE of the task code plus data plus the SIZE of the stack space.

(7) RES: Total number of physical memory used by the task.

(8) STATE: Task status

(9) TIME: the total cpu time used since the start of the task, in seconds, for example, 153: 43, corresponding to 153 seconds and 43 milliseconds

(10) % WCPU: Percentage of CPU utilization weights of processes

(11) % CPU: Percentage of the original CPU usage of the process, the CPU usage of the task since the last screen refresh

(12) COMMAND: name of the COMMAND to start the process. If the name is too long to be displayed in a row, it will be truncated

 

From derek zuo's blog

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.