カーネルリングバッファとは?
カーネルリングバッファとは、カーネルが診断メッセージを記録するメモリ上の固定サイズの循環バッファで、新しいエントリが届くにつれて最も古いものが上書きされます。dmesg コマンドはその内容を出力し、デバイスの検出、ドライバの警告、メモリ不足による kill などのイベントを表面化させます。メモリ上にあるため、ログに取り込まない限り再起動でクリアされます。
なぜ重要か
CI のプロセスが謎めいた形で kill されたとき、犠牲者を名指しする OOM kill の行など、唯一の記録をカーネルリングバッファが保持していることがよくあります。dmesg を読むことは、build 失敗のカーネルレベルの原因を診断する主要な手段です。
関連ガイド
What Is the OOM Killer?The OOM killer is the Linux mechanism that terminates a process to reclaim memory when the system runs critic…
What Is a System Logger?A system logger is the service that collects log messages from the kernel and programs and routes them to fil…
What Is Log Rotation?Log rotation periodically archives and replaces active log files so they do not grow without bound, keeping a…