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

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

Views:
3,043
Visibility:
Public
Votes:
1
Category:
ontap-9
Specialty:
core
Last Updated:

環境

  • ONTAP 9
  • 手動ログ収集

概要

  • AutoSupportは、各ログファイルに書き込まれた最新のログメッセージのみを収集します。
  • ログ記録が非常に活発な場合、ログローテーションがトリガーされ、一部のログがAutosupportメッセージにキャプチャされない可能性があります。詳細については、 ONTAP Log Overviewを参照してください。
  • ペイロード制限により、一部の診断ログは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 -vserver 4294967295' | 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 -vserver 4294967295 ; systemshell local "ngsh -c 'set d -c off ; systemshell -node * rm /mroot/etc/log/mroot_bundle'" ; set admin -c on

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

注記:エラーメッセージ「Account currently locked」が表示された場合は、次の手順を使用して diag アカウントのロックを解除してください:Systemshell diag ユーザーアカウントのロックを解除する方法

  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 にファイルをアップロードするにはどうすればよいですか? 

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

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

  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.