wqlat(8) System Manager's Manual wqlat(8)

# [NAME](#NAME)

wqlat - Summarize kernel workqueue latency as a histogram.

# [SYNOPSIS](#SYNOPSIS)

**wqlat \[-h] \[-T] \[-N] \[-W] \[-w WQNAME] \[interval \[count]]**

# [DESCRIPTION](#DESCRIPTION)

wqlat traces work's waiting on workqueue, and records the distribution of work's queuing latency (time). This is printed as a histogram either on Ctrl-C, or after a given interval in seconds.

This tool uses in-kernel eBPF maps for storing timestamps and the histogram, for efficiency.

This tool uses the workqueue:workqueue\_queue\_work and workqueue:workqueue\_execute\_start kernel tracepoints, which is a stable tracing mechanism. Please note BPF programs can attach to tracepoints from Linux 4.7 only, so this tools can only support kernel 4.7 or later version.

Since this uses BPF, only the root user can use this tool.

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bcc.

# [OPTIONS](#OPTIONS)

-h Print usage message.

[-T](#T)

Include timestamps on output.

[-N](#N)

Output histogram in nanoseconds.

[-W](#W)

Print a histogram per workqueue.

[-w WQNAME](#w)

Trace this workqueue only

[interval](#interval)

Output interval, in seconds.

[count](#count)

Number of outputs.

# [EXAMPLES](#EXAMPLES)

[Summarize kernel workqueue latency as a histogram:](#Summarize)

\# **wqlat**

[Print 1 second summaries, 10 times:](#Print)

\# **wqlat 1 10**

[Print 1 second summaries, using nanoseconds as units for the histogram, and](#Print~2)

include timestamps on output: # **wqlat -NT 1**

[Print 1 second summaries, 10 times per workqueue:](#Print~3)

\# **wqlat -W 1 10**

[Print 1 second summaries for workqueue nvmet\_tcp\_wq:](#Print~4)

\# **wqlat -w nvmet\_tcp\_wq 1**

# [FIELDS](#FIELDS)

[usecs](#usecs)

Microsecond range

[nsecs](#nsecs)

Nanosecond range

[count](#count~2)

How many works into this range

[distribution](#distribution)

An ASCII bar chart to visualize the distribution (count column)

# [OVERHEAD](#OVERHEAD)

This traces kernel functions and maintains in-kernel timestamps and a histogram, which are asynchronously copied to user-space. This method is very efficient, and the overhead for most workqueue scheduling rates (&lt; 100k) should be negligible.If you have a higher workqueue scheduling, please test and quantify the overhead before use.

# [SOURCE](#SOURCE)

This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion \_examples.txt file containing example usage, output, and commentary for this tool.

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Ping Gan

# [SEE ALSO](#SEE_ALSO)

biolatency

2024-01-29 USER COMMANDS

---

Document: wqlat(8) from bcc 0.37.0-r2 (Chainguard OS)
Source: https://github.com/iovisor/bcc
