function::qsq_blocked - Linux


The qsq_blocked command is a Linux tool used to display blocked queue statistics for a given system. It’s particularly useful for monitoring high-priority tasks or processes that require immediate attention.


qsq_blocked [options] <pid>


  • -h, --help: Display usage information and exit.
  • -d, --debug: Enable debug mode (only for developers).
  • -n, --noheaders: Suppress the display of headers in the output.
  • -s, --show-all: Display statistics for all blocked queues (by default, only the top 10 are shown).
  • -t, --timestamp: Output a timestamp before each line of the output.
  • -u, --units: Specify time units for the output: ‘ms’ for milliseconds, ‘us’ for microseconds, or ‘ns’ for nanoseconds (default: ‘ms’).


To display blocked queue statistics for a specific process with PID 1234:

qsq_blocked 1234

To show statistics for all blocked queues:

qsq_blocked -s 1234

To suppress the display of headers:

qsq_blocked -n 1234

Common Issues

  • No output: If the specified process is not running or does not have any blocked queues, the command will output nothing.
  • Inconsistent statistics: Blocked queue statistics can change dynamically during command execution, so the output may not always be fully accurate.


qsq_blocked can be integrated with other tools for advanced monitoring and analysis:

  • Sysstat: Combine output with sar -u to track blocked queue statistics over time.
  • Nagios: Use the command to trigger alerts when blocked queue counts exceed thresholds.

Related Commands

  • qinfo -q: Display information about the specified block queue.
  • sar -u: Display system-wide CPU utilization statistics, including blocked queue information.