Dit document beschrijft hoe u een Cisco IOS® Embedded Event Manager (EEM) applicatie moet configureren om de output van de opdracht Show Stacks op te nemen. Het Cisco Technical Assistance Center (TAC) heeft deze uitvoer doorgaans nodig om problemen met een hoog CPU-gebruik te kunnen oplossen die worden veroorzaakt door het Simple Network Management Protocol (SNMP).
Cisco raadt kennis van de volgende onderwerpen aan:
De informatie in dit document is gebaseerd op de volgende software- en hardware-versies:
Opmerking: De configuraties in dit document moeten werken met eerdere Cisco IOS-softwarereleases, omdat beide applets EEM versie 3.0 gebruiken, die wordt ondersteund in Cisco IOS release 12.4(22)T of hoger. Dit is echter niet getest.
De informatie in dit document is gebaseerd op de apparaten in een specifieke laboratoriumomgeving. Alle apparaten die in dit document worden beschreven, hadden een opgeschoonde (standaard)configuratie. Als uw netwerk live is, moet u de potentiële impact van elke opdracht begrijpen.
Deze EEM-applicaties automatiseren het proces om uitvoer uit de opdracht show Stacks op te nemen. Let op:
2811#show processes cpu | include SNMP ENGINE
PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
188 40 1 40000 0.00% 0.04% 0.01% 0 SNMP ENGINE
2811#
De opdracht tonen toont de taken die door het gespecificeerde proces worden verwerkt. Wanneer u problemen oplost bij het gebruik van hoge CPU’s, is het handig om uit te vinden welke taken worden uitgevoerd wanneer de toestand zich voordoet.
Deze EEM-toepassing detecteert wanneer het CPU-gebruik hoger is dan 50%. Op dat moment wordt de output van de show hopen opdracht bemonsterd over negen seconden en opgenomen in een bestand genaamd SNMP_STACK.txt binnen de flitser. Deze informatie helpt TAC de oorzaak van het hoge CPU-gebruik te identificeren.
In dit voorbeeld wordt een hoge CPU-toestand onderzocht die door SNMP wordt veroorzaakt; u kunt een soortgelijke EEM-applicatie gebruiken om een andere set uitgangen te verzamelen om problemen met een hoge CPU-functie te onderzoeken die door een ander proces worden veroorzaakt.
event manager applet SNMP_STACK
event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.10.1 get-type exact entry-op gt
entry-val "50" exit-op lt exit-val "15" poll-interval 2 maxrun 20
action 0.0 syslog msg "High CPU DETECTED"
action 0.1 cli command "enable"
action 1.1 cli command "show clock | append flash:SNMP_STACK.TXT"
action 1.2 cli command "show proc cpu sort | append flash:SNMP_STACK.TXT"
action 2.1 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 2.2 wait 1
action 2.3 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 2.4 wait 1
action 2.5 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 2.6 wait 1
action 2.7 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 2.8 wait 1
action 2.9 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 3.1 wait 1
action 3.2 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 3.3 wait 1
action 3.4 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 3.5 wait 1
action 3.6 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 3.7 wait 1
action 3.8 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
Deze EEM-toepassing wordt geactiveerd als het %SNMP-3-INPUT_QFULL_ERR syslog-bericht wordt gegenereerd. Op dat moment wordt de output van de show hopen opdracht bemonsterd over negen seconden en opgenomen in een bestand genaamd SNMP_STACK.txt binnen de flitser. Deze informatie helpt TAC de oorzaak van het hoge CPU-gebruik te identificeren.
event manager applet SNMP_STACK
event syslog pattern "%SNMP-3-INPUT_QFULL_ERR"
action 1.0 cli command "enable"
action 2.1 cli command "show clock | append flash:SNMP_STACK.TXT"
action 2.2 cli command "show proc cpu sort | append flash:SNMP_STACK.TXT"
action 3.1 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 3.2 wait 1
action 3.3 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 3.4 wait 1
action 3.5 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 3.6 wait 1
action 3.7 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 3.8 wait 1
action 3.9 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 4.1 wait 1
action 4.2 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 4.3 wait 1
action 4.4 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 4.5 wait 1
action 4.6 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 4.7 wait 1
action 4.8 cli command "show stacks 188 | append flash:SNMP_STACK.TXT"
action 4.9 wait 1
Er is momenteel geen verificatieprocedure beschikbaar voor deze configuratie.
Er is momenteel geen specifieke troubleshooting-informatie beschikbaar voor deze configuratie.