296
cpu cpu-number: Specifies a CPU by its number.
Usage guidelines
If you do not specify the dumbtty keyword, the command displays process statistics in an interactive
mode. In this mode, the system automatically determines the number of displayed processes
according to the screen size, and does not display exceeding processes. You can also input
interactive commands as shown in Table 72 to perform relevant op
eration
s.
Table 72 Interactive commands
Commands Description
? or h Displays help information that includes available interactive commands.
1
Displays state information for physical CPUs. For example, if you enter 1 for the first time,
the state of each physical CPU is displayed in a separate row. If you enter 1 again, the
average value of all CPU states is displayed. If you enter 1 for the third time, separate
states are displayed.
By default, the average value of all CPU states is displayed.
c Sorts processes by CPU usage in descending order, which is the default setting.
d
Sets the interval for refreshing process statistics, in the range of 1 to 2147483647
seconds. The default value is 5 seconds.
f
Sorts processes by the number of open files in descending order. Files are identified by
file descriptors (FDs).
k Kills a process. Because the command can impact system operation, be cautious to use it.
l Refreshes the screen.
m Sorts processes by memory usage in descending order.
n
Changes the maximum number of processes displayed within a screen, in the range of 0
to 2147483647. The default value is 10. A value of 0 means no limit. Only processes not
exceeding the screen size can be displayed.
q Quits the interactive mode.
t Sorts processes by running time in descending order.
< Moves sort field to the next left column.
> Moves sort field to the next right column.
Examples
# Display process statistics in dumbtty mode. In this mode, the system displays process statistics
once, and then returns to command view.
<Sysname> monitor process dumbtty
76 processes; 103 threads; 687 fds
Thread states: 1 running, 102 sleeping, 0 stopped, 0 zombie
CPU states: 77.16% idle, 0.00% user, 14.96% kernel, 7.87% interrupt
Memory: 496M total, 341M available, page size 4K
JID PID PRI State FDs MEM HH:MM:SS CPU Name
1047 1047 120 R 9 1420K 00:02:23 13.53% diagd
1 1 120 S 17 1092K 00:00:20 7.61% scmd
1000 1000 115 S 0 0K 00:00:09 0.84% [sock/1]
1026 1026 120 S 20 26044K 00:00:05 0.84% syslogd
2 2 115 S 0 0K 00:00:00 0.00% [kthreadd]
3 3 99 S 0 0K 00:00:00 0.00% [migration/0]
4 4 115 S 0 0K 00:00:06 0.00% [ksoftirqd/0]