Skip to content

Commit 320bf17

Browse files
Wang Yaxinakpm00
authored andcommitted
docs: update docs after introducing delaytop
The "getdelays" can only display the latency of a single task by specifying a PID, we introduce the "delaytop" with the following capabilities: 1. system view: monitors latency metrics (CPU, I/O, memory, IRQ, etc.) for all system processes 2. supports field-based sorting (e.g., default sort by CPU latency in descending order) 3. dynamic interactive interface: focus on specific processes with --pid; limit displayed entries with --processes 20; control monitoring duration with --iterations; Link: https://lkml.kernel.org/r/2025071013514177028RdjISjqeIOnTCRvGAwy@zte.com.cn Signed-off-by: Fan Yu <fan.yu9@zte.com.cn> Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn> Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn> Cc: Balbir Singh <bsingharora@gmail.com> Cc: David Hildenbrand <david@redhat.com> Cc: Peilin He <he.peilin@zte.com.cn> Cc: Qiang Tu <tu.qiang35@zte.com.cn> Cc: wangyong <wang.yong12@zte.com.cn> Cc: xu xin <xu.xin16@zte.com.cn> Cc: Yang Yang <yang.yang29@zte.com.cn> Cc: Yunkai Zhang <zhang.yunkai@zte.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 6b47c9f commit 320bf17

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Documentation/accounting/delay-accounting.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,50 @@ Get IO accounting for pid 1, it works only with -p::
131131
linuxrc: read=65536, write=0, cancelled_write=0
132132

133133
The above command can be used with -v to get more debug information.
134+
135+
After the system starts, use `delaytop` to get the Top-N high-latency tasks.
136+
this tool supports sorting by CPU latency in descending order by default,
137+
displays the top 20 high-latency tasks by default, and refreshes the latency
138+
data every 2 seconds by default.
139+
140+
Get Top-N tasks delay, since system boot::
141+
142+
bash# ./delaytop
143+
Top 20 processes (sorted by CPU delay):
144+
145+
PID TGID COMMAND CPU(ms) IO(ms) SWAP(ms) RCL(ms) THR(ms) CMP(ms) WP(ms) IRQ(ms)
146+
---------------------------------------------------------------------------------------------
147+
32 32 kworker/2:0H-sy 23.65 0.00 0.00 0.00 0.00 0.00 0.00 0.00
148+
497 497 kworker/R-scsi_ 1.20 0.00 0.00 0.00 0.00 0.00 0.00 0.00
149+
495 495 kworker/R-scsi_ 1.13 0.00 0.00 0.00 0.00 0.00 0.00 0.00
150+
494 494 scsi_eh_0 1.12 0.00 0.00 0.00 0.00 0.00 0.00 0.00
151+
485 485 kworker/R-ata_s 0.90 0.00 0.00 0.00 0.00 0.00 0.00 0.00
152+
574 574 kworker/R-kdmfl 0.36 0.00 0.00 0.00 0.00 0.00 0.00 0.00
153+
34 34 idle_inject/3 0.33 0.00 0.00 0.00 0.00 0.00 0.00 0.00
154+
1123 1123 nde-netfilter 0.28 0.00 0.00 0.00 0.00 0.00 0.00 0.00
155+
60 60 ksoftirqd/7 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00
156+
114 114 kworker/0:2-cgr 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00
157+
496 496 scsi_eh_1 0.24 0.00 0.00 0.00 0.00 0.00 0.00 0.00
158+
51 51 cpuhp/6 0.24 0.00 0.00 0.00 0.00 0.00 0.00 0.00
159+
1667 1667 atd 0.24 0.00 0.00 0.00 0.00 0.00 0.00 0.00
160+
45 45 cpuhp/5 0.23 0.00 0.00 0.00 0.00 0.00 0.00 0.00
161+
1102 1102 nde-backupservi 0.22 0.00 0.00 0.00 0.00 0.00 0.00 0.00
162+
1098 1098 systemsettings 0.21 0.00 0.00 0.00 0.00 0.00 0.00 0.00
163+
1100 1100 audit-monitor 0.20 0.00 0.00 0.00 0.00 0.00 0.00 0.00
164+
53 53 migration/6 0.20 0.00 0.00 0.00 0.00 0.00 0.00 0.00
165+
1482 1482 sshd 0.19 0.00 0.00 0.00 0.00 0.00 0.00 0.00
166+
39 39 cpuhp/4 0.19 0.00 0.00 0.00 0.00 0.00 0.00 0.00
167+
168+
Dynamic interactive interface of delaytop::
169+
170+
# ./delaytop -p pid
171+
Print delayacct stats
172+
173+
# ./delaytop -P num
174+
Display the top N tasks
175+
176+
# ./delaytop -n num
177+
Set delaytop refresh frequency (num times)
178+
179+
# ./delaytop -d secs
180+
Specify refresh interval as secs

0 commit comments

Comments
 (0)