In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the usage of top command under Linux". In daily operation, I believe many people have doubts about the usage of top command under Linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "the usage of top command under Linux". Next, please follow the editor to study!
Top
The top instruction is used to display the process information of Linux, which is a process of dynamic display. Top provides a dynamic real-time view of the running system. It displays system summary information and a list of tasks currently managed by the Linux kernel. The type of system summary information displayed and the type, order, and size of the information displayed for tasks are user-configurable, and the configuration can be persisted during reboot.
The program provides a limited interactive interface for process operations and a broader interface for personal configuration-including every aspect of its operation. Although TOP is referenced throughout the document, you can name the program as you like. This new name (possibly an alias) will be reflected on the top monitor and used when reading and writing configuration files.
When operating top, the two most important keys are Help ("h" or "?"). And exit the ('q') key. Alternatively, you can simply use the traditional interrupt key ('^ C'). When you start top for the first time, you will see the traditional screen elements: 1) summary area; 2) message / prompt line; 3) column header; and 4) task area. However, there will be some differences from the previous top.
The scope of this command: RedHat, RHEL, Ubuntu, CentOS, Fedora, SUSE, openSUSE.
1. Grammar
Top-hv |-abcHimMsS-d delay-n iterations-p pid [, pid...]
2. Command line options
Option
Description
-a
Sort by memory usage
-b
Batch mode operation. Starting top in batch mode can be useful for sending output from top to another program or file. In this mode, top will not accept input and run until the iteration limit set with the'- n 'command line option or until terminated.
-c
Start with a reversal of the'c 'state in the last memory. Therefore, if top is displaying the command line, the field will now show the program name, while Visa will do the opposite.
-dss.tt
Sets the interval for top monitoring, which defaults to 5s. Decimal seconds can be used, but negative numbers are not.
-h
Display help information
-H
The thread is reversed. Start with the "H" state in the last memory. When this switch is turned on, all individual threads are displayed. Otherwise, top displays the sum of all threads in the process.
-I
Zombie processes are not displayed. Start with the "I" state in the last memory. When this toggle is off, idle or zombie tasks will not be displayed.
-m
Reports used (sum of process RSS and total number of exchanges), not VIRT
-M
Display memory unit
-n
Set the number of monitoring updates
-p
Monitors only the information for the specified pid. This option can be given up to 20 times, or you can provide a comma-separated list and up to 20 PIDS. Both methods are allowed.
S
Safe mode. Start top in a mandatory safe mode, even for root users. Better control of this mode through the system configuration file (see topic 5). File)
-S
Cumulative time mode switch. Start with the reversal of the'S' state in the last memory. When Cumulative Mode is turned on, each process lists the CPU time it and its dead child processes use. For additional information about this mode, see the "S" interactive command.
-u
Monitor only processes with a valid UID or username match
-U
Only processes with a given UID or username match are monitored. This matches the actual, valid, saved, and file system UID.
-v
Display the library version and usage tips, and then exit.
3. Fields / columns
1) Field description
The available fields for top are listed below. They are always associated with the letters displayed, whether the location you set for them is the'o' (Order field) interactive command. Any field can be selected as a sort field, and you can control whether they are sorted by high or low or from low to high.
Field
Description
PID
The only process for the task, ID, which is wrapped periodically but never restarts at zero
PPID
Parent ID of the process
RUSER
The real user name of the task owner
UID
Valid user ID of the task owner
USER
Valid user name of the task owner
GROUP
Valid group name of the task owner
TTY
The name of the control terminal. This is usually the device (serial port, pty, etc.). Start the process from it and use it for input or output. However, the task does not need to be associated with the terminal, in which case you will see'?' Display
PR
Task priority
NI
The nice value of the task. A negative positive value means higher priority, while a positive good value means lower priority. The zero in this field only means that the priority is not adjusted when determining the schedulability of the task.
P
Represents the number of processors last used. In a real SMP environment, this is likely to change frequently because the kernel intentionally uses weak affinity. In addition, the behavior of running top may break this weak affinity, causing more processes to change CPU more frequently (because of the additional need for CPU time).
% CPU
The task's share of elapsed CPU time since the last screen update is expressed as a percentage of total CPU time. In a real SMP environment, if Irix mode is turned off, top operates in Solaris mode, where the CPU usage of the task is divided by the total number of CPU. Use the "I" interactive command to switch "Irix/Solaris" mode
TIME
The total CPU time used by the task since it was started. When Cumulative Mode is turned on, each process lists the CPU time it and its dead child processes use. Use "S" to toggle Cumulative Mode, which is a command line option and interactive command. For additional information about this mode, see the "S" interactive command
TIME+
Same as "TIME", but reflects more granularity in 1% seconds.
% MEME
Available physical memory sharing currently used by the task
VIRT
The total amount of virtual memory used by the task. It includes all code, data, and shared libraries, as well as pages that have been exchanged. (note: you can define the STATSIZE=1 environment variable, and VIRT will be calculated from the / proc/#/state VmSize field.)
SWAP
The exchange value for each process is now obtained from the / proc/#/Status VmABP field.
RES
The non-swapped physical memory used by the task.
CODE
The amount of physical memory used for executable code, also known as the text resident set size or TRS.
DATA
Used for the amount of physical memory other than executable code, also known as the data resident set size or DRS.
SHR
The amount of shared memory used by the task. It simply reflects memory that may be shared with other processes.
NFLT
The number of major page errors that occurred in the task. A page error occurs when a process attempts to read or write a virtual page that is not currently in its address space. A major page error is when disk access involves making the page available.
NDRT
The number of pages that have been modified since they were last written to disk. Dirty pages must be written to disk before the corresponding physical memory location can be used for other virtual pages.
S
The status of the task, which can be
D, uninterrupted sleep
R, run
S, sleep.
T, track or stop
Z, zombie.
Command
Displays the name of the command line or associated program used to start the task. Use'c'to switch between the command line and the name, which is both a command line option and an interactive command. When you choose to display the command line, processes that do not have a command line, such as kernel threads, will be displayed only with the program name in parentheses, as shown in this example
(mdrecoveryd)
If the length of the display is too long to match the current width of the field, both displays are affected by potential truncation. The width depends on the other fields selected, their order, and the current screen width.
WCHAN
Depending on the availability of the kernel link map ('System.map'), this field displays the name or address of the kernel function for which the task is currently dormant. The running task will display a'-'in this column.
Flags
This column represents the current scheduling flag for the task, which is expressed in hexadecimal notation and zero is suppressed. These signs are officially recorded in.
2) selection and sequencing
After pressing the interactive command'f' (field selection) or'o' (sequential fields), a screen containing the current field string is displayed, followed by the names and descriptions of all fields. The following is a sample field string from one of the four window / field groups of TOP and an explanation of the convention used:
Sample field string:
ANOPQRSTUVXbcdefgjlmyzWHIK
The order in which the fields are displayed corresponds to the order of the letters in the string.
If the letters are uppercase, the corresponding fields themselves are displayed as part of the task display (screen width allowed). This will also be represented by a leading asterisk ('*'), as shown in the following excerpt:
...
* K:% CPU = CPU usage
L: TIME = CPU Time
M: TIME+ = CPU Time, hundredths
* N:% MEM = Memory usage (RES)
* O: VIRT = Virtual Image (kb)
...
Field selection screen -'f 'interactive command: just press the corresponding letter to switch the display of the field.
Command field screen-"o" interactive command: move a field to the right with lowercase letters by moving one field to the left and one field to the right by pressing the corresponding uppercase letters.
3) Summary area field
Summary area fields that describe CPU statistics are abbreviated. They provide information about the time spent on:
Us, user mode.
Sy, system mode.
Ni, low-level user mode
Id, idle task.
Wa,IO waits.
Hi, service outage.
Si, service soft interrupt.
St, steal (time given to other Domu instances.
4. Interactive command
Listed below is a short index of the commands in the category. Some commands appear more than once-their meaning or scope may vary depending on the context in which the command was issued.
1) Global command
Global interactive commands can always be used in full screen mode and alternating display mode. However, some of these interactive commands are not available when running in safe mode. If you want to know in advance whether your top is protected, just ask for help and view the system summary on the second line.
Command
Description
Or
Refresh the display
These commands do nothing, they are just ignored. However, they will wake up the top, and after receiving any input, the entire display will be redrawn. If you have a large delay interval and want to see the current state, use any of these keys.
?? or? h?
Help
There are two help levels available. The first command will remind you of all basic interactive commands. If the top is secure, the screen is abbreviated. Enter "h" or "?" On the help screen, help is provided for interactive commands that apply to alternate display modes.
'='
Exit task restrictions
Removes the restriction on which tasks are displayed. This command reverses all'i' (idle tasks) and'n' (maximum tasks) commands that may be active. It also provides an "exit" from PID monitoring. For a discussion of PID monitoring, see the'- p 'command line option. When operating in alternate display mode, this command has a slightly broader meaning.
'A 'a'
Alternate display mode switch
This command switches between full-screen mode and alternating display mode. Alternate display mode and "G" interactive commands to gain insight into the current window and field groups.
'B ''
Bold disable / enable toggle
This command affects the use of the bold terminal feature and changes the summary area and task area of the current window. Although it is mainly used for dumb terminals, it can be used at any time. Note: when this button runs in monochrome mode, the entire display will be displayed as normal text. Therefore, unless the'x 'and / or' y 'switches are emphasized in the opposite direction, there will be no visual confirmation that they are uniform.
* 'd 'or 's'
Change the delay interval
You will be prompted to enter a delay in seconds between display updates. Decimal seconds are not allowed, but negative numbers are not allowed. Entering 0 results in (almost) constant updates and unsatisfactory display as the system and TTY drivers try to keep up with TOP requirements. The delay value is inversely proportional to the system load, so set it carefully. If you want to know the current delay time, just ask for help and view the system summary on the second line.
'G'
Select another window / field group
You will be prompted to enter a number between 1 and 4 to specify the window / field group that should be the current window. You will soon be comfortable with these four windows, especially after trying the alternate display mode.
'I 'e
Irix/Solaris mode switching
When operating in Solaris mode (the "I" toggle is off), the CPU usage of the task is divided by the total number of CPU. After issuing this command, you will be informed of the new status of this switch
'u 'e
Select user
You will be prompted for UID or user name. Only processes that belong to the selected user are displayed. This option matches a valid UID.
'U 'e
Select user
You will be prompted for UID or user name. Only processes that belong to the selected user are displayed. This option matches the actual, valid, saved, and file system UID.
* 'k 'k
Kill mission
You will be prompted for PID before sending a signal. The default signal reflected in the prompt is SIGTERM. However, you can send any signal by number or name. If you want to abort the termination process, do one of the following according to the progress:
1) at the PID prompt, simply press
2) at the signal prompt, type 0
'Q'
Quit
* 'r 'r'
Reset task priority
You are prompted for PID and set the value to NICE. Entering a positive value will cause the process to lose priority. On the contrary, negative values will cause the kernel to view processes better.
*'W'
Write to configuration file
This will save you all your options and switches plus the current display mode and delay time. By issuing this command before exiting top, you will be able to restart in exactly the same state later.
'Z'
Change color mapping
This button will take you to a separate screen where you can change the color of the "current" window, or the colors of all windows. More information about this interactive command.
*
Commands displayed with an asterisk ('*') are not available in safe Mode and do not appear on the level 1 help screen.
2) Summary area command
The area interactive command can always be used in full screen mode and alternating display mode. They affect the starting line of the display and determine the location of messages and prompts. These commands always affect only the current window / field group. If the entire summary area has been switched to any window, only message lines are left. In this way, you can make the most of the available task lines, but (temporarily) sacrifice the program name in full-screen mode, or the current window name in alternate display mode.
Command
Description
'l 'l
Toggle load average / uptime
This is also the line that contains the program name (which may be an alias) when operating in full-screen mode, or the "current" window name when operating in alternate display mode.
'm'
Switch memory / swap usage
This command affects two summary area rows.
't 'e
Toggle task / CPU status
This command affects rows from 2 to multiple summary areas, depending on the status of the "1" switch and whether top is running under a real SMP.
'1'
Toggle single / detached CPU statu
This command affects how the CPU status portion of the "t" command is displayed. Although this switching is mainly intended to serve massively parallel SMP machines, it is not limited to SMP environments.
3) Task area command
Task area interactive commands are always available in full screen mode. If the task display in the current window is turned off, task area interactive commands are not available in alternate display mode.
Ⅰ) the appearance of the task window
The following command will also be affected by the global'B' (bold disabled) toggle state.
Command
Description
'b'
Bold / reverse toggle
This command affects how the "x" and "y" switches are displayed. In addition, it will be available only in at least one of these switches.
'x'
Column highlight Toggle
The highlight change of the current sort field. You may not need a constant visual reminder to sort fields and top hope that you always run 'column highlighting' off because of the cost in the path length. If you forget the fields you are sorting, this command can be used as a quick visual reminder.
'y'
Line highlight Toggle
The changes highlighted for the run task. For more information about the status of this task, see topic 2a. Field description, process status. Using this rule provides important insight into the health of your system. The only cost will be some additional TTY escape sequences.
'z'
Polychromatic / monochromatic switch
Toggles the last used color scheme between the "current" window and the old form of black and white or white to black. This command changes both the summary area and the task area, but does not affect the status of the "x", "y", or "b" switch.
Ⅱ) Task window content
Command
Description
'c'
Command line / program name switch
This command will be responded to whether or not the Command column is currently visible. Later, if this field appears, you will see the changes you applied.
'f 'o'
Field selection or sort field
These keys display a separate screen where you can change the fields displayed and their order.
'H 'e
Thread switching
When this switch is turned on, all individual threads are displayed. Otherwise, top displays the sum of all threads in the process.
's'
Cumulative time mode switch
When Cumulative Mode is turned on, each process lists the CPU time it and its dead child processes use. When closed, programs that are divided into multiple tasks seem less demanding. This is appropriate for programs like 'init' or shell, but not for other programs, such as compilers. Try using two task windows to share the same sort field, but use different'S' states and see which representation you prefer. After issuing this command, you will be informed of the new status of this switch. If you want to know in advance whether Cumulative Mode is valid, simply ask for help and view the window summary on the second line.
'u 'e
Show only specific users
You will be prompted for the name of the user to display. After that, only the matching user ID is displayed in the task window, or the task may not be displayed. Later, if you want to monitor all tasks again, reissue this command, but simply press at the prompt without providing a name.
Ⅲ) Task window size
Command
Description
'I 'e
Idle process handoff
Show all tasks or only active tasks. When this toggle is off, idle or zombie processes will not be displayed. If you apply this command to the last task display in alternate display mode, it will not affect the size of the window because all previous task displays have been drawn.
'n''#
Set maximum task
You will be prompted for the number of tasks to display. Your serial number and the lessor of the available screen lines will be used. When used in alternate display mode, this is a command that gives you precise control over the size of each currently visible task display, with the exception of the last task display. It does not affect the size of the last window because all previous task displays have been drawn
If you want to increase the size of the last visible task display in alternate display mode, simply reduce the size of the task display above.
Ⅳ) sort the task window
For compatibility, this top supports most of the previous top-level sort keys. Since this is mainly a service for former top-level users, these commands do not appear on any help screen.
Command sorted field supported
A start time (non-display) No
M% MEM Yes
N PID Yes
P% CPU Yes
T TIME+ Yes
Before using any of the following sort terms, top recommends that you use the "x" interactive command to temporarily open the highlighted column. This will help ensure that the actual sorting environment matches your intentions. The following interactive command is executed only if the current sort field is visible. The sort field may not be visible because the screen is not wide enough; the "f" interactive command turns it off.
Command
Description
''
Move sort field to the right
Move the sort to the right unless the current sort field is the last field displayed.
The following interactive command is always executed regardless of whether the current sort field is visible or not
Command
Description
'F 'o 'o
Select sort field
These keys display a separate screen where you can change which field is used as the sort sequence. If you select a field that was not previously displayed, the field is forced to open when you return to the top display. However, depending on the screen width and the order of the fields, this sort field may not be displayed. When running top with column highlighting off, this interactive command can easily and easily validate the current sort field.
'R 'R'
Reverse / normal sort field switch
Using this interactive command, you can alternate between high-to-low and low-to-high sorting.
Note: field sorting uses internal values, not values in the column display. Therefore, the TTY and WCHAN fields will violate the strict ASCII sort sequence.
4) Color mapping
When you issue the "Z" interactive command, a separate screen is displayed. This screen can be used to change the color in the current window or in all four windows, and then return to the top display. Interactive commands are available:
4 capital letters to select the target
8 digits to select color
Switch to available rules normally
'Bold, run task "bold" / reverse "
'Based, disable / enable bold
'zonal, color / monochrome
Other available commands
'Another racemaker is available, apply, and then go to the next / priority
, apply and exit.
'qchanges, discard the current changes and exit.
If you use the'a'or'w 'loop target window, you will apply the color scheme that is displayed when you leave the window. Of course, you can easily return to any window and reapply a different color, or use the "z" button to turn off the color completely. The color mapping screen can also be used to change the current window / field group in full screen mode or alternating display mode. When'Q' or is pressed, any target will be set current when it returns to the top display.
5. Alternate display mode
1) Overview of Windows
Groups/Windows field
In full screen mode, only one window is represented by the entire screen. The single window can still be changed to display one of four different field groups (see the'G' interactive command, repeated below). Each of the four field groups has a unique configurable summary area and its own configurable task area. In alternate display mode, these four underlying field groups can now be displayed at the same time or closed separately at your command. The summary area will always exist, even if it is just a message line. Only one summary area can be displayed at any given time. However, depending on your command, from zero to four separate task displays may appear on the screen.
Current window
The current window is the window associated with the summary area and the window that task-related commands always point to. Because you can turn off the display of tasks in alternate display mode, some commands may be limited to the current window. A more complicated situation is when you have switched the first summary area line. With the loss of the window name ("l" switch line), it will be difficult for you to know which window the "current" window is.
2) window command
Command
Description
'-'or ''_'
Show or hide the window.
The-key turns on and off the task display of the current window. When open, the task area displays the minimum values for column headings created with the "f" and "o" commands. It will also reflect any other task area options / switches you apply, resulting in zero or more tasks.
The "_" key does the same for all task displays. In other words, it switches between the currently visible task display and any task display that you switch off. If all four task displays are currently visible, this interactive command leaves the summary area as the only display element.
*'='or *'+'
Equalization _ (rebalance) window
The "=" key forces tasks in the current window to be visible. It also reverses any'i' (idle task) and'n' (maximum task) commands that may be active.
The'+ 'key is the same for all windows. Four task displays will be redisplayed, balanced and balanced. They also retain any customizations that have been applied before, except for the'i' (idle task) and'n' (maximum task) commands.
* 'A 'a'
Alternately displays the mode switch.
This command switches between full-screen mode and alternating display mode. The first time you issue this command, all four task displays are displayed. After that, when you switch modes, you will only see the task of your choice displayed to make it visible.
* a'a 'or * 'w 'a
The next window is forward / backward.
This changes the current window, which in turn changes the window that the command points to. These keys work in a loop so that you can use any key to reach any "current" window you want. Assuming that the window name is visible (without switching "l" OFF), this reminds you that the task display is turned off and many commands will be restricted whenever the "current" window name loses its emphasis / color.
*'G'G'
Select another window / field group
You will be prompted to enter a number between 1 and 4, specifying the window / field group that should be set as the current window. In full screen mode, this command is necessary to change the current window. In alternate display mode, it is just an inconvenient alternative to the "a" and "w" commands.
* 'g 'a
Change window / field group name
You will be prompted to apply a new name to the current window. It does not require the window name to be visible ("l" switches to open).
*
The interactive commands displayed with an asterisk ('*') have gone beyond the alternating display mode.' It is always available. The effect of color mapping is the same for color mapping.
6. Documents
1) system profile
The existence of this file affects which version of the help screen is displayed to the average user. More importantly, it will limit what the average user can do when running top. They will not be able to issue the following commands:
K, kill the mission.
R, reschedule task priority.
Change sleep or delay time.
The system profile was not created by top. Instead, you can create this file manually and place it in the / etc directory. Its name must be "toprc" and there must be no leading'. It must have only two lines. An example of the "/ etc/toprc" file is provided below:
S # line 1: 'secure' mode switch
5 # line 2: 'delay' interval in seconds
2) personal profile
This file is written as'$HOME/.your-name-4-top'+'rc'. Use the'W 'interactive command to create or update it. If the $HOME variable does not exist, top will attempt to write the personal profile to the current directory based on permissions.
Global # line 1: the program name/alias notation
"# line 2: id,altscr,irixps,delay,curwin
Per ea # line a: winname,fieldscur
Window # line b: winflags,sortindx,maxtasks
"# line c: summclr,msgsclr,headclr,taskclr
7. Stupid trick sampler
1) Kernel Magic
The user interface intentionally implies that the delay interval is limited to 1/10 seconds through prompts and help. However, you can set any desired delay as you like. If you want to see Linux best in his schedule, try delaying it by 0.09 seconds or less. For this experiment, open a xTerm under x-windows and maximize it. Then do the following:
Scheduling boosts and small delays are provided in the following ways: "nice-n-10 top-d.09"
Keep the sequence highlighted to minimize path length
Turn on the inverse highlight to emphasize
Try various sorts of sorting (time/mem is working well) and sort either regularly or in reverse to bring the most active processes into view.
You'll see a very busy Linux doing what he's been doing for you, but there's no program available to illustrate this.
-*-under xTerm that uses the White to Black color, try setting the task color at the top to black and make sure the task highlight is set to bold, not the other way around. Then set the delay interval to about 3 seconds, and after introducing the most active process into the view, you will see a ghost image of the currently running task.
Delete an existing rcfile or create a new symbolic link. Start the new version and type'T'(a secret key, see topic 3c). Task area command, sort) followed by'W 'and' Q'. Finally, restart the program with-d0 (zero delay). Your display will refresh three times as fast as the front top, a 300% speed advantage. When the top climbs the time ladder, you should be as patient as possible and guess whether the top will reach the top.
2) pop-up window
When 3 or 4 tasks are displayed, select any window except the last window, and then close the idle process. Depending on the location of the application "I", sometimes several tasks appear to be bouncing, sometimes like an accordion, because top tries to allocate space.
Set the summary line for each window in different ways: one has no memory, the other has no state, and maybe one has no information, only message lines. Then press and hold "a" or "w" to observe the change of jumping window wind.
-* -, show all four windows, and then set the idle process to OFF in turn. You just entered the "extreme rebound" zone.
3) large bird window
Show all four windows and make sure 1:def is the current window. Then, continue to increase the window size until all other tasks are displayed "pushed out of the nest". Switch between all visible / invisible windows when they are all moved.
8. Examples
1) display all process information
[root@localhost ntop-4.0.1] # top
Top-16:32:01 up 2 days, 24 min, 4 users, load average: 0.00,0.00,0.00
Tasks: 256 total, 1 running, 251 sleeping, 0 stopped, 4 zombie
Cpu (s): 3.1%us, 0.7%sy, 0.0%ni, 95.8%id, 0.3%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1659316k total, 1320820k used, 338496k free, 230176k buffers
Swap: 2940920k total, 0k used, 2940920k free, 652288k cached
PID USER PR NI VIRT RES SHR S CPU MEM TIME+ COMMAND
2579 root 20 0 63280 29m 9500 S 4.0 1.8 2:34.98 Xorg
3220 root 20 0 95168 16m 11m S 2.0 1.0 1:12.80 gnome-terminal
7 root 20 0 0 0 S 0.3 0.0 0:45.19 events/0
2198 david 20 0 21400 1300 952 S 0.3 0.1 2:28.72 VBoxClient
2397 david 20 0 71956 14m 11m S 0.3 0.9 0:02.24 clock-applet
1 root 20 0 2900 1436 1216 S 0.0 0.1 0:00.84 init
2 root 20 00 00 S 0.0 0.00: 00.00 kthreadd
3 root RT 00 00 S 0.0 0.00: 00.00 migration/0
4 root 20 0 0 0 S 0.0 0.0 0:01.35 ksoftirqd/0
5 root RT 00 00 S 0.0 0.00: 00.00 migration/0
6 root RT 0 0 0 S 0.0 0.0 0:01.29 watchdog/0
8 root 20 00 00 S 0.0 0.00: 00.00 cgroup
9 root 20 00 00 S 0.0 0.00: 00.00 khelper
10 root 20 00 00 S 0.0 0.00: 00.00 netns
11 root 20 00 00 S 0.0 0.00: 00.00 async/mgr
12 root 20 00 00 S 0.0 0.00: 00.00 pm
13 root 20 00 00 S 0.0 0.0 0:00.77 sync_supers
14 root 20 00 00 S 0.0 0.0 0:00.58 bdi-default
15 root 20 00 00 S 0.0 0.00: 00.00 kintegrityd/0
16 root 20 0 0 0 S 0.0 0.0 0:01.53 kblockd/0
17 root 20 00 00 S 0.0 0.00: 00.00 kacpid
18 root 20 00 00 S 0.0 0.00: 00.00 kacpi_notify
19 root 20 00 00 S 0.0 0.00: 00.00 kacpi_hotplug
20 root 20 00 00 S 0.0 0.00: 00.00 ata_aux
21 root 20 0 0 0 S 0.0 0.0 0:02.81 ata_sff/0
22 root 20 00 00 S 0.0 0.0 0:00.34 ksuspend_usbd
23 root 20 00 00 S 0.0 0.00: 00.00 khubd
24 root 20 00 00 S 0.0 0.00: 00.00 kseriod
25 root 20 00 00 S 0.0 0.00: 00.00 md/0
26 root 20 00 00 S 0.0 0.00: 00.00 md_misc/0
2) Monitor the specified process
[root@localhost ntop-4.0.1] # top- p 2579 / / specifies the monitoring process id, while other processes do not monitor
Top-16:38:37 up 2 days, 30 min, 4 users, load average: 0.00,0.00,0.00
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu (s): 1.4%us, 0.3%sy, 0.0%ni, 98.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1659316k total, 1320928k used, 338388k free, 230176k buffers
Swap: 2940920k total, 0k used, 2940920k free, 652300k cached
PID USER PR NI VIRT RES SHR S CPU MEM TIME+ COMMAND
2579 root 20 0 63280 29m 9500 S 1.7 1.8 2:36.79 Xorg
At this point, the study of "the usage of the top command under Linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.