Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

29.3. OProfile の起動および停止

OProfile を使用してシステムのモニタリングを開始するには、root で以下のコマンドを実行します。
~]# opcontrol --start
以下のような出力が表示されます。
Using log file /var/lib/oprofile/oprofiled.log Daemon started. Profiler running.
/root/.oprofile/daemonrc の設定が使用されます。
OProfile デーモン oprofiled が起動し、定期的にサンプルデータを /var/lib/oprofile/samples/ ディレクトリーに書き込みます。デーモンのログファイルは /var/lib/oprofile/oprofiled.log にあります。
nmi_watchdog レジスターを無効にします。
Red Hat Enterprise Linux 6nbsp;Hat Enterprise Linux 6nbsp;LinuxRed Hat Enterprise Linux 6nbsp;6 システムでは、nmi_watchdogperf サブシステムに登録します。このため、perf サブシステムは起動時にパフォーマンスカウンターレジスターを制御し、OProfile が機能しなくなります。
これを解決するには、nmi_watchdog=0 カーネルパラメーターセットで起動するか、以下のコマンドを実行してランタイム時に nmi_watchdog を無効にします。
~]# echo 0 > /proc/sys/kernel/nmi_watchdog
nmi_watchdog を再度有効にするには、以下のコマンドを使用します。
~]# echo 1 > /proc/sys/kernel/nmi_watchdog
プロファイラーを停止するには、root で以下のコマンドを実行します。
~]# opcontrol --shutdown