= Cisco Router = == 指令 == * [https://www.cisco.com/c/en/us/td/docs/server_nw_virtual/2-5_release/command_reference/admin.html Administrative Commands] * 啟用/停用 privileged commands {{{ enable Turn on privileged commands disable Turn off privileged commands }}} {{{ RTR> enable Password: RTR# }}} * [https://www.cisco.com/c/en/us/td/docs/server_nw_virtual/2-5_release/command_reference/show.html Show Commands] * 顯示 CPU 使用狀態 {{{ RTR# show processes cpu ? autoprofile Show processes cpu autoprofile information extended Show last 5 sec extended process cpu usage information history Show CPU history in graph format monitor show CPU utilization continuously platform Show platform CPU utilization per process sorted Show sorted output based on percentage of utilization | Output modifiers }}} * Show CPU history in graph format {{{ RTR# show processes cpu history }}} * 範例輸出 {{{ 554344333343334543333333334335433343433333333233233333334333633333434344 100 90 80 70 60 50 40 30 20 10 ** * * * 0....5....1....1....2....2....3....3....4....4....5....5....6....6....7.. 0 5 0 5 0 5 0 5 0 5 0 5 0 CPU% per hour (last 72 hours) * = maximum CPU% # = average CPU% }}} * 顯示記憶體用量 - https://www.cisco.com/c/en/us/td/docs/routers/access/4400/troubleshooting/memorytroubleshooting/isr4000_mem.pdf {{{ RTR#show platform resources **State Acronym: H - Healthy, W - Warning, C - Critical Resource Usage Max Warning Critical State ---------------------------------------------------------------------------------------------------- RP0 (ok, active) C Control Processor 21.18% 100% 90% 95% H DRAM 3819MB(99%) 3857MB 90% 95% C ESP0(ok, active) H QFP H DRAM 95492KB(36%) 262144KB 80% 90% H IRAM 213KB(10%) 2048KB 80% 90% H }}} * 顯示目前的完整設定 {{{ RTR# show running-config ? aaa Show AAA configurations all Configuration with defaults bridge-domain Show running bridge domain brief configuration without certificate data class-map Show class-map information flow Global Flow configuration subcommands full full configuration identity Show identity profile/policy information interface Show interface configuration linenum Display line numbers in output map-class Show map class information mdns-sd Show mDNS-SD configurations partition Configuration corresponding a partition policy-map Show policy-map information service-group Show running service-group view View options vlan Show L2 VLAN information vnet Show Virtual NETwork aware configuration vrf Show VRF aware configuration | Output modifiers }}} * 顯示 Log {{{ RTR# show logging ? count Show counts of each logging message dram Show DRAM ECC errors history Show the contents of syslog history table onboard onboard information persistent Show the contents of the logging persistent uptime Show board uptime data xml Show the contents of XML logging buffer | Output modifiers }}} {{{ configure Enter configuration mode }}} {{{ RTR#configure ? confirm Confirm replacement of running-config with a new config file memory Configure from NV memory network Configure from a TFTP network host overwrite-network Overwrite NV memory from TFTP network host replace Replace the running-config with a new config file revert Parameters for reverting the configuration terminal Configure from the terminal }}} * https://supportforums.cisco.com/t5/network-infrastructure-documents/how-to-configure-logging-in-cisco-ios/ta-p/3132434 == 監控:SNMP OID == * [https://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/15215-collect-cpu-util-snmp.html How to Collect CPU Utilization on Cisco IOS Devices Using SNMP] * [https://supportforums.cisco.com/t5/network-management/cpu-and-memory-snmp-trap-switch/td-p/1660177 CPU and Memory SNMP trap switch] * [https://support.solarwinds.com/Success_Center/Network_Performance_Monitor_(NPM)/CPU_and_memory_utilization_Object_IDs_(OIDs)_NPM_can_poll CPU and memory utilization Object IDs (OIDs) NPM can poll] == 問題排查 Troubleshooting == * [https://www.cisco.com/c/en/us/td/docs/routers/access/4400/troubleshooting/memorytroubleshooting/isr4000_mem.html Memory Troubleshooting Guide for Cisco 4000 Series ISRs]