この文書では、メモリー リークが疑われる場合に収集する必要がある出力のリストについて説明します。
メモリー リークは、ほとんどの場合、非常に低速なプロセスであり、このような場合には広範なログ分析が必要になります。
分析してメモリーのどの部分に影響があるかを把握するために複数の出力サンプルが必要になることがあります。
メモリー監視ツール
メモリー監視ツールは、S4810、MXL、およびZ9000 9.1(0.0P6+)リリースに組み込まれました。 このツールは、可能性のあるメモリー リークのトラブルシューティングにおいて、詳細なデータ割り当ての使用率をキャプチャします。 メモリー監視ツールには、コンソールまたはtelnetセッションを通じてアクセスできます。
1:メモリー監視ツールを有効にする
以下のコマンドを使用して、メモリー監視ツールを有効にします。
使用例:
remote-exec cp f10mc -i 0x87
例:
コマンド:
Z9000#remote-exec cp f10mc -i 0x87
システムの応答:
f10mc -i 0x87
f10mc: Initialized for malloc, pool, pool_cache, with filter for F10 allocations
SStk-0 #
2:データの収集
2a:全般的なメモリー データを定期的に収集する
データを数日間毎日定期的(4~6時間間隔)に収集します。 出力を収集するには、次のコマンドを実行します。 次のコマンドは、システムの全般的なメモリーの詳細を表示します。 出力のサイクル番号は、出力が収集されるたびに1つずつ増分されます。
使用例:
remote-exec cp f10mc -r 0
例:
コマンド:
Z9000#remote-exec cp f10mc –r 0
システムの応答:
f10mc -r 0
{
----------------------
#### This cycle: 46176 bytes held by 56 allocations ####
M: 1888(16); +2329280(18371), -2329280(18371)
P: 0(0); +0(0), -0(0)
PC: 44288(40); +3053056(11226), -3053056(11226)
#### Since MCInit: 708902 bytes held by 2112 allocations ####
M: 52006(1338); +110122134(928732), -110070128(927394)
P: 0(0); +0(0), -0(0)
PC: 656896(774); +148369408(548411), -147712512(547637)
}
SStk-0 #
メモリー監視ツールの出力に加えて、次のような出力が要求される場合があります。
関連コマンド:
remote-exec cp top -b -o res all
remote-exec cp netstat –m
remote-exec cp vmstat –s
show process memory
show process memory management
show memory
show clock
2b:詳細なメモリー データを収集する
「remote-exec cp f10mc –r 0」コマンドの収集期間が終了すると、次のコマンドの出力が要求されます。 次のコマンドを実行すると、システムの正確なメモリー詳細が表示されます。
使用例:
remote-exec cp f10mc -r 1
例:
コマンド:
Z9000#remote-exec cp f10mc -r 1
システムの応答:
f10mc -r 1
{
PC:mbpl:0xC71F5200:256:3
PC:mclpl:0xD7C24800:2048:3
PC:mbpl:0xC71F3500:256:3
{output truncated}
PC:mbpl:0xCAFC7F00:256:2
PC:mclpl:0xD7C4D000:2048:2
----------------------
#### This cycle: 286144 bytes held by 266 allocations ####
M: 3520(16); +21362(417), -20514(415)
P: 0(0); +0(0), -0(0)
PC: 282624(250); +1129472(2200), -1126912(2197)
#### Since MCInit: 599392 bytes held by 542 allocations ####
M: 5216(20); +67838(1335), -62622(1315)
P: 0(0); +0(0), -0(0)
PC: 594176(522); +3513088(6660), -2918912(6138)
}
SStk-0 #
エンジニアリング チームは収集されたデータを評価し、メモリー リークの原因を特定する際に役立つ詳細情報を収集する方法について詳しく説明します。 要求された出力は、メモリー割り当ての推測に必要です。
使用例:
remote-exec cp f10mc –c 0x
例:
コマンド:
Z9000# remote-exec cp f10mc –c 0xCE0DDD00
システムの応答:
f10mc -c 0xCE0DDD00
PC:mbpl:0xCE0DDD00:256:2> 0xC0100EAD 0xC033DA54 0xC0137ADE 0xC0136DD0 0xC0142682 0xC013FA17 0xC0148C38 0xC037C808 0xC037BE3F 0xC09B805A
call trace:
0xC0100EAD in Xsoftintr
0xC033DA54 in softint_dispatch
0xC0137ADE in ipintr
0xC0136DD0 in ip_input
0xC0142682 in tcp_input
0xC013FA17 in syn_cache_get
0xC0148C38 in tcp_template
0xC037C808 in m_gethdr
0xC037BE3F in m_get
0xC09B805A in f10MC_pool_cache_get_paddr
SStk-0 #
3:メモリー監視を無効にする
データの確認が完了したら、メモリー監視ツールを無効にします。
使用例:
remote-exec cp f10mc -i 0x0
例:
コマンド:
Z9000#remote-exec cp f10mc -i 0x0
システムの応答:
f10mc -i 0x0
f10mc: deinitialized
SStk-0 #