- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
07-Process monitoring and maintenance commands | 227.89 KB |
Contents
Process monitoring and maintenance commands
display kernel deadloop configuration
display kernel starvation configuration
display process memory fragment free
display process memory fragment used
display process memory heap address
display process memory heap size
monitor kernel deadloop enable
monitor kernel deadloop exclude-thread
monitor kernel starvation enable
monitor kernel starvation exclude-thread
monitor kernel starvation time
Process monitoring and maintenance commands
The display memory, display process, display process cpu, monitor process and monitor thread commands display information about both user processes and kernel threads. In these commands, "process" refers to both user processes and kernel threads.
display exception context
Use display exception context to display context information for process exceptions.
Syntax
display exception context [ count value ]
Views
Any view
Predefined user roles
network-admin
Parameters
count value: Specifies the number of context information entries, in the range of 1 to 20. The default value is 1.
Usage guidelines
The system generates a context information entry for each process exception. A context information entry includes the process ID, the crash time, the core dump file directory, stack information, and register information.
Examples
# Display the exception context information.
<Sysname> display exception context
Max coredump files limited in system: 30
Max coredump files limited for one server: 5
Total number of core dump files in system: 1
Index 1 of 1
------------------------------
Crashed slot: 1
Crashed PID: 2916 (macd)
Crash signal: SIGBUS
Crash time: Mon Mar 25 16:31:17 2019
Core file path:
flash:/core/node6144_macd_2916_7_-163117_1553531477.core.xz
Exception Information:
rax 0xfffffffffffffffc -4
rbx 0xffffffff 4294967295
rcx 0x7f2d955c0963 139833756092771
rdx 0x1 1
rsi 0x7ffe19a9c660 140729328977504
rdi 0x9 9
rbp 0x7ffe19a9c660 0x7ffe19a9c660
rsp 0x7ffe19a9c640 0x7ffe19a9c640
r8 0x0 0
r9 0x0 0
r10 0xffffffff 4294967295
r11 0x293 659
r12 0x687140 6844736
r13 0x7ffe19a9c7f8 140729328977912
Traceback (most recent call last):
File "/bin/core_translator", line 318, in <module>
controller.translate()
File "/bin/core_translator", line 274, in translate
self.update()
File "/bin/core_translator", line 249, in update
run_cmd(gdb_cmd)
File "/bin/core_translator", line 77, in run_cmd
data = proc.stdout.readline()
KeyboardInterrupt
Table 1 Command output
Field |
Description |
Max coredump files limited in system |
Maximum number of core dump files that can be saved to the device. If the value is Unlimit, the maximum number is not limited. |
Max coredump files limited for one server |
Maximum number of core dump files that can be generated by the service (not controlled by the SCMD process). For the service controlled by the SCMD process, the maximum number of core dump files that can be generated by the service depends on the configuration of the process core maxcore command. If the value is Unlimit, the maximum number is not limited. |
Total number of core dump files in system |
Total number of core dump files on the device. |
Crashed PID |
ID of the crashed process. |
Crash signal |
Signals that led to the crash: · SIGABRT—Abort. · SIGBUS—Bus error. · SIGFPE—Erroneous arithmetic operation. · SIGILL—Illegal hardware instructions. · SIGQUIT—Quit signal sent by the controlling terminal. · SIGSEGV—Invalid memory access. · SIGSYS—Invalid system call. · SIGTRAP—Trap message. · SIGXCPU—CPU usage limit exceeded. · SIGXFSZ—File size limit exceeded. · SIGUNKNOW—Unknown reason. |
Crash time |
Time when the crash occurred. |
Core file path |
Directory where the core dump file is saved. |
Backtrace stopped |
All stack information has been displayed. |
Related commands
reset exception context
display exception filepath
Use display exception filepath to display the core dump file directory.
Syntax
display exception filepath
Views
Any view
Predefined user roles
network-admin
Examples
# Display the core dump file directory on the MPU.
<Sysname> display exception filepath
The exception filepath is flash:.
display kernel deadloop
Use display kernel deadloop to display kernel thread deadloop information.
Syntax
display kernel deadloop show-number [ offset ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
Parameters
show-number: Specifies the number of deadloops to display, in the range of 1 to 20.
offset: Specifies the offset between the starting deadloop and the most recent deadloop, in the range of 0 to 19. The default value is 0.
verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.
Examples
# Display brief information about the most recent kernel thread deadloop.
<Sysname> display kernel deadloop 1
----------------- Deadloop record 1 -----------------
Description : BUG: soft lockup - CPU#0 stuck for 61! [comsh: 16306]
Recorded at : 2019-05-01 11:16:00.823018
Occurred at : 2019-05-01 11:16:00.823018
Instruction address : 0x4004158c
Thread : comsh (TID: 16306)
Context : thread context
Slot : 0
Cpu : 0
VCPU ID : 0
Kernel module info : module name (mrpnc) module address (0xe332a000)
# Display detailed information about the most recent kernel thread deadloop.
<Sysname> display kernel deadloop 1 verbose
----------------- Deadloop record 1 -----------------
Description : BUG: soft lockup - CPU#0 stuck for 61! [comsh: 16306]
Recorded at : 2019-05-01 11:16:00.823018
Occurred at : 2019-05-01 11:16:00.823018
Instruction address : 0x4004158c
Thread : comsh (TID: 16306)
Context : thread context
Slot : 0
Cpu : 0
VCPU ID : 0
Kernel module info : module name (mrpnc) module address (0xe332a000)
Last 5 thread switches : migration/0 (11:16:00.823018)-->
swapper (11:16:00.833018)-->
kthreadd (11:16:00.833518)-->
swapper (11:16:00.833550)-->
disk (11:16:00.833560)
Register content:
Reg: r0, Val = 0x00000000 ; Reg: r1, Val = 0xe2be5ea0 ;
Reg: r2, Val = 0x00000000 ; Reg: r3, Val = 0x77777777 ;
Reg: r4, Val = 0x00000000 ; Reg: r5, Val = 0x00001492 ;
Reg: r6, Val = 0x00000000 ; Reg: r7, Val = 0x0000ffff ;
Reg: r8, Val = 0x77777777 ; Reg: r9, Val = 0x00000000 ;
Reg: r10, Val = 0x00000001 ; Reg: r11, Val = 0x0000002c ;
Reg: r12, Val = 0x057d9484 ; Reg: r13, Val = 0x00000000 ;
Reg: r14, Val = 0x00000000 ; Reg: r15, Val = 0x02000000 ;
Reg: r16, Val = 0xe2be5f00 ; Reg: r17, Val = 0x00000000 ;
Reg: r18, Val = 0x00000000 ; Reg: r19, Val = 0x00000000 ;
Reg: r20, Val = 0x024c10f8 ; Reg: r21, Val = 0x057d9244 ;
Reg: r22, Val = 0x00002000 ; Reg: r23, Val = 0x0000002c ;
Reg: r24, Val = 0x00000002 ; Reg: r25, Val = 0x24000024 ;
Reg: r26, Val = 0x00000000 ; Reg: r27, Val = 0x057d9484 ;
Reg: r28, Val = 0x0000002c ; Reg: r29, Val = 0x00000000 ;
Reg: r30, Val = 0x0000002c ; Reg: r31, Val = 0x00000000 ;
Reg: cr, Val = 0x84000028 ; Reg: nip, Val = 0x057d9550 ;
Reg: xer, Val = 0x00000000 ; Reg: lr, Val = 0x0186eff0 ;
Reg: ctr, Val = 0x682f7344 ; Reg: msr, Val = 0x00784b5c ;
Reg: trap, Val = 0x0000b030 ; Reg: dar, Val = 0x77777777 ;
Reg: dsisr, Val = 0x40000000 ; Reg: result, Val = 0x00020300 ;
Dump stack (total 1024 bytes, 16 bytes/line):
0xe2be5ea0: 02 be 5e c0 24 00 00 24 00 00 00 00 05 7d 94 84
0xe2be5eb0: 00 00 00 04 00 00 00 00 00 00 00 28 05 8d 34 c4
0xe2be5ec0: 02 be 60 a0 01 86 ef f0 00 00 00 00 00 00 00 00
0xe2be5ed0: 02 04 05 b4 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5ef0: 95 47 73 35 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f00: a0 e1 64 21 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f10: 00 00 00 00 00 00 00 00 00 00 00 00 01 e9 00 00
0xe2be5f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f30: 00 00 00 00 00 00 00 00 02 be 66 c0 02 be 66 d0
0xe2be5f40: 02 be 61 e0 00 00 00 02 00 00 00 00 02 44 b3 a4
0xe2be5f50: 02 be 5f 90 00 00 00 08 02 be 5f e0 00 00 00 08
0xe2be5f60: 02 be 5f 80 00 ac 1b 14 00 00 00 00 00 00 00 00
0xe2be5f70: 05 b4 5f 90 02 be 5f e0 00 00 00 30 02 be 5f e0
0xe2be5f80: 02 be 5f c0 00 ac 1b f4 00 00 00 00 02 45 00 00
0xe2be5f90: 00 03 00 00 00 00 00 00 02 be 5f e0 00 00 00 30
0xe2be5fa0: 02 be 5f c0 00 ac 1b 14 61 f1 2e ae 02 45 00 00
0xe2be5fb0: 02 44 b3 74 02 be 5f d0 00 00 00 30 02 be 5f e0
0xe2be5fc0: 02 be 60 60 01 74 ff f8 00 00 00 00 00 00 08 00
0xe2be5fd0: 02 be 5f f0 00 e8 93 7e 02 be 5f f8 02 be 5f fc
0xe2be5fe0: 00 00 00 00 00 00 00 00 00 00 00 00 02 be 60 18
0xe2be5ff0: 02 be 60 10 00 e9 65 98 00 00 00 58 00 00 2a 4f
0xe2be6000: 02 be 60 10 00 00 00 00 00 00 00 00 02 be 60 68
0xe2be6010: 02 be 60 40 00 e8 c6 a0 00 00 11 17 00 00 00 00
0xe2be6020: 02 be 60 40 00 00 00 00 00 00 00 00 02 be 60 98
0xe2be6030: 02 27 00 00 00 00 00 00 00 00 00 00 02 be 60 68
0xe2be6040: 02 be 60 60 00 00 00 01 00 00 b0 30 02 be 60 98
0xe2be6050: 00 00 00 04 02 21 00 00 00 00 00 00 01 e9 00 00
0xe2be6060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be6070: 00 00 00 00 00 00 00 00 02 be 66 c0 02 be 66 d0
0xe2be6080: 02 be 61 e0 00 00 00 02 00 00 00 00 02 be 61 70
0xe2be6090: 00 00 00 00 02 21 00 00 05 8d 34 c4 05 7d 92 44
Call trace:
Function Address = 0x8012a4b4
Function Address = 0x8017989c
Function Address = 0x80179b30
Function Address = 0x80127438
Function Address = 0x8012d734
Function Address = 0x80100a00
Function Address = 0xe0071004
Function Address = 0x8016ce0c
Function Address = 0x801223a0
Instruction dump:
41a2fe9c 812300ec 800200ec 7f890000 409efe8c 80010014 540b07b9 40a2fe80
4bfffe6c 80780290 7f64db78 4804ea35 <807f002c> 38800000 38a00080 3863000c
Field |
Description |
Description |
Description for the kernel thread deadloop, including the CPU number, thread running time, thread name, and thread number. |
Recorded at |
Time when the kernel thread deadloop was recorded, with microsecond precision. |
Occurred at |
Time when the kernel thread deadloop occurred, with microsecond precision. |
Instruction address |
Instruction address for the kernel thread deadloop. |
Thread |
Name and number of the kernel thread deadloop. |
Context |
Context for the kernel thread deadloop. |
Cpu |
Number of the CPU where the kernel thread ran. |
VCPU ID |
Number of the CPU core where the kernel thread ran. |
Kernel module info |
Information about kernel modules that had been loaded when the kernel thread deadloop was detected, including: · Module name—Kernel module name. · Module address—Memory address of the module. |
Last 5 thread switches |
Last five kernel thread switches on the CPU before the kernel thread deadloop was detected, including kernel thread name and kernel thread switching time with microsecond precision. |
Register content |
Register information: · Reg—Name of a register. · Val—Value saved in a register. |
Dump stack |
Stack information. |
Call trace |
Function call stack information, which shows the instruction address of a called function at each level. |
Instruction dump |
Instruction code when the kernel thread deadloop was detected. ffffffff indicates an illegitimate instruction code. |
No information to display |
No kernel thread deadloop information. |
Related commands
reset kernel deadloop
display kernel deadloop configuration
Use display kernel deadloop configuration to display kernel thread deadloop detection configuration.
Syntax
display kernel deadloop configuration
Views
Any view
Predefined user roles
network-admin
Examples
# Display kernel thread deadloop detection configuration.
<Sysname> display kernel deadloop configuration
Thread dead loop detection: Enabled
Dead loop timer (in seconds): 20
Threads excluded from monitoring: 1
TID: 15 Name: co0
Table 3 Command output
Field |
Description |
Dead loop timer (in seconds): n |
Time interval (in seconds) to identify a kernel thread deadloop. A kernel thread deadloop occurs if a kernel thread runs more than n seconds. |
Threads excluded from monitoring |
Kernel threads excluded from kernel thread deadloop detection. This field appears only if the monitor kernel deadloop exclude-thread command is configured. |
Name |
Kernel thread name. |
TID |
Kernel thread number. |
No thread is excluded from monitoring |
All kernel threads are monitored by kernel thread deadloop detection. |
display kernel exception
Use display kernel exception to display kernel thread exception information.
Syntax
display kernel exception show-number [ offset ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
Parameters
show-number: Specifies the number of kernel exceptions to display, in the range of 1 to 20.
offset: Specifies the offset between the starting exception and the most recent exception, in the rang eof 0 to 19. The default value is 0.
verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.
Usage guidelines
If an exception occurs to a running kernel thread, the system automatically records the exception information.
Examples
# Display brief information about the most recent kernel thread exception.
<Sysname> display kernel exception 1
----------------- Exception record 1 -----------------
Description : Oops[#0]
Recorded at : 2019-05-01 11:16:00.823018
Occurred at : 2019-05-01 11:16:00.823018
Instruction address : 0x4004158c
Thread : comsh (TID: 16306)
Context : thread context
Slot : 0
Cpu : 0
VCPU ID : 0
Kernel module info : module name (mrpnc) module address (0xe332a000)
module name (disk) module address (0xe00bd000)
# Display detailed information about the most recent kernel thread exception.
<Sysname> display kernel exception 1 verbose
----------------- Exception record 1 -----------------
Description : Oops[#0]
Recorded at : 2019-05-01 11:16:00.823018
Occurred at : 2019-05-01 11:16:00.823018
Instruction address : 0x4004158c
Thread : comsh (TID: 16306)
Context : thread context
Slot : 0
Cpu : 0
VCPU ID : 0
Kernel module info : module name (mrpnc) module address (0xe332a000)
module name (12500) module address (0xe00bd000)
Last 5 thread switches : migration/0 (11:16:00.823018)-->
swapper (11:16:00.833018)-->
kthreadd (11:16:00.833518)-->
swapper (11:16:00.833550)-->
disk (11:16:00.833560)
Register content:
Reg: r0, Val = 0x00000000 ; Reg: r1, Val = 0xe2be5ea0 ;
Reg: r2, Val = 0x00000000 ; Reg: r3, Val = 0x77777777 ;
Reg: r4, Val = 0x00000000 ; Reg: r5, Val = 0x00001492 ;
Reg: r6, Val = 0x00000000 ; Reg: r7, Val = 0x0000ffff ;
Reg: r8, Val = 0x77777777 ; Reg: r9, Val = 0x00000000 ;
Reg: r10, Val = 0x00000001 ; Reg: r11, Val = 0x0000002c ;
Reg: r12, Val = 0x057d9484 ; Reg: r13, Val = 0x00000000 ;
Reg: r14, Val = 0x00000000 ; Reg: r15, Val = 0x02000000 ;
Reg: r16, Val = 0xe2be5f00 ; Reg: r17, Val = 0x00000000 ;
Reg: r18, Val = 0x00000000 ; Reg: r19, Val = 0x00000000 ;
Reg: r20, Val = 0x024c10f8 ; Reg: r21, Val = 0x057d9244 ;
Reg: r22, Val = 0x00002000 ; Reg: r23, Val = 0x0000002c ;
Reg: r24, Val = 0x00000002 ; Reg: r25, Val = 0x24000024 ;
Reg: r26, Val = 0x00000000 ; Reg: r27, Val = 0x057d9484 ;
Reg: r28, Val = 0x0000002c ; Reg: r29, Val = 0x00000000 ;
Reg: r30, Val = 0x0000002c ; Reg: r31, Val = 0x00000000 ;
Reg: cr, Val = 0x84000028 ; Reg: nip, Val = 0x057d9550 ;
Reg: xer, Val = 0x00000000 ; Reg: lr, Val = 0x0186eff0 ;
Reg: ctr, Val = 0x682f7344 ; Reg: msr, Val = 0x00784b5c ;
Reg: trap, Val = 0x0000b030 ; Reg: dar, Val = 0x77777777 ;
Reg: dsisr, Val = 0x40000000 ; Reg: result, Val = 0x00020300 ;
Dump stack (total 1024 bytes, 16 bytes/line):
0xe2be5ea0: 02 be 5e c0 24 00 00 24 00 00 00 00 05 7d 94 84
0xe2be5eb0: 00 00 00 04 00 00 00 00 00 00 00 28 05 8d 34 c4
0xe2be5ec0: 02 be 60 a0 01 86 ef f0 00 00 00 00 00 00 00 00
0xe2be5ed0: 02 04 05 b4 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5ef0: 95 47 73 35 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f00: a0 e1 64 21 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f10: 00 00 00 00 00 00 00 00 00 00 00 00 01 e9 00 00
0xe2be5f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f30: 00 00 00 00 00 00 00 00 02 be 66 c0 02 be 66 d0
0xe2be5f40: 02 be 61 e0 00 00 00 02 00 00 00 00 02 44 b3 a4
0xe2be5f50: 02 be 5f 90 00 00 00 08 02 be 5f e0 00 00 00 08
0xe2be5f60: 02 be 5f 80 00 ac 1b 14 00 00 00 00 00 00 00 00
0xe2be5f70: 05 b4 5f 90 02 be 5f e0 00 00 00 30 02 be 5f e0
0xe2be5f80: 02 be 5f c0 00 ac 1b f4 00 00 00 00 02 45 00 00
0xe2be5f90: 00 03 00 00 00 00 00 00 02 be 5f e0 00 00 00 30
0xe2be5fa0: 02 be 5f c0 00 ac 1b 14 61 f1 2e ae 02 45 00 00
0xe2be5fb0: 02 44 b3 74 02 be 5f d0 00 00 00 30 02 be 5f e0
0xe2be5fc0: 02 be 60 60 01 74 ff f8 00 00 00 00 00 00 08 00
0xe2be5fd0: 02 be 5f f0 00 e8 93 7e 02 be 5f f8 02 be 5f fc
0xe2be5fe0: 00 00 00 00 00 00 00 00 00 00 00 00 02 be 60 18
0xe2be5ff0: 02 be 60 10 00 e9 65 98 00 00 00 58 00 00 2a 4f
0xe2be6000: 02 be 60 10 00 00 00 00 00 00 00 00 02 be 60 68
0xe2be6010: 02 be 60 40 00 e8 c6 a0 00 00 11 17 00 00 00 00
0xe2be6020: 02 be 60 40 00 00 00 00 00 00 00 00 02 be 60 98
0xe2be6030: 02 27 00 00 00 00 00 00 00 00 00 00 02 be 60 68
0xe2be6040: 02 be 60 60 00 00 00 01 00 00 b0 30 02 be 60 98
0xe2be6050: 00 00 00 04 02 21 00 00 00 00 00 00 01 e9 00 00
0xe2be6060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be6070: 00 00 00 00 00 00 00 00 02 be 66 c0 02 be 66 d0
0xe2be6080: 02 be 61 e0 00 00 00 02 00 00 00 00 02 be 61 70
0xe2be6090: 00 00 00 00 02 21 00 00 05 8d 34 c4 05 7d 92 44
Call trace:
Function Address = 0x8012a4b4
Function Address = 0x8017989c
Function Address = 0x80179b30
Function Address = 0x80127438
Function Address = 0x8012d734
Function Address = 0x80100a00
Function Address = 0xe0071004
Function Address = 0x8016ce0c
Function Address = 0x801223a0
Instruction dump:
41a2fe9c 812300ec 800200ec 7f890000 409efe8c 80010014 540b07b9 40a2fe80
4bfffe6c 80780290 7f64db78 4804ea35 <807f002c> 38800000 38a00080 3863000c
For more information about the command output, see Table 4.
Related commands
reset kernel exception
display kernel reboot
Use display kernel reboot to display reboot information for the device.
Syntax
display kernel reboot show-number [ offset ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
Parameters
show-number: Specifies the number of reboots to display, in the range of 1 to 20.
offset: Specifies the offset between the starting reboot and the most recent reboot, in the range of 0 to 19. The default value is 0.
verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.
Examples
# Display brief information about the most recent reboot.
<Sysname> display kernel reboot 1
----------------- Reboot record 1 -----------------
Recorded at : 2019-05-01 11:16:00.823018
Occurred at : 2019-05-01 11:16:00.823018
Reason : 0x31
Thread : comsh (TID: 16306)
Context : thread context
Slot : 0
Target Slot : 0
Cpu : 0
VCPU ID : 0
Kernel module info : module name (mrpnc) module address (0xe332a000)
module name (12500) module address (0xe00bd000)
# Display detailed information about the most recent reboot.
<Sysname> display kernel reboot 1 verbose
----------------- Reboot record 1 -----------------
Recorded at : 2019-05-01 11:16:00.823018
Occurred at : 2019-05-01 11:16:00.823018
Reason : 0x31
Thread : comsh (TID: 16306)
Context : thread context
Slot : 0
Target Slot : 0
Cpu : 0
VCPU ID : 0
Kernel module info : module name (mrpnc) module address (0xe332a000)
module name (12500) module address (0xe00bd000)
Last 5 thread switches : migration/0 (11:16:00.823018)-->
swapper (11:16:00.833018)-->
kthreadd (11:16:00.833518)-->
swapper (11:16:00.833550)-->
disk (11:16:00.833560)
Dump stack (total 1024 bytes, 16 bytes/line):
0xe2be5ea0: 02 be 5e c0 24 00 00 24 00 00 00 00 05 7d 94 84
0xe2be5eb0: 00 00 00 04 00 00 00 00 00 00 00 28 05 8d 34 c4
0xe2be5ec0: 02 be 60 a0 01 86 ef f0 00 00 00 00 00 00 00 00
0xe2be5ed0: 02 04 05 b4 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5ef0: 95 47 73 35 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f00: a0 e1 64 21 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f10: 00 00 00 00 00 00 00 00 00 00 00 00 01 e9 00 00
0xe2be5f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f30: 00 00 00 00 00 00 00 00 02 be 66 c0 02 be 66 d0
0xe2be5f40: 02 be 61 e0 00 00 00 02 00 00 00 00 02 44 b3 a4
0xe2be5f50: 02 be 5f 90 00 00 00 08 02 be 5f e0 00 00 00 08
0xe2be5f60: 02 be 5f 80 00 ac 1b 14 00 00 00 00 00 00 00 00
0xe2be5f70: 05 b4 5f 90 02 be 5f e0 00 00 00 30 02 be 5f e0
0xe2be5f80: 02 be 5f c0 00 ac 1b f4 00 00 00 00 02 45 00 00
0xe2be5f90: 00 03 00 00 00 00 00 00 02 be 5f e0 00 00 00 30
0xe2be5fa0: 02 be 5f c0 00 ac 1b 14 61 f1 2e ae 02 45 00 00
0xe2be5fb0: 02 44 b3 74 02 be 5f d0 00 00 00 30 02 be 5f e0
0xe2be5fc0: 02 be 60 60 01 74 ff f8 00 00 00 00 00 00 08 00
0xe2be5fd0: 02 be 5f f0 00 e8 93 7e 02 be 5f f8 02 be 5f fc
0xe2be5fe0: 00 00 00 00 00 00 00 00 00 00 00 00 02 be 60 18
0xe2be5ff0: 02 be 60 10 00 e9 65 98 00 00 00 58 00 00 2a 4f
0xe2be6000: 02 be 60 10 00 00 00 00 00 00 00 00 02 be 60 68
0xe2be6010: 02 be 60 40 00 e8 c6 a0 00 00 11 17 00 00 00 00
0xe2be6020: 02 be 60 40 00 00 00 00 00 00 00 00 02 be 60 98
0xe2be6030: 02 27 00 00 00 00 00 00 00 00 00 00 02 be 60 68
0xe2be6040: 02 be 60 60 00 00 00 01 00 00 b0 30 02 be 60 98
0xe2be6050: 00 00 00 04 02 21 00 00 00 00 00 00 01 e9 00 00
0xe2be6060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be6070: 00 00 00 00 00 00 00 00 02 be 66 c0 02 be 66 d0
0xe2be6080: 02 be 61 e0 00 00 00 02 00 00 00 00 02 be 61 70
0xe2be6090: 00 00 00 00 02 21 00 00 05 8d 34 c4 05 7d 92 44
Call trace:
Function Address = 0x8012a4b4
Function Address = 0x8017989c
Function Address = 0x80179b30
Function Address = 0x80127438
Function Address = 0x8012d734
Function Address = 0x80100a00
Function Address = 0xe0071004
Function Address = 0x8016ce0c
Function Address = 0x801223a0
Field |
Description |
Recorded at |
Time when the reboot was recorded, with microsecond precision. |
Occurred at |
Time when the reboot occurred, with microsecond precision. |
Reason |
Reboot reason. |
Thread |
Name and number of the kernel thread that was running when the reboot occurred. |
Context |
Context where the reboot occurred. |
Slot |
The value of this field is fixed at 0. |
Target Slot |
The value of this field is fixed at 0. |
Cpu |
Number of the CPU that triggered the reboot. |
VCPU ID |
Number of the CPU core that triggered the reboot. |
Kernel module info |
Information about kernel modules that had been loaded when the reboot occurred, including the kernel module names and memory addresses. |
Last 5 thread switches |
Last five kernel thread switches that occurred on the CPU before the reboot, including the kernel thread names and kernel thread switching time points, with microsecond precision. |
Dump stack |
Stack information for the threads that were running when the reboot occurred. |
Call trace |
Function call stack information. |
No information to display |
No reboot information exists. |
Related commands
reset kernel reboot
display kernel starvation
Use display kernel starvation to display kernel thread starvation information.
Syntax
display kernel starvation show-number [ offset ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
Parameters
show-number: Specifies the number of thread starvations to display, in the range of 1 to 20.
offset: Specifies the offset between the starting starvation and the most recent starvation, in the range of 0 to 19. The default value is 0.
verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.
Examples
# Display brief information about the most recent kernel thread starvation.
<Sysname> display kernel starvation 1
----------------- Starvation record 1 -----------------
Description : INFO: task comsh: 16306 blocked for more than 10 seconds.
Recorded at : 2019-05-01 11:16:00.823018
Occurred at : 2019-05-01 11:16:00.823018
Instruction address : 0x4004158c
Thread : comsh (TID: 16306)
Context : thread context
Slot : 0
Cpu : 0
VCPU ID : 0
Kernel module info : module name (mrpnc) module address (0xe332a000)
module name (12500) module address (0xe00bd000)
# Display detailed information about the most recent kernel thread starvation.
<Sysname> display kernel starvation 1 verbose
----------------- Starvation record 1 -----------------
Description : INFO: task comsh: 16306 blocked for more than 10 seconds.
Recorded at : 2019-05-01 11:16:00.823018
Occurred at : 2019-05-01 11:16:00.823018
Instruction address : 0x4004158c
Thread : comsh (TID: 16306)
Context : thread context
Slot : 0
Cpu : 0
VCPU ID : 0
Kernel module info : module name (mrpnc) module address (0xe332a000)
module name (12500) module address (0xe00bd000)
Last 5 thread switches : migration/0 (11:16:00.823018)-->
swapper (11:16:00.833018)-->
kthreadd (11:16:00.833518)-->
swapper (11:16:00.833550)-->
disk (11:16:00.833560)
Register content:
Reg: r0, Val = 0x00000000 ; Reg: r1, Val = 0xe2be5ea0 ;
Reg: r2, Val = 0x00000000 ; Reg: r3, Val = 0x77777777 ;
Reg: r4, Val = 0x00000000 ; Reg: r5, Val = 0x00001492 ;
Reg: r6, Val = 0x00000000 ; Reg: r7, Val = 0x0000ffff ;
Reg: r8, Val = 0x77777777 ; Reg: r9, Val = 0x00000000 ;
Reg: r10, Val = 0x00000001 ; Reg: r11, Val = 0x0000002c ;
Reg: r12, Val = 0x057d9484 ; Reg: r13, Val = 0x00000000 ;
Reg: r14, Val = 0x00000000 ; Reg: r15, Val = 0x02000000 ;
Reg: r16, Val = 0xe2be5f00 ; Reg: r17, Val = 0x00000000 ;
Reg: r18, Val = 0x00000000 ; Reg: r19, Val = 0x00000000 ;
Reg: r20, Val = 0x024c10f8 ; Reg: r21, Val = 0x057d9244 ;
Reg: r22, Val = 0x00002000 ; Reg: r23, Val = 0x0000002c ;
Reg: r24, Val = 0x00000002 ; Reg: r25, Val = 0x24000024 ;
Reg: r26, Val = 0x00000000 ; Reg: r27, Val = 0x057d9484 ;
Reg: r28, Val = 0x0000002c ; Reg: r29, Val = 0x00000000 ;
Reg: r30, Val = 0x0000002c ; Reg: r31, Val = 0x00000000 ;
Reg: cr, Val = 0x84000028 ; Reg: nip, Val = 0x057d9550 ;
Reg: xer, Val = 0x00000000 ; Reg: lr, Val = 0x0186eff0 ;
Reg: ctr, Val = 0x682f7344 ; Reg: msr, Val = 0x00784b5c ;
Reg: trap, Val = 0x0000b030 ; Reg: dar, Val = 0x77777777 ;
Reg: dsisr, Val = 0x40000000 ; Reg: result, Val = 0x00020300 ;
Dump stack (total 1024 bytes, 16 bytes/line):
0xe2be5ea0: 02 be 5e c0 24 00 00 24 00 00 00 00 05 7d 94 84
0xe2be5eb0: 00 00 00 04 00 00 00 00 00 00 00 28 05 8d 34 c4
0xe2be5ec0: 02 be 60 a0 01 86 ef f0 00 00 00 00 00 00 00 00
0xe2be5ed0: 02 04 05 b4 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5ef0: 95 47 73 35 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f00: a0 e1 64 21 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f10: 00 00 00 00 00 00 00 00 00 00 00 00 01 e9 00 00
0xe2be5f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be5f30: 00 00 00 00 00 00 00 00 02 be 66 c0 02 be 66 d0
0xe2be5f40: 02 be 61 e0 00 00 00 02 00 00 00 00 02 44 b3 a4
0xe2be5f50: 02 be 5f 90 00 00 00 08 02 be 5f e0 00 00 00 08
0xe2be5f60: 02 be 5f 80 00 ac 1b 14 00 00 00 00 00 00 00 00
0xe2be5f70: 05 b4 5f 90 02 be 5f e0 00 00 00 30 02 be 5f e0
0xe2be5f80: 02 be 5f c0 00 ac 1b f4 00 00 00 00 02 45 00 00
0xe2be5f90: 00 03 00 00 00 00 00 00 02 be 5f e0 00 00 00 30
0xe2be5fa0: 02 be 5f c0 00 ac 1b 14 61 f1 2e ae 02 45 00 00
0xe2be5fb0: 02 44 b3 74 02 be 5f d0 00 00 00 30 02 be 5f e0
0xe2be5fc0: 02 be 60 60 01 74 ff f8 00 00 00 00 00 00 08 00
0xe2be5fd0: 02 be 5f f0 00 e8 93 7e 02 be 5f f8 02 be 5f fc
0xe2be5fe0: 00 00 00 00 00 00 00 00 00 00 00 00 02 be 60 18
0xe2be5ff0: 02 be 60 10 00 e9 65 98 00 00 00 58 00 00 2a 4f
0xe2be6000: 02 be 60 10 00 00 00 00 00 00 00 00 02 be 60 68
0xe2be6010: 02 be 60 40 00 e8 c6 a0 00 00 11 17 00 00 00 00
0xe2be6020: 02 be 60 40 00 00 00 00 00 00 00 00 02 be 60 98
0xe2be6030: 02 27 00 00 00 00 00 00 00 00 00 00 02 be 60 68
0xe2be6040: 02 be 60 60 00 00 00 01 00 00 b0 30 02 be 60 98
0xe2be6050: 00 00 00 04 02 21 00 00 00 00 00 00 01 e9 00 00
0xe2be6060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xe2be6070: 00 00 00 00 00 00 00 00 02 be 66 c0 02 be 66 d0
0xe2be6080: 02 be 61 e0 00 00 00 02 00 00 00 00 02 be 61 70
0xe2be6090: 00 00 00 00 02 21 00 00 05 8d 34 c4 05 7d 92 44
Call trace:
Function Address = 0x8012a4b4
Function Address = 0x8017989c
Function Address = 0x80179b30
Function Address = 0x80127438
Function Address = 0x8012d734
Function Address = 0x80100a00
Function Address = 0xe0071004
Function Address = 0x8016ce0c
Function Address = 0x801223a0
Instruction dump:
41a2fe9c 812300ec 800200ec 7f890000 409efe8c 80010014 540b07b9 40a2fe80
4bfffe6c 80780290 7f64db78 4804ea35 <807f002c> 38800000 38a00080 3863000c
For detailed information about the command output, see Table 4.
Related commands
reset kernel starvation
display kernel starvation configuration
Use display kernel starvation configuration to display kernel thread starvation detection configuration.
Syntax
display kernel starvation configuration
Views
Any view
Predefined user roles
network-admin
Examples
# Display kernel thread starvation detection configuration.
<Sysname> display kernel starvation configuration
Thread starvation detection: Disabled
Starvation timer (in seconds): 10
Threads excluded from monitoring: 1
TID: 123 Name: co0
Table 5 Command output
Field |
Description |
Starvation timer (in seconds): n |
Time interval (in seconds) to identify a kernel thread starvation. A kernel thread starvation occurs if a kernel thread does not run within n seconds. |
Threads excluded from monitoring |
Kernel threads excluded from kernel thread starvation detection. |
Name |
Kernel thread name. |
TID |
Kernel thread number. |
monitor kernel starvation enable
monitor kernel starvation exclude-thread
monitor kernel starvation time
display process
Use display process to display process state information.
Syntax
display process [ all | job job-id | name process-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
all: Specifies all processes. With the all keyword or without any parameters, the command displays state information for all processes.
job job-id: Specifies a process by its job ID, in the range of 1 to 2147483647. Each process has a fixed job ID.
name process-name: Specifies a process by its name, a case-insensitive string of 1 to 15 characters that must not contain question marks or spaces.
Examples
# Display state information for the process scmd.
<Sysname> display process name scmd
Job ID: 1
PID: 1
Parent JID: 0
Parent PID: 0
Executable path: /sbin/scmd
Instance: 0
Respawn: OFF
Respawn count: 1
Max. spawns per minute: 0
Last started: Wed Jun 1 14:45:46 2019
Process state: sleeping
Max. core: 0
ARGS: -
TID LAST_CPU Stack PRI State HH:MM:SS:MSEC Name
1 0 0K 120 S 0:0:5:220 scmd
Table 6 Command output
Field |
Description |
Job ID |
Job ID of the process. The job ID never changes. |
PID |
Number of the process. The number identifies the process, and it might change as the process restarts. |
Parent JID |
Job ID of the parent process. |
Parent PID |
Number of the parent process. |
Executable path |
Executable path of the process. For a kernel thread, this field displays a hyphen (-). |
Instance |
Instance number of the process. Whether a process can run multiple instances depends on the software implementation. |
Respawn |
Indicates whether the process restarts when an error occurs: · ON—The process automatically restarts. · OFF—The process does not automatically restarts. |
Respawn count |
Times that the process has restarted. The starting value is 1. |
Max. spawns per minute |
Maximum number of times that the process can restart within one minute. If the threshold is reached, the system automatically shuts down the process. |
Last started |
Time when the most recent restart occurred. |
Process state |
State of the process: · running—Running or waiting in the queue. · sleeping—Interruptible sleep. · traced or stopped—Stopped. · uninterruptible sleep—Uninterruptible sleep. · zombie—The process has quit, but some resources are not released. |
Max. core |
Maximum number of core dump files that the process can create. 0 indicates that the process never creates a core dump file. A process creates a core dump file after it abnormally restarts. If the number of core dump files reaches the maximum value, no more core dump files are created. Core dump files are helpful for troubleshooting. |
ARGS |
Parameters carried by the process during startup. If the process carries no parameters, this field displays a hyphen (-). |
TID |
Thread ID. |
LAST_CPU |
Number of the CPU on which the process is last scheduled. |
Stack |
Stack size. |
PRI |
Thread priority. |
State |
Thread state: · R—Running. · S—Sleeping. · T—Traced or stopped. · D—Uninterruptible sleep. · Z—Zombie. |
HH:MM:SS:MSEC |
Running time since the most recent start. |
Name |
Process name. |
# Display state information for all processes.
<Sysname> display process all
JID PID %CPU %MEM STAT PRI THIRD TTY HH:MM:SS COMMAND
1 1 0.0 0.0 S 120 N - 00:00:04 scmd
2 2 0.0 0.0 S 115 N - 00:00:00 [kthreadd]
3 3 0.0 0.0 S 99 N - 00:00:00 [migration/0]
4 4 0.0 0.0 S 115 N - 00:00:05 [ksoftirqd/0]
5 5 0.0 0.0 S 99 N - 00:00:00 [watchdog/0]
6 6 0.0 0.0 S 115 N - 00:00:00 [events/0]
7 7 0.0 0.0 S 115 N - 00:00:00 [khelper]
8 8 0.0 0.0 S 115 N - 00:00:00 [kblockd/0]
9 9 0.0 0.0 S 115 N - 00:00:00 [ata/0]
10 10 0.0 0.0 S 115 N - 00:00:00 [ata_aux]
11 11 0.0 0.0 S 115 N - 00:00:00 [kseriod]
12 12 0.0 0.0 S 120 N - 00:00:00 [vzmond]
13 13 0.0 0.0 S 120 N - 00:00:00 [pdflush]
14 14 0.0 0.0 S 120 N - 00:00:00 [pdflush]
15 15 0.0 0.0 S 115 N - 00:00:00 [kswapd0]
16 16 0.0 0.0 S 115 N - 00:00:00 [aio/0]
17 17 0.0 0.0 S 115 N - 00:00:00 [scsi_eh_0]
18 18 0.0 0.0 S 115 N - 00:00:00 [scsi_eh_1]
19 19 0.0 0.0 S 115 N - 00:00:00 [scsi_eh_2]
35 35 0.0 0.0 D 100 N - 00:00:00 [lipc_topology]
---- More ----
Table 7 Command output
Field |
Description |
JID |
Job ID of a process. It never changes. |
PID |
Number of a process. |
%CPU |
Ratio of CPU resources consumed by the process to the total CPU resources of the device, in percentage. |
%MEM |
Ratio of memory consumed by the process to the total memory of the device, in percentage. |
STAT |
State of a process: · R—Running. · S—Sleeping. · T—Traced or stopped. · D—Uninterruptible sleep. · Z—Zombie. |
PRI |
Priority of a process for scheduling. |
THIRD |
This field is not supported in the current software version. Whether the process is a third party process: · Y—The process is a third party process. · N—The process is not a third party process. |
TTY |
TTY used by a process. |
HH:MM:SS |
Running time since the most recent start. If the running time reaches or exceeds 100 hours, this field displays only the number of hours. |
COMMAND |
Name and parameters of a process. If square brackets ([ ]) exist in a process name, the process is a kernel thread. |
display process cpu
Use display process cpu to display CPU usage for all processes.
Syntax
display process cpu
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display CPU usage for all processes.
<Sysname> display process cpu
CPU utilization in 5 secs: 16.8%; 1 min: 4.7%; 5 mins: 4.7%
JID 5Sec 1Min 5Min Name
1 0.0% 0.0% 0.0% scmd
2 0.0% 0.0% 0.0% [kthreadd]
3 0.1% 0.0% 0.0% [ksoftirqd/0]
...
Table 8 Command output
Field |
Description |
CPU utilization in 5 secs: 16.8%; 1 min: 4.7%; 5 mins: 4.7% |
System CPU usage within the last 5 seconds, 1 minute, and 5 minutes. |
JID |
Job ID of a process. It never changes. |
5Sec |
CPU usage of the process within the last 5 seconds. |
1Min |
CPU usage of the process within the last minute. |
5Min |
CPU usage of the process within the last 5 minutes. |
Name |
Name of the process. If square brackets ([ ]) exist in a process name, the process is a kernel thread. |
display process log
Use display process log to display log information for all user processes.
Syntax
display process log
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display log information for all user processes.
<Sysname> display process log
Process JobID PID Abort Core Exit Kill StartTime EndTime
knotify 92 92 N N 0 36 12-17 07:10:27 12-17 07:10:27
knotify 93 93 N N 0 -- 12-17 07:10:27 12-17 07:10:27
automount 94 94 N N 0 -- 12-17 07:10:27 12-17 07:10:28
knotify 111 111 N N 0 -- 12-17 07:10:28 12-17 07:10:28
comsh 121 121 N N 0 -- 12-17 07:10:30 12-17 07:10:30
knotify 152 152 N N 0 -- 12-17 07:10:31 12-17 07:10:31
autocfgd 155 155 N N 0 -- 12-17 07:10:31 12-17 07:10:31
pkg_update 122 122 N N 0 -- 12-17 07:10:30 12-17 07:10:31
Table 9 Command output
Field |
Description |
Process |
Name of a user process. |
JobID |
Job ID of a user process. |
PID |
ID of a user process. |
Abort |
Indicates whether the process exited abnormally: · Y—Yes. · N—No. |
Core |
Indicates whether the process can generate core dump files: · Y—Yes. · N—No. |
Exit |
Process exit code. This field displays two hyphens (--) if the process was killed by a signal. |
Kill |
Code of the signal that killed the process. This field displays two hyphens (--) if the process exited instead of being killed. |
StartTime |
Time when the user process started. |
EndTime |
Time when the user process ended. |
display process memory
Use display process memory to display memory usage for all user processes.
Syntax
display process memory
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
When a user process starts, it requests the following types of memory from the system:
· Text memory—Stores code for the user process.
· Data memory—Stores data for the user process.
· Stack memory—Stores temporary data.
· Dynamic memory—Heap memory dynamically assigned and released by the system according to the needs of the user process. To view dynamic memory information, execute the display process memory heap command.
Examples
# Display memory usage for all user processes.
<Sysname> display process memory
JID Text Data Stack Dynamic Name
1 384 1800 16 36 scmd
2 0 0 0 0 [kthreadd]
3 0 0 0 0 [ksoftirqd/0]
4 0 0 0 0 [watchdog/0]
5 0 0 0 0 [events/0]
6 0 0 0 0 [khelper]
29 0 0 0 0 [kblockd/0]
49 0 0 0 0 [vzmond]
52 0 0 0 0 [pdflush]
---- More ----
Table 10 Command output
Field |
Description |
JID |
Job ID of a process. It never changes. |
Text |
Text memory used by the user process, in KB. The value for a kernel thread is 0. |
Data |
Data memory used by the user process, in KB. The value for a kernel thread is 0. |
Stack |
Stack memory used by the user process, in KB. The value for a kernel thread is 0. |
Dynamic |
Dynamic memory used by the user process, in KB. The value for a kernel thread is 0. |
Name |
Name of the user process. If square brackets ([ ]) exist in a process name, the process is a kernel thread. |
Related commands
display process memory heap
display process memory heap address
display process memory heap size
display process memory fragment free
Use display process memory fragment free to display free memory block information for a user process.
Syntax
display process memory fragment free job job-id
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
job job-id: Specifies a process by its job ID, in the range of 1 to 2147483647. Each process has a fixed job ID.
Usage guidelines
A user process requests memory from the system when it is running. It will release the memory as a whole, instead of any free memory blocks in it.
Use this command to view the start address and size of free memory blocks that are greater than 32 KB to locate issues such as insufficient memory.
Examples
# Display free memory block information for the user process identified by job ID 1.
<Sysname> display process memory fragment free job 1
Free block greater than or equal to 32KB in the main arena:
Address 0x7f2f0f2bd950 size 32kbytes
Free block greater than or equal to 32KB in A1 arena:
Address 0x7f2f0f4bd980 size 34kbytes
the back chunk is :Address 0x7f2f0f4bd990 size 416 Tag 0
the front chunk is :Address 0x7f2f0f4bd970 size 160 Tag 0
Table 11 Command output
Field |
Description |
Free block greater than or equal to 32KB in the main arena: |
Start address and size of the free memory block that is greater than or equal to 32 KB in the main memory arena. A process has only one main memory arena. |
Free block greater than or equal to 32KB in A1 arena |
Start address and size of the free memory block that is greater than or equal to 32 KB in the non-main memory arena. |
Found no free block greater than or equal to 32KB. |
No free memory block that is greater than or equal to 32 KB is found in the memory arena. |
the back chunk is :Address 0x7f2f0f4bd990 size 416 Tag 0 |
Information about the chunk after the free memory block that is greater than or equal to 32 KB. |
the front chunk is :Address 0x7f2f0f4bd970 size 160 Tag 0 |
Information about the chunk before the free memory block that is greater than or equal to 32 KB. |
display process memory fragment used
Use display process memory fragment used to display used memory block information for a user process.
Syntax
display process memory fragment used used-block job job-id
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
used-block: Specifies the number of used memory blocks, in the range of 1 to 128.
job job-id: Specifies a process by its job ID, in the range of 1 to 2147483647. Each process has a fixed job ID.
Examples
# Display used memory block information for the user process identified by job ID 100.
<Sysname> display process memory fragment used 1 job 100
Main arena:
Top Chunk:
Address 0x88e9468 size 7064
Neighboring 84 chunks used:
Address 0x88e941c size 80
Address 0x88e93cc size 80
Address 0x88e93ac size 32
Address 0x88e935c size 80
Address 0x88e930c size 80
Address 0x88e92ec size 32
Address 0x88e929c size 80
Address 0x88e924c size 80
Address 0x88e91fc size 80
Address 0x88e91dc size 32
Address 0x88e918c size 80
Address 0x88e913c size 80
Address 0x88e90ec size 80
Address 0x88e909c size 80
Address 0x88e904c size 80
Address 0x88e8ffc size 80
Address 0x88e8fac size 80
Address 0x88e8f8c size 32
Address 0x88e8f3c size 80
---- More ----
Table 12 Command output
Field |
Description |
XX arena |
Memory arena. For example, the value can be Main, A1, and A2. A user process can have only one main arena. |
Top chunk |
Address and size of the top memory block. |
Neighboring 1 chunks used: Address0x7f2f8f2bd550 size 48 * |
Used neighboring memory blocks of the top memory block. For a 32-bit device, an asterisk (*) is used to identify a memory size that is smaller than 80 bytes. For a 64-bit device, an asterisk (*) is used to identify a memory size that is smaller than 160 bytes. |
display process memory heap
Use display process memory heap to display heap memory usage for a user process.
Syntax
display process memory heap job job-id [ tag [ tag-id ] | verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
job job-id: Specifies a user process by its job ID, in the range of 1 to 2147483647.
tag [ tag-id ]: Specifies an internal software module by its tag ID, a hexadecimal string in the range of 0 to FFFFFFFF. If you do not specify an internal software module, this command displays heap memory usage for all internal software modules in the process.
verbose: Displays detailed information. If you do not specify this keyword, the command displays brief information.
Usage guidelines
Heap memory comprises fixed-sized blocks such as 16-byte or 64-byte blocks. It stores data and variables used by the user process. When a user process starts, the system dynamically allocates heap memory to the process.
Each memory block has an address represented in hexadecimal format, which can be used to access the memory block. You can view memory block addresses by using the display process memory heap size command, and view memory block contents by using the display process memory heap address command.
Examples
# Display brief information about heap memory usage for the process identified by job ID 1.
<Sysname> display process memory heap job 1
Total virtual memory heap space(in bytes) : 538448
Total physical memory heap space(in bytes) : 356352
Total allocated memory(in bytes) : 369904
Free memory ratio : 0.3%
# Display detailed information about heap memory usage for the process identified by job ID 1.
<Sysname> display process memory heap job 1 verbose
Heap usage:
Size Free Used Total Free Ratio
32 8 304 312 2.6%
48 1 339 340 0.3%
64 4 250 254 1.6%
80 7 16 23 30.4%
96 2 70 72 2.8%
112 1 1 2 50.0%
128 0 7 7 0.0%
160 0 2 2 0.0%
176 0 8 8 0.0%
192 0 63 63 0.0%
224 0 67 67 0.0%
240 0 1 1 0.0%
256 0 6 6 0.0%
288 0 1 1 0.0%
304 0 16 16 0.0%
336 0 2 2 0.0%
384 0 1 1 0.0%
512 0 1 1 0.0%
528 0 9 9 0.0%
544 0 1 1 0.0%
592 0 1 1 0.0%
608 0 2 2 0.0%
720 0 226 226 0.0%
752 0 1 1 0.0%
1008 0 1 1 0.0%
1072 0 3 3 0.0%
1200 0 1 1 0.0%
1680 0 3 3 0.0%
2000 0 5 5 0.0%
2064 0 5 5 0.0%
2096 0 1 1 0.0%
4112 0 13 13 0.0%
5136 0 1 1 0.0%
8240 0 1 1 0.0%
11280 0 1 1 0.0%
Large Memory Usage:
Used Blocks : 0
Used Memory(in bytes): 0
Free Blocks : 2
Free Memory(in bytes): 167120
Large Memory Usage detail:
Size Free Used Total Free Ratio
[32K,64K) 1 0 1 100.0%
[96K,128K) 1 0 1 100.0%
Summary:
Total virtual memory heap space(in bytes) : 538448
Total physical memory heap space(in bytes) : 356352
Total allocated memory(in bytes) : 369904
Free memory ratio : 0.3%
# Display brief information about heap memory usage for all modules in the process identified by job ID 1.
<Sysname> display process memory heap job 1 tag
Total allocated memory: 16101568 bytes
Total free memory: 206480 bytes
Heap usage of the job:
Tag UsedBlocks UsedBytes FreeBlocks FreeBytes
0x0 1289 16101568 17 206480
# Display brief information about heap memory usage for module 0 in the process identified by job ID 1.
<Sysname> display process memory heap job 1 tag 0
Heap usage:
Size UsedBlocks UsedBytes FreeBlocks FreeBytes
32 269 8608 5 160
48 300 14400 1 48
64 227 14528 2 128
80 14 1120 1 80
96 63 6048 0 0
112 1 112 4 448
128 7 896 1 128
160 2 320 0 0
176 6 1056 1 176
192 59 11328 0 0
224 63 14112 0 0
240 1 240 0 0
…
Table 13 Command output
Field |
Description |
Free memory ratio |
Ratio of the heap memory that has been released by the process but not returned to the system to the total virtual heap memory of the process. |
Size |
Size of each memory block, in bytes. For large memory blocks, this field displays a value range in the [n1,n2) format. |
Free |
Number of free memory blocks. |
Used |
Number of used memory blocks. |
Total |
Total number of memory blocks. |
Free Ratio |
Ratio of free memory to total memory. It helps identify fragment information. |
Large Memory Usage |
Large memory usage. |
Used Blocks |
Number of used memory blocks. |
Used Memory(in bytes) |
Used memory size, in bytes. |
Free Blocks |
Number of free memory blocks. |
Free Memory(in bytes) |
Free memory size, in bytes. |
Large Memory Usage detail |
Details about large memory usage. |
Total allocated memory |
Size of heap memory used by the process, in bytes. |
Total free memory |
Size of free heap memory for the process, in bytes. |
Heap usage of the job |
Heap memory usage of the process. |
Tag |
ID of the system internal software module. |
UsedBlocks |
Number of used memory blocks. |
UsedBytes |
Size of used memory, in bytes. |
FreeBlocks |
Number of free memory blocks. |
FreeBytes |
Size of free memory, in bytes. |
Related commands
display process memory
display process memory heap address
display process memory heap size
display process memory heap address
Use display process memory heap address to display heap memory content starting from a specified memory block for a process.
Syntax
display process memory heap job job-id address starting-address length memory-length
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
job job-id: Specifies a user process by its job ID, in the range of 1 to 2147483647.
address starting-address: Specifies the starting memory block by its address.
length memory-length: Specifies the memory block length in the range of 1 to 1024 bytes.
Usage guidelines
When a user process runs abnormally, the command helps locate the problem.
Examples
# Display 128-byte memory block content starting from the memory block 0xb7e30580 for the process job 1.
<Sysname> display process memory heap job 1 address b7e30580 length 128
B7E30580: 14 00 EF FF 00 00 00 00 E4 39 E2 B7 7C 05 E3 B7 .........9..|...
B7E30590: 14 00 EF FF 2F 73 62 69 6E 2F 73 6C 62 67 64 00 ..../sbin/slbgd.
B7E305A0: 14 00 EF FF 00 00 00 00 44 3B E2 B7 8C 05 E3 B7 ........D;......
B7E305B0: 14 00 EF FF 2F 73 62 69 6E 2F 6F 73 70 66 64 00 ..../sbin/ospfd.
B7E305C0: 14 00 EF FF 00 00 00 00 A4 3C E2 B7 AC 05 E3 B7 .........<......
B7E305D0: 14 00 EF FF 2F 73 62 69 6E 2F 6D 73 74 70 64 00 ..../sbin/mstpd.
B7E305E0: 14 00 EF FF 00 00 00 00 04 3E E2 B7 CC 05 E3 B7 .........>......
B7E305F0: 14 00 EF FF 2F 73 62 69 6E 2F 6E 74 70 64 00 00 ..../sbin/ntpd..
Related commands
display process memory heap
display process memory heap size
display process memory heap size
Use display process memory heap size to display the addresses of heap memory blocks with a specified size used by a process.
Syntax
display process memory heap job job-id [ tag tag-id ] size memory-size [ offset offset-size ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
job job-id: Specifies a process by its job ID, in the range of 1 to 2147483647.
tag [ tag-id ]: Specifies an internal software module by its tag ID, a hexadecimal string in the range of 0 to FFFFFFFF. If you do not specify an internal software module, this command displays the addresses of heap memory blocks for all internal software modules in the process.
size memory-size: Specifies the memory block size in the range of 1 to 4294967295.
offset offset-size: Specifies an offset in the range of 0 to 4294967295. The default value is 128. For example, suppose the system allocates 100 16-byte memory blocks to process job 1, and the process has used 66 blocks. Then if you execute the display process memory heap job 1 size 16 offset 50 command, the output shows the addresses of the 51st through 66th 16-byte blocks used by the process.
Usage guidelines
The command displays memory block addresses in hexadecimal format. To view memory block content, execute the display process memory heap address command.
Examples
# Display the addresses of 16-byte memory blocks used by process job 1.
<Sysname> display process memory heap job 1 size 16
0xb7e300c0 0xb7e300d0 0xb7e300e0 0xb7e300f0
0xb7e30100 0xb7e30110 0xb7e30120 0xb7e30130
0xb7e30140 0xb7e30150 0xb7e30160 0xb7e30170
0xb7e30180 0xb7e30190 0xb7e301a0 0xb7e301b0
0xb7e301c0 0xb7e301d0 0xb7e301e0 0xb7e301f0
0xb7e30200 0xb7e30210 0xb7e30220 0xb7e30230
# Display the addresses of 16-byte memory blocks starting from the fifth block used by process job 1.
<Sysname> display process memory heap job 1 size 16 offset 4
0xb7e30100 0xb7e30110 0xb7e30120 0xb7e30130
0xb7e30140 0xb7e30150 0xb7e30160 0xb7e30170
0xb7e30180 0xb7e30190 0xb7e301a0 0xb7e301b0
0xb7e301c0 0xb7e301d0 0xb7e301e0 0xb7e301f0
0xb7e30200 0xb7e30210 0xb7e30220 0xb7e30230
Related commands
display process memory heap
display process memory heap address
exception filepath
Use exception filepath to specify the directory for saving core dump files.
Use undo exception filepath to remove the specified directory.
Syntax
exception filepath directory
undo exception filepath directory
Default
The directory for saving core dump files is the root directory of the default file system. For more information about the default file system, see file system management in Fundamentals Configuration Guide.
Views
User view
Predefined user roles
network-admin
Parameters
directory: Specifies the directory for saving core dump files. The directory must be the root directory of a file system.
Usage guidelines
The system will save core dump files to the core folder in the specified directory on the device. If the core folder does not exist in the specified directory, the system creates the core folder before saving core dump files.
If no directory is specified or the specified directory is not accessible, the system cannot save core dump files.
Examples
# Set the directory for saving core dump files to flash:/.
<Sysname> exception filepath flash:/
Related commands
display exception filepath
process core
monitor kernel deadloop enable
Use monitor kernel deadloop enable to enable kernel thread deadloop detection.
Use undo monitor kernel deadloop enable to disable kernel thread deadloop detection.
Syntax
monitor kernel deadloop enable
undo monitor kernel deadloop enable
Default
Kernel thread deadloop detection is enabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
CAUTION: Use this command only under the guidance of H3C Support. Inappropriate configuration can cause system breakdown. As a best practice, leave the default unchanged. |
Kernel threads share resources in kernel space. If a kernel thread monopolizes the CPU for a long time, other threads cannot run, resulting in a deadloop.
This command enables the device to detect deadloops. If a thread occupies the CPU regularly, the device considers that a deadloop has occurred.
Examples
# Enable kernel thread deadloop detection.
<Sysname> system-view
[Sysname] monitor kernel deadloop enable
Related commands
display kernel deadloop
display kernel deadloop configuration
monitor kernel deadloop exclude-thread
monitor kernel deadloop time
monitor kernel deadloop exclude-thread
Use monitor kernel deadloop exclude-thread to exclude a kernel thread from kernel thread deadloop detection.
Use undo monitor kernel deadloop exclude-thread to include a kernel thread in kernel thread deadloop detection.
Syntax
monitor kernel deadloop exclude-thread tid
undo monitor kernel deadloop exclude-thread [ tid ]
Default
Kernel thread deadloop detection monitors all kernel threads.
Views
System view
Predefined user roles
network-admin
Parameters
tid: Specifies a kernel thread by its ID, in the range of 1 to 2147483647. If you do not specify a kernel thread, the undo command restores the default.
Usage guidelines
Use this command only under the guidance of H3C Support. Inappropriate configuration can cause system breakdown. As a best practice, leave the default unchanged.
You can exclude up to 128 kernel threads from kernel thread deadloop detection.
Examples
# Exclude kernel thread 15 from kernel thread deadloop detection.
<Sysname> system-view
[Sysname]monitor kernel deadloop exclude-thread 15
Related commands
display kernel deadloop configuration
display kernel deadloop
monitor kernel deadloop enable
monitor kernel deadloop time
Use monitor kernel deadloop time to set the threshold for identifying a kernel thread deadloop.
Use undo monitor kernel deadloop time to restore the default.
Syntax
monitor kernel deadloop time time
undo monitor kernel deadloop time
Default
The threshold for identifying a kernel thread deadloop is 10 seconds.
Views
System view
Predefined user roles
network-admin
Parameters
time time: Specifies the threshold for identifying a kernel thread deadloop, in the range of 1 to 65535 seconds.
Usage guidelines
Use this command only under the guidance of H3C Support. Inappropriate configuration can cause system breakdown. As a best practice, leave the default unchanged.
If a kernel thread runs for the specified period of time, kernel thread deadloop detection considers that a deadloop has occurred.
Examples
# Set the threshold for identifying a kernel thread deadloop to 8 seconds.
<Sysname> system-view
[Sysname] monitor kernel deadloop time 8
Related commands
display kernel deadloop configuration
display kernel deadloop
monitor kernel deadloop enable
monitor kernel starvation enable
Use monitor kernel starvation enable to enable kernel thread starvation detection.
Use undo monitor kernel starvation enable to disable kernel thread starvation detection.
Syntax
monitor kernel starvation enable
undo monitor kernel starvation enable
Default
Kernel thread starvation detection is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
CAUTION: Use this command only under the guidance of H3C Support. Inappropriate configuration can cause system breakdown. As a best practice, leave the default unchanged. |
Starvation occurs when a thread is unable to access shared resources.
The command enables the system to detect and report thread starvation. If a thread is not executed within an interval, the system considers that a starvation has occurred, and outputs a starvation message.
Thread starvation does not impact system operation. A starved thread can automatically run when certain conditions are met.
Examples
# Enable kernel thread starvation detection.
<Sysname> system-view
[Sysname] monitor kernel starvation enable
Related commands
display kernel starvation configuration
display kernel starvation
monitor kernel starvation time
monitor kernel starvation exclude-thread
monitor kernel starvation exclude-thread
Use monitor kernel starvation exclude-thread to exclude a kernel thread from kernel thread starvation detection.
Use undo monitor kernel starvation exclude-thread to include a kernel thread in kernel thread starvation detection.
Syntax
monitor kernel starvation exclude-thread tid
undo monitor kernel starvation exclude-thread [ tid ]
Default
Kernel thread starvation detection, if enabled, monitors all kernel threads.
Views
System view
Predefined user roles
network-admin
Parameters
tid: Specifies a kernel thread by its ID, in the range of 1 to 2147483647. If you do not specify a kernel thread, the undo command restores the default.
Usage guidelines
Use this command only under the guidance of H3C Support. Inappropriate configuration can cause system breakdown. As a best practice, leave the default unchanged.
You can exclude up to 128 kernel threads from kernel thread starvation detection.
Examples
# Exclude kernel thread 15 from kernel thread starvation detection.
<Sysname> system-view
[Sysname] monitor kernel starvation exclude-thread 15
Related commands
display kernel starvation
display kernel starvation configuration
monitor kernel starvation enable
monitor kernel starvation time
Use monitor kernel starvation time to set the threshold for identifying a kernel thread starvation.
Use undo monitor kernel starvation time to restore the default.
Syntax
monitor kernel starvation time time
undo monitor kernel starvation time
Default
The threshold for identifying a kernel thread starvation is 120 seconds.
Views
System view
Predefined user roles
network-admin
Parameters
time time: Specifies the threshold for identifying a kernel thread starvation, in the range of 1 to 65535 seconds.
Usage guidelines
Use this command only under the guidance of H3C Support. Inappropriate configuration can cause system breakdown. As a best practice, leave the default unchanged.
If a thread is not executed within the specified period of time, the system considers that a starvation has occurred, and outputs a starvation message.
Examples
# Set the threshold for identifying a kernel thread starvation to 120 seconds.
<Sysname> system-view
[Sysname] monitor kernel starvation time 120
Related commands
display kernel starvation
display kernel starvation configuration
monitor kernel starvation enable
monitor process
Use monitor process to display process statistics.
Syntax
monitor process [ dumbtty ] [ iteration number ]
Views
Any view
Predefined user roles
network-admin
Parameters
dumbtty: Specifies dumbtty mode. In this mode, the command displays process statistics in descending order of CPU usage without refreshing statistics. If you do not specify this keyword, the command displays statistics for the top 10 processes in descending order of CPU usage in an interactive mode, and refreshes statistics every 5 seconds by default.
iteration number: Specifies the number of display times, in the range of 1 to 4294967295. If you specify the dumbtty keyword, the number argument is 1 by default. If neither the dumbtty keyword nor the number argument is specified, there is no limit to the display times and process statistics are refreshed every 5 seconds.
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 14 to perform relevant operations.
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
79 processes; 416 threads; 8473 FDs
Thread states: 1 running, 415 sleeping, 0 stopped, 0 zombie
CPU0 states: 95.55% idle, 2.67% user, 1.78% kernel, 0.00% interrupt
CPU1 states: 98.22% idle, 0.89% user, 0.89% kernel, 0.00% interrupt
CPU2 states: 99.12% idle, 0.00% user, 0.88% kernel, 0.00% interrupt
CPU3 states: 86.62% idle, 5.35% user, 8.03% kernel, 0.00% interrupt
Container CPU0 states: 4.46%
Container CPU1 states: 3.57%
Container CPU2 states: 2.65%
Container CPU3 states: 12.50%
Memory: 15952M total, 11880M available, page size 4K
Container memory: 15952M total, 11880M available
JID PID PRI State FDs MEM HH:MM:SS CPU C-CPU Name
920 920 120 S 67 341444K 01:34:07 2.45% 2.79% diagd
652 652 100 S 711 3060976K 12:00:05 1.47% 1.67% drvuserd
940 940 120 S 1038 3881152K 04:12:51 0.49% 0.55% forward
1 1 120 S 45 174952K 00:00:03 0.24% 0.27% scmd
1077 1077 120 S 132 379140K 00:18:44 0.24% 0.27% ethd
…
# Display process statistics twice in dumbtty mode.
<Sysname> monitor process dumbtty iteration 2
79 processes; 416 threads; 8473 FDs
Thread states: 1 running, 415 sleeping, 0 stopped, 0 zombie
CPU0 states: 95.55% idle, 2.67% user, 1.78% kernel, 0.00% interrupt
CPU1 states: 99.10% idle, 0.00% user, 0.90% kernel, 0.00% interrupt
CPU2 states: 92.80% idle, 2.70% user, 4.50% kernel, 0.00% interrupt
CPU3 states: 90.92% idle, 3.63% user, 5.45% kernel, 0.00% interrupt
Container CPU0 states: 5.35%
Container CPU1 states: 3.60%
Container CPU2 states: 2.70%
Container CPU3 states: 10.00%
Memory: 15952M total, 11878M available, page size 4K
Container memory: 15952M total, 11878M available
JID PID PRI State FDs MEM HH:MM:SS CPU C-CPU Name
920 920 120 S 67 341444K 01:34:07 2.47% 2.57% diagd
652 652 100 S 711 3060976K 12:00:09 1.12% 1.16% drvuserd
940 940 120 S 1038 3881152K 04:12:52 0.44% 0.46% forward
1544 1544 120 S 144 431872K 02:19:58 0.44% 0.46% isisd
1 1 120 S 45 174952K 00:00:03 0.22% 0.23% scmd
1077 1077 120 S 132 379140K 00:18:44 0.22% 0.23% ethd
…
79 processes; 416 threads; 8473 FDs
Thread states: 1 running, 415 sleeping, 0 stopped, 0 zombie
CPU0 states: 95.90% idle, 2.54% user, 1.56% kernel, 0.00% interrupt
CPU1 states: 94.12% idle, 1.96% user, 3.92% kernel, 0.00% interrupt
CPU2 states: 96.88% idle, 1.95% user, 1.17% kernel, 0.00% interrupt
CPU3 states: 98.45% idle, 0.58% user, 0.97% kernel, 0.00% interrupt
Container CPU0 states: 4.69%
Container CPU1 states: 4.50%
Container CPU2 states: 2.34%
Container CPU3 states: 1.76%
Memory: 15952M total, 11878M available, page size 4K
Container memory: 15952M total, 11878M available
JID PID PRI State FDs MEM HH:MM:SS CPU C-CPU Name
652 652 100 S 711 3060976K 12:00:09 1.58% 1.43% drvuserd
920 920 120 S 67 341444K 01:34:07 0.70% 0.64% diagd
940 940 120 S 1038 3881152K 04:12:52 0.54% 0.49% forward
1544 1544 120 S 144 431872K 02:19:58 0.27% 0.24% isisd
853 853 120 S 33 194772K 00:27:33 0.10% 0.09% loads
1573 1573 120 S 79 350424K 00:46:47 0.10% 0.09% nqad
865 865 120 S 115 541132K 00:00:25 0.05% 0.04% devd
1094 1094 120 S 103 448796K 00:12:33 0.05% 0.04% staticrtd
…
<Sysname> monitor process
79 processes; 416 threads; 8474 FDs
Thread states: 1 running, 415 sleeping, 0 stopped, 0 zombie
CPU states: 96.53% idle, 1.76% user, 1.71% kernel, 0.00% interrupt
Container CPU states: 3.37% total, 1.68% user, 1.69% system
Memory: 15952M total, 11877M available, page size 4K
Container memory: 15952M total, 11877M available
JID PID PRI State FDs MEM HH:MM:SS CPU C-CPU Name
652 652 100 S 711 3060976K 12:00:14 1.45% 1.41% drvuserd
920 920 120 S 67 341444K 01:34:08 0.64% 0.63% diagd
940 940 120 S 1039 3881152K 04:12:54 0.50% 0.48% forward
1544 1544 120 S 144 431872K 02:19:59 0.29% 0.29% isisd
1077 1077 120 S 132 379140K 00:18:45 0.09% 0.09% ethd
1573 1573 120 S 79 350424K 00:46:47 0.09% 0.09% nqad
853 853 120 S 33 194772K 00:27:33 0.04% 0.04% loads
921 921 120 S 65 397888K 00:00:21 0.04% 0.04% lauthd
928 928 120 S 150 514804K 00:13:14 0.04% 0.04% vland
1545 1545 125 S 110 449236K 00:24:54 0.04% 0.04% ip6addrd
The system refreshes process statistics every 5 seconds. You can enter interactive commands to perform operation as follows:
· Enter h or a question mark (?) to display help information as follows:
Help for interactive commands:
?,h Show the available interactive commands
1 Toggle SMP view: '1' single/separate states
c Sort by the CPU field(default)
d Set the delay interval between screen updates
f Sort by number of open files
k Kill a job
l Refresh the screen
m Sort by memory used
n Set the maximum number of processes to display
q Quit the interactive display
t Sort by run time of processes since last restart
< Move sort field to the next left column
> Move sort field to the next right column
Press any key to continue
· Enter d, and then enter a number to modify the refresh interval. If you enter 3, statistics are refreshed every 3 seconds.
Enter the delay interval between updates(1~2147483647): 3
· Enter n, and then enter a number to modify the maximum number of displayed processes. If you enter 5, statistics for five processes are displayed.
Enter the max number of processes to display(0 means unlimited): 5
79 processes; 416 threads; 8473 FDs
Thread states: 1 running, 415 sleeping, 0 stopped, 0 zombie
CPU states: 96.06% idle, 1.77% user, 2.17% kernel, 0.00% interrupt
Container CPU states: 3.62% total, 1.68% user, 1.94% system
Memory: 15952M total, 11878M available, page size 4K
Container memory: 15952M total, 11878M available
JID PID PRI State FDs MEM HH:MM:SS CPU C-CPU Name
652 652 100 S 711 3060976K 12:00:40 1.55% 1.42% drvuserd
920 920 120 S 67 341444K 01:34:23 1.00% 0.92% diagd
940 940 120 S 1038 3881152K 04:13:03 0.63% 0.58% forward
1544 1544 120 S 144 431872K 02:20:04 0.26% 0.24% isisd
1077 1077 120 S 132 379140K 00:18:45 0.17% 0.16% ethd
· Enter f to sort processes by FDs in descending order. (You can also enter command c, m, or t to sort processes.)
79 processes; 416 threads; 8473 FDs
Thread states: 1 running, 415 sleeping, 0 stopped, 0 zombie
CPU states: 95.84% idle, 2.08% user, 2.08% kernel, 0.00% interrupt
Container CPU states: 4.49% total, 2.15% user, 2.34% system
Memory: 15952M total, 11878M available, page size 4K
Container memory: 15952M total, 11878M available
JID PID PRI State FDs MEM HH:MM:SS CPU C-CPU Name
940 940 120 S 1038 3881152K 04:13:04 0.53% 0.57% forward
652 652 100 S 711 3060976K 12:00:42 1.21% 1.30% drvuserd
898 898 120 S 278 835480K 00:01:41 0.00% 0.00% ifast
880 880 100 S 213 681996K 00:00:01 0.00% 0.00% ifmgr
1078 1078 120 S 194 644916K 00:00:06 0.00% 0.00% qosd
861 861 100 S 175 829244K 00:00:01 0.00% 0.00% dbmd
1637 1637 120 S 172 554460K 00:12:16 0.13% 0.14% bgpd
1440 1440 110 S 168 580800K 00:19:17 0.00% 0.00% laggd
928 928 120 S 150 514804K 00:13:15 0.13% 0.14% vland
1076 1076 120 S 149 564588K 00:19:38 0.00% 0.00% macd
· Enter k and then enter a JID to kill a process. If you enter 884, the process with the JID of 884 is killed.
Enter the JID to kill: 884
78 processes; 414 threads; 8401 FDs
Thread states: 2 running, 412 sleeping, 0 stopped, 0 zombie
CPU states: 96.43% idle, 1.76% user, 1.81% kernel, 0.00% interrupt
Container CPU states: 3.33% total, 1.63% user, 1.70% system
Memory: 15952M total, 11880M available, page size 4K
Container memory: 15952M total, 11880M available
JID PID PRI State FDs MEM HH:MM:SS CPU C-CPU Name
652 652 100 S 711 3060976K 12:00:48 1.45% 1.35% drvuserd
920 920 120 S 67 341444K 01:34:26 0.65% 0.60% diagd
940 940 120 S 1037 3881152K 04:13:06 0.50% 0.46% forward
1544 1544 120 S 144 431872K 02:20:06 0.29% 0.27% isisd
928 928 120 S 150 514804K 00:13:15 0.09% 0.09% vland
1094 1094 120 S 103 448796K 00:12:34 0.09% 0.09% staticrtd
1573 1573 120 S 79 350424K 00:46:49 0.09% 0.09% nqad
853 853 120 S 33 194772K 00:27:34 0.04% 0.04% loads
1076 1076 120 S 149 564588K 00:19:38 0.04% 0.04% macd
1545 1545 125 S 110 449236K 00:24:56 0.04% 0.04% ip6addrd
· Enter q to quit interactive mode.
Table 15 Command output
Field |
Description |
79 processes; 416 threads; 8473 FDs |
Numbers of processes, threads, and open files. |
Thread states: 1 running, 415 sleeping, 0 stopped, 0 zombie |
Statistics of threads in running, sleeping, stopped, and zombie states. |
CPU states |
CPU usage of the device: Free CPU usage, CPU usage in user space, CPU usage in the kernel space, and CPU usage of interrupts. |
Container CPU states |
This field is not supported in the current software version. CPU usage of the container. |
Memory |
Memory usage of the device: Total memory size, free memory, and page size, in KB. |
Container Memory |
This field is not supported in the current software version. Memory usage of the container: Total memory size and free memory size in KB. |
JID |
Job ID of a process, which never changes. |
PID |
ID of a process. |
PRI |
Priority level of a process. |
State |
State of a process: · R—Running. · S—Sleeping. · T—Traced or stopped. · D—Uninterruptible sleep. · Z—Zombie. |
FDs |
Number of open files for a process. |
MEM |
Memory usage. It displays 0 for a kernel thread. |
HH:MM:SS |
Running time of a process since last restart. |
CPU |
CPU usage of a process on the device. |
C-CPU |
This field is not supported in the current software version. CPU usage of a process in the container. |
Name |
Name of a process. If square brackets ([ ]) exist in a process name, the process is a kernel thread. |
monitor thread
Use monitor thread to display thread statistics.
Syntax
monitor thread [ dumbtty ] [ iteration number ]
Views
Any view
Predefined user roles
network-admin
Parameters
dumbtty: Specifies dumbtty mode. In this mode, the command displays all thread statistics in descending order of CPU usage without refreshing statistics. If you do not specify the keyword, the command displays statistics for top 10 processes in descending order of CPU usage in an interactive mode, and refreshes statistics every 5 seconds by default.
iteration number: Specifies the number of display times, in the range of 1 to 4294967295. If you specify the dumbtty keyword, the number argument is 1 by default. If neither the dumbtty keyword nor the number argument is specified, there is no limit to the display times.
Usage guidelines
If you do not specify the dumbtty keyword, the command displays thread statistics in an interactive mode. In this mode, the system automatically determines the number of displayed thread processes according to the screen size and does not display exceeding processes. You can also input interactive commands as shown in Table 16 to perform relevant operations.
Commands |
Description |
? or h |
Displays help information that includes available interactive commands. |
1 |
Displays one of the following items in turn when you press 1 again and again: · Values of parameters of physical CPUs. · Average values of parameters of all CPUs. By default, the command displays the average values of parameters of all CPUs. |
c |
Sorts statistics by CPU usage in descending order. By default, the command sorts statistics by CPU usage in descending order. |
d |
Sets the interval for refreshing statistics. The default interval is 5 seconds. |
k |
Kills a process. Because the command can impact system operation, be cautious when you use it. |
l |
Refreshes the screen. |
n |
Changes the maximum number of threads displayed within a screen, in the range of 0 to 2147483647. The default value is 10. A value of 0 means no limit. Only threads not exceeding the screen size can be displayed. |
q |
Quits interactive mode. |
t |
Sorts statistics by the running time since the latest startup. |
< |
Moves sort field to the next left column. |
> |
Moves sort field to the next right column. |
Examples
# Display thread statistics in dumbtty mode.
<Sysname> monitor thread dumbtty
72 processes; 326 threads
Thread states: 4 running, 322 sleeping, 0 stopped, 0 zombie
CPU0 states: 0.01% idle, 22.88% user, 77.11% kernel, 0.00% interrupt
CPU1 states: 93.08% idle, 0.00% user, 0.00% kernel, 6.92% interrupt
CPU2 states: 100.00% idle, 0.00% user, 0.00% kernel, 0.00% interrupt
CPU3 states: 100.00% idle, 0.00% user, 0.00% kernel, 0.00% interrupt
CPU4 states: 100.00% idle, 0.00% user, 0.00% kernel, 0.00% interrupt
CPU5 states: 100.00% idle, 0.00% user, 0.00% kernel, 0.00% interrupt
CPU6 states: 100.00% idle, 0.00% user, 0.00% kernel, 0.00% interrupt
CPU7 states: 100.00% idle, 0.00% user, 0.00% kernel, 0.00% interrupt
Container CPU0 states: 107.46%
Container CPU1 states: 0.00%
Container CPU2 states: 0.00%
Container CPU3 states: 0.46%
Container CPU4 states: 0.00%
Container CPU5 states: 0.46%
Container CPU6 states: 0.00%
Container CPU7 states: 0.00%
Memory: 3932M total, 173M available, page size 4K
Container memory: 3932M total, 173M available
JID TID LAST_CPU PRI State HH:MM:SS MAX CPU C-CPU Name
862 862 0 120 R 15:47:52 0 4.54% 4.56% scanengi
861 861 0 120 R 15:47:52 0 4.36% 4.38% managerd
897 1001 0 120 R 15:47:48 0 3.42% 3.44% NDClient
878 878 0 120 S 00:08:06 0 0.08% 0.08% diagd
897 1027 0 120 S 00:03:23 0 0.08% 0.08% APMGRFW_
1443 1444 0 120 S 00:01:09 0 0.08% 0.08% ccf_thre
...
# Display thread statistics in interactive mode.
<Sysname> monitor thread
72 processes; 326 threads
Thread states: 4 running, 322 sleeping, 0 stopped, 0 zombie
CPU states: 87.00% idle, 3.73% user, 8.71% kernel, 0.56% interrupt
Container CPU states: 12.55% total, 3.72% user, 8.83% system
Memory: 3932M total, 173M available, page size 4K
Container memory: 3932M total, 173M available
JID TID LAST_CPU PRI State HH:MM:SS MAX CPU C-CPU Name
861 861 0 120 R 15:48:07 0 4.06% 3.92% managerd
897 1001 0 120 R 15:48:03 0 4.06% 3.92% NDClient
862 862 0 120 R 15:48:07 0 3.95% 3.81% scanengi
1 1 0 120 S 00:00:00 0 0.11% 0.10% scmd
897 958 0 120 S 00:06:47 0 0.11% 0.10% AGINGQUE
897 960 3 120 S 00:05:03 0 0.11% 0.10% AGINGQUE
897 1002 0 120 S 00:02:48 0 0.11% 0.10% TP_TIMER
897 1027 0 120 S 00:03:23 0 0.11% 0.10% APMGRFW_
897 8128 0 120 S 00:00:49 0 0.11% 0.10% ND_MAIN
897 8134 0 120 S 00:01:15 0 0.11% 0.10% IP6ADDR
· Enter h or a question mark (?) to display help information as follows:
Help for interactive commands:
?,h Show the available interactive commands
1 Toggle SMP view: '1' single/separate states
c Sort by the CPU field(default)
d Set the delay interval between screen updates
k Kill a job
l Refresh the screen
n Set the maximum number of threads to display
q Quit the interactive display
t Sort by run time of threads since last restart
< Move sort field to the next left column
> Move sort field to the next right column
Press any key to continue
· Enter d, and then enter a number to modify the refresh interval. If you enter 3, statistics are refreshed every 3 seconds.
Enter the delay interval between screen updates (1~2147483647): 3
· Enter n, and then enter a number to modify the maximum number of displayed threads. If you enter 5, statistics for five threads are displayed.
Enter the max number of threads to display(0 means unlimited): 5
72 processes; 326 threads
Thread states: 4 running, 322 sleeping, 0 stopped, 0 zombie
CPU states: 86.65% idle, 3.37% user, 9.07% kernel, 0.91% interrupt
Container CPU states: 12.54% total, 3.39% user, 9.15% system
Memory: 3932M total, 173M available, page size 4K
Container memory: 3932M total, 173M available
JID TID LAST_CPU PRI State HH:MM:SS MAX CPU C-CPU Name
861 861 0 120 R 15:48:17 0 4.26% 4.00% managerd
862 862 0 120 R 15:48:17 0 4.26% 4.00% scanengi
897 1001 0 120 R 15:48:13 0 4.26% 4.00% NDClient
897 958 0 120 S 00:06:47 0 0.04% 0.04% AGINGQUE
897 960 3 120 S 00:05:03 0 0.04% 0.04% AGINGQUE
· Enter k and then enter a JID to kill a thread. If you enter 881, the thread with the JID of 881 is killed.
Enter the JID to kill: 861
71 processes; 325 threads
Thread states: 3 running, 322 sleeping, 0 stopped, 0 zombie
CPU states: 86.95% idle, 3.21% user, 9.23% kernel, 0.61% interrupt
Container CPU states: 12.52% total, 3.24% user, 9.28% system
Memory: 3932M total, 175M available, page size 4K
Container memory: 3932M total, 175M available
JID TID LAST_CPU PRI State HH:MM:SS MAX CPU C-CPU Name
897 1001 0 120 R 15:48:21 0 6.23% 5.97% NDClient
862 862 0 120 R 15:48:25 0 6.21% 5.95% scanengi
878 878 0 120 S 00:08:07 0 0.07% 0.06% diagd
897 962 5 120 S 00:04:55 0 0.04% 0.04% AGINGQUE
8132 8132 0 125 S 00:02:26 0 0.04% 0.04% ip6addrd
· Enter q to quit interactive mode.
Table 17 Command output
Field |
Description |
72 processes; 326 threads |
Numbers of processes and threads. |
Thread states |
Statistics of threads in running, sleeping, stopped, and zombie states. |
CPU states |
CPU usage of the device: Free CPU usage, CPU usage in user space, CPU usage in the kernel space, and CPU usage of interrupts. |
Container CPU states |
This field is not supported in the current software version. CPU usage of the container. |
Memory |
Memory usage of the device: Total memory size, free memory, and page size, in KB. |
Container Memory |
This field is not supported in the current software version. Memory usage of the container: Total memory size and free memory size, in KB. |
JID |
Job ID of a thread, which never changes. |
TID |
ID of a thread. |
LAST_CPU |
Number of the CPU on which the most recent thread scheduling occurs. |
PRI |
Priority level of a thread. |
State |
State of a thread: · R—Running. · S—Sleeping. · T—Traced or stopped. · D—Uninterruptible sleep. · Z—Zombie. |
HH:MM:SS |
Running time of a thread since last restart. |
MAX |
Longest time that a single thread scheduling occupies the CPU, in milliseconds. |
CPU |
CPU usage of a thread on the device. |
C-CPU |
This field is not supported in the current software version. CPU usage of a thread in a container. |
Name |
Name of a thread. If square brackets ([ ]) exist in a thread name, the thread is a kernel thread. |
process core
Use process core to enable or disable a process to generate core dump files for exceptions and set the maximum number of core dump files.
Syntax
process core { maxcore value | off } { job job-id | name process-name }
Views
User view
Default
A process generates a core dump file for the first exception and does not generate any core dump files for subsequent exceptions.
Predefined user roles
network-admin
Parameters
off: Disables core dump file generation.
maxcore value: Enables core dump file generation and sets the maximum number of core dump files, in the range of 1 to 10.
name process-name: Specifies a process by its name, a case-insensitive string of 1 to 15 characters.
job job-id: Specifies a process by its job ID, in the range of 1 to 2147483647. The job ID does not change after the process restarts.
Usage guidelines
The command applies to all instances of a process.
The command enables the system to generate a core dump file each time the specified process crashes until the maximum number of core dump files is reached. A core dump file records the exception information.
Because the core dump files consume system storage resources, you can disable core dump file generation for processes for which you do not need to review exception information.
Examples
# Disable core dump file generation for process routed.
<Sysname> process core off name routed
# Enable core dump file generation for process routed and set the maximum number of core dump files to 5.
<Sysname> process core maxcore 5 name routed
Related commands
display exception context
exception filepath
reset exception context
Use reset exception context to clear context information for process exceptions.
Syntax
reset exception context
Views
User view
Predefined user roles
network-admin
Examples
# Clear context information for exceptions.
<Sysname> reset exception context
Related commands
display exception context
reset kernel deadloop
Use reset kernel deadloop to clear kernel thread deadloop information.
Syntax
reset kernel deadloop
Views
User view
Predefined user roles
network-admin
Examples
# Clear kernel thread deadloop information.
<Sysname> reset kernel deadloop
Related commands
display kernel deadloop
reset kernel exception
Use reset kernel exception to clear kernel thread exception information.
Syntax
reset kernel exception
Views
User view
Predefined user roles
network-admin
Examples
# Clear kernel thread exception information.
<Sysname> reset kernel exception
Related commands
display kernel exception
reset kernel reboot
Use reset kernel reboot to clear kernel thread reboot information.
Syntax
reset kernel reboot
Views
User view
Predefined user roles
network-admin
Examples
# Clear kernel thread reboot information.
<Sysname> reset kernel reboot
Related commands
display kernel reboot
reset kernel starvation
Use reset kernel starvation to clear kernel thread starvation information.
Syntax
reset kernel starvation
Views
User view
Predefined user roles
network-admin
Examples
# Clear kernel thread starvation information.
<Sysname> reset kernel starvation
Related commands
display kernel starvation