ここでは、Linuxにおけるコアダンプ採取のための注意事項を説明します。
■コアダンプが出力されない場合の確認
コアダンプが出力されない場合の原因として、まず、システムリソースなどの問題が考えられます。カレントディレクトリの書込み権、ディスク容量、limit(1)コマンド結果を確認してください。
ハード/オペレーティングシステムの出荷時、またはオペレーティングシステムのUpdate適用により、デフォルトではコアダンプの出力が設定されていない場合があります。以下を参照して、コアダンプが出力されるように設定してください。
■コアダンプ出力の設定方法
isstartコマンドでInterstageを起動する場合
sh(bash)で以下のコマンド実行後、Interstageを起動します。ワークユニット起動ユーザがInterstage起動ユーザと異なる場合は、ワークユニット起動前に以下のコマンドを実行してください。
ulimit -c unlimited
オペレーティングシステム起動時の自動起動でInterstageを起動する場合(RHEL6)
以下のファイルの記述を変更することにより、オペレーティングシステムの再起動後にcoreが出力されるようになります。
/etc/init.d/functions
「ulimit -S -c unlimited >/dev/null 2>&1」に変更します。
【修正前】
# make sure it doesn't core dump anywhere; while this could mask # problems with the daemon, it also closes some security problems ulimit -S -c 0 >/dev/null 2>&1 または、 ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>1
【修正後】
# make sure it doesn't core dump anywhere; while this could mask
# problems with the daemon, it also closes some security problems
ulimit -S -c unlimited >/dev/null 2>&1
/etc/rc2.d/S99startis
「ulimit -c unlimited」を追加します。
【修正前】
#!/bin/sh # Interstage Application Server # S99starttis : Interstage Application Server start procedure OD_HOME=/opt/FJSVod export OD_HOME /opt/FJSVod/bin/odalive > /dev/null while [ "$?" != "0" ] do sleep 1 /opt/FJSVod/bin/odalive > /dev/null done /opt/FJSVtd/bin/isstart
【修正後】
#!/bin/sh
# Interstage Application Server
# S99starttis : Interstage Application Server start procedure
OD_HOME=/opt/FJSVod
export OD_HOME
ulimit -c unlimited
/opt/FJSVod/bin/odalive > /dev/null
while [ "$?" != "0" ]
do
sleep 1
/opt/FJSVod/bin/odalive > /dev/null
done
/opt/FJSVtd/bin/isstart
オペレーティングシステム起動時の自動起動でInterstageを起動する場合(RHEL7)
unitファイルに以下の設定を追加してください。unitファイルでの定義方法については、"チューニングガイド" の "RHEL7のunitファイルでの環境定義"を参照してください。
記載するセクション | 設定項目 | 設定値 |
---|---|---|
[Service] | LimitCORE | infinity |