Translated message

A translation of this page exists in English.

如何在 RHEL 中使用挂起的任务检查?

Solution Verified - Updated -

Issue

  • 我是否可以检测到一个挂起的进程?
  • 以下变量是什么?这些挂起的任务的配置参数是什么,以及其值的含义和控制?

    # 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
    
  • 如何使用挂起的任务检查?

  • 当 "hung_task_timeout_secs" 信息被记录时,如何自动收集 vmcore?

    INFO: task <process>:<pid> blocked for more than 120 seconds.  
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.  
    
  • 如何设置 'hung_task_panic' 参数?

  • 何时或在什么情况下,我应该避免设置 'hung_task_panic'?

  • 如何减少或禁用记录的"task ... blocked for more than N seconds"事件的数量?

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)或更高版本
  • 系统中存在 D 状态(不可中断睡眠)进程

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