Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

AIX 主機因 trace 追蹤進程而變慢的處理記錄

主機型號:IBM 9179-MHB
作業系統:5300-11-05-1036

現象描述

登入系統的動作慢得讓人難以忍受,用 topas 觀察時發現 lo0 介面的流量異常龐大。翻查 errpt 錯誤日誌,卻找不到任何足以拖慢系統回應的錯誤訊息,反倒注意到系統核心追蹤工具 trace 正在運行。

排查與解法

trace 是 IBM 提供的核心追蹤工具,一旦它持續運作就會明顯吃資源。過去在電信環境也遇過同樣狀況,這次算是重溫一遍。

起初嘗試用 kill 反覆終結該進程,卻怎麼樣都殺不掉。於是查閱 man 手冊:

man trace
-a
    Runs the trace daemon asynchronously (i.e. as a background task).
    Once trace has been started this way, you can use the trcon, trcoff,
    and trcstop commands to respectively start tracing, stop tracing,
    or exit the trace session.

改用專用的 trcstop 指令後,終於成功結束該進程,系統整體速度也隨之明顯改善。

小結:遇到 trace 卡住時,別再硬用 kill,交給 trcstop 才是正解。

Copyright © Linux教程網 All Rights Reserved