1

バックグラウンドで15個のプロセス/デーモンが実行されているとしましょう。プロセスの 1 つがコアをダンプしたとしましょう。

どのプロセスがコアをダンプしたかを特定する方法を教えてください。

私はhpuxを使用しています!

4

3 に答える 3

0

1) If processes have the same name then I think you have to run them from different folders. If a process dumps a core you will get it in its folder. I don't know how you start them. If you use & to start a process then you can use $! to get PID of the last started daemon process and thus save the PID of the process in its folder. Or you can take a look at the log of your daemon in this folder and get PID of the process in this folder from there.

2) If you run different applications you can use file ./core to find out the name of the application.

Updated: 3) Have just read about this:

Run first coreadm -p core.%p.%f.%t.%n or put this command in your profile. And then if an application coredumps you will see a core file with name core.<PID>.<Application-Name>.<Timestamp>.<Server>. For example: core.29305.main.1278939422:531259.srv2-rx8

于 2010-04-07T12:36:18.440 に答える
0

ファイル名の一部として pid を書き込むことができます。15 のプロセスを何をどのように開始するかはわかりませんが、pid を保存するのが一般的です。デーモンは通常、インスタンスを識別する何かを使用して独自の pid ファイルを作成します。

于 2010-04-07T12:20:04.177 に答える
0

これは、ダンプ中に生成されたインデックス ファイルに含まれている必要があります。HPUX 10.26 (非常に古い) では、ダンプが次の場所に保持されていました。

 /var/adm/crash

ダンプを調査するには、q4 または同様のツールが必要になります。パターンを epronk の提案どおりに設定するには、coreadmが必要です。マニュアルページを参照してください:

  man coreadm
于 2010-04-07T12:28:21.170 に答える