How do I use hung task check in RHEL?

Solution Verified - Updated -

Issue

  • Can I detect a hung process?
  • What are the following variables? What do these hung task configuration parameters and their values mean and control?

    # sysctl -a --pattern hung
    kernel.hung_task_warnings = 10
    kernel.hung_task_timeout_secs = 120
    kernel.hung_task_check_count = 32768
    kernel.hung_task_panic = 0
    
  • How can I use hung task check?

  • How to automatically collect vmcore when "hung_task_timeout_secs" messages are logged?

    INFO: task <process>:<pid> blocked for more than 120 seconds.  
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.  
    
  • How to set 'hung_task_panic' parameter ?

  • When or under what circumstances should I avoid setting 'hung_task_panic'?

  • How can I reduce or disable the number of "task ... blocked for more than N seconds" events being logged?

Environment

  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5.5 (kernel-2.6.18-194) or above
  • D state (uninterruptible sleep) processes present in system

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content