Tässä artikkelissa kerrotaan mitä tuloksia on kerättävä, kun epäillään muistivuotoa.
Muistivuoto on useimmiten hyvin hidasta, ja siksi sen vianmääritys vaatii kattavaa lokien analysointia.
Vioittuneen muistin osan tunnistamiseksi saattaa olla tarpeen analysoida useita tulosten otoksia.
Muistin seurantatyökalu (Memory monitoring tool)
S4810-, MXL- ja Z9000 9.1(0.0P6+) -julkaisuihin sisällytettiin muistin seurantatyökalu. Työkalu seuraa yksityiskohtaisesti tietojen kohdistusta, mikä on mahdollisten muistivuotojen vianmäärityksessä hyödyllistä. Muistin seurantatyökaluun pääsee komentorivin tai telnet-istunnon kautta.
1: Ota muistin seurantatyökalu käyttöön
Näin otat muistin seurantatyökalun käyttöön.
Käyttö esim.:
remote-exec cp f10mc -i 0x87
Esimerkki:
Komento:
Z9000#remote-exec cp f10mc -i 0x87
Järjestelmän vastaus:
f10mc -i 0x87
f10mc: Initialized for malloc, pool, pool_cache, with filter for F10 allocations
SStk-0 #
2: Tietojen keräys
2a: Yleisten muistin tietojen jaksoittainen keräys
Kerää tietoja jaksoittaisesti (4–6 tunnin välein) päivittäin useiden päivien ajan. Kerää tulokset seuraavalla komennolla. Seuraava komento esittää järjestelmän yleiset muistin tiedot. Tulosten sykliluku kasvaa aina yhdellä, kun tuloksia kerätään.
Käyttö esim.:
remote-exec cp f10mc -r 0
Esimerkki:
Komento:
Z9000#remote-exec cp f10mc –r 0
Järjestelmän vastaus:
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 #
Seuraavia tuloksia voidaan vaatia muistin seurantatyökalun tulosten lisäksi.
Aiheeseen liittyvät komennot:
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: Yksityiskohtaisen muistitiedon kerääminen
Kun komennon “remote-exec cp f10mc –r 0” tiedonkeruuaika on kulunut, vaaditaan seuraavan komennon tuloksia. Seuraava komento tarjoaa järjestelmän muisteista yksityiskohtaista tietoa.
Käyttö esim.:
remote-exec cp f10mc -r 1
Esimerkki:
Komento:
Z9000#remote-exec cp f10mc -r 1
Järjestelmän vastaus:
f10mc -r 1
{
PC:mbpl:0xC71F5200:256:3
PC:mclpl:0xD7C24800:2048:3
PC:mbpl:0xC71F3500:256:3
{tuloksia lyhennetty}
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 #
Suunnittelijat arvioivat kerättyjä tietoja ja kertovat, kuinka kerätä lisätietoa, joka auttaa muistivuodon lähteen tunnistamisessa. Vaaditut tulokset koskevat epäiltyjä muistin kohdistuksia:
Käyttö esim.:
remote-exec cp f10mc –c 0x
Esimerkki:
Komento:
Z9000# remote-exec cp f10mc –c 0xCE0DDD00
Järjestelmän vastaus:
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: Ota muistinseuranta pois käytöstä
Kun tiedot on tutkittu, ota muistin seurantatyökalu pois käytöstä.
Käyttö esim.:
remote-exec cp f10mc -i 0x0
Esimerkki:
Komento:
Z9000#remote-exec cp f10mc -i 0x0
Järjestelmän vastaus:
f10mc -i 0x0
f10mc: deinitialized
SStk-0 #