メインコンテンツへスキップ

ONTAP 9から手動でログを収集する方法

Views:
2,256
Visibility:
Public
Votes:
1
Category:
ontap-9
Specialty:
core
Last Updated:

適用対象

  • ONTAP 9
  • 手動ログ収集

説明

  • AutoSupportは、各ログファイルに書き込まれた最新のログメッセージのみを収集します。
  • 非常にアクティブなロギング によってログ のローテーションがトリガーされ、一部のログがAutoSupportメッセージにキャプチャされない場合があります。詳細については、「 ONTAPログの概要」を参照してください
  • ペイロードの制限により、一部の診断ログはAutoSupportメッセージに含まれません。

 NetAppサポート から、ノードからすべてのファイルを手動で収集するよう要求される場合があります。  この要求を完了するには、次の手順を使用してください。

次のディレクトリとファイルは除外されます。

  • /mroot/etc/log/stats
  • /mroot/etc/log/packet_traces
  • 任意のファイル名corefile見つかるかもしれない/mroot/etc/logディレクトリツリー

 

手順

テイクオーバーしていないノードからログを収集する方法

  1. 完全なログを収集するには、次のコマンドを実行します。

::> set d -c off ; systemshell local "date +%Y%m%d%H%M%S | xargs -I DATE -n1 ngsh -c 'set d -c off ; cluster application-record create -name mroot_bundle_tracker -value DATE -vserver 4294967295'" ; systemshell * "echo `ngsh -c 'set d -c off ; cluster application-record show' | grep mroot | awk '{print $3}'` > /mroot/etc/log/mroot_bundle" ; systemshell -node * -command "sudo find -L /mroot/etc/log -depth -print | egrep -v '\/log\/stats\/|\/log\/packet_traces\/|\/log\/mfg\/|\/corefile' | sudo tar -cLnvzf /mroot/etc/crash/`hostname`_etc-logs.tar.gz -T -" ; cluster application-record delete -name mroot_bundle_tracker ; systemshell local "ngsh -c 'set d -c off ; systemshell -node * rm /mroot/etc/log/mroot_bundle'" ; set admin -c on

注:このコマンドは、ディレクトリ内のすべてのファイルを含む圧縮されたtarファイルを作成します。/mroot/etc/crash

  1. spiクラスタWebインターフェイスから、 クライアントにログバンドルをダウンロードします。

URLは​​​​https://<cluster-mgmt-ip>/spi/<node_name>/etc/crash/ 

  1. ファイルをダウンロードしたら、ノードから削除します。 

ファイルはサイズが大きくなる可能性があり、残っていればルートボリュームのスペースを不必要に消費します。

a. 作成されたファイルを一覧表示して識別します。

::> set diag

::*> systemshell -node * -command "ls /mroot/etc/crash/*.tar.gz"  
  
Node: node-1
/mroot/etc/crash/node-1_etc-logs_202505301028.tar.gz
 
Node: node-2
/mroot/etc/crash/node-2_etc-logs_202505301028.tar.gz
2 entries were acted on.

b. 以下のファイルを削除します。

注: Systemshell rmコマンドを使用する際は注意してください。誤った使用はシステムに影響を与える可能性があります。ワイルドカード文字の使用は避けてください。 

::*> systemshell -node node-1 -command "rm /mroot/etc/crash/node-1_etc-logs_202505301028.tar.gz"

::*> systemshell -node node-2 -command "rm /mroot/etc/crash/node-2_etc-logs_202505301028.tar.gz"

c. ファイルが削除されたことを確認します。

::*> systemshell -node * -command "ls /mroot/etc/crash/*.tar.gz"
 
Node: node-1
ls: No match.
 
Node: node-2
ls: No match.
2 entries were acted on.

  1. ファイルがローカル クライアントに保存されたら、この記事で推奨されている方法のいずれかを使用して、各ファイルを個別に NetApp にアップロードします。 「NetApp にファイルをアップロードするにはどうすればよいですか?」 

注意:複数のログバンドルファイルを1つのファイルに圧縮またはtarで圧縮しないでください。  それぞれ個別にアップロードしてください。

テイクオーバー時にノードからログを収集する方法 

  1. HA ペアのアップ ノードに接続します。
  2. 手順1を次のように置き換えます。 

set d -c off ; systemshell local "sudo mount_partner"; systemshell local "date +%Y%m%d%H%M%S | xargs -I DATE -n1 ngsh -c 'set d -c off ; cluster application-record create -name mroot_bundle_tracker -value DATE -vserver 4294967295'" ; systemshell local -command "sudo find -L /partner/etc/log -depth -print | egrep -v '\/log\/stats\/|\/log\/packet_traces\/|\/log\/mfg\/|\/corefile' | sudo tar -cLnvzf /mroot/etc/crash/partner_etc-logs_`ngsh -c 'set d -c off ; cluster application-record show' | grep mroot | awk '{print $3}'`.tar.gz -T -" ; cluster application-record delete -name mroot_bundle_tracker ; systemshell local "sudo umount /partner"; set admin -c on

: ファイル名の形式はpartner_etc-logs_202506021448.tar.gzノード名なし。  必要に応じて名前を変更してください。

  1. 前のセクションの手順 2に進みます。

追加情報

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.