路由器性能管理常用命令解析
如何帮助用户确定一个运行CISCO IOS 软件的路由器是否正常工作?下面的这些命令也许对你会有一定的帮助。(本文只节选我在实际工作使用频率最高的一些命令,借以抛砖引玉,举一反三!)
1,Show version
功能:查看设备的版本信息:包括设备类型、IOS 版本、FLASH 内存大小、NVRAM 内存大小、拥有的接口信息、配置寄存器的值等
实例:
chj#show version
酒店大门
Cisco Internetwork Operating System Software
IOS (tm) 7200 Software (C7200-IS-M), Version 12.2(37), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2006 by cisco Systems, Inc.
Compiled Thu 15-Jun-06 19:51 by pwade
Image text-ba: 0x60008940, data-ba: 0x61316000能减肥的茶
ROM: ROMMON Emulation Microcode BOOTLDR: 7200 Software (C7200-IS-M), Version 12.2(37), RELEASE SOFTWARE (fc1) #硬件平台是:7200-IS-M ,IOS 版本号是12.2,发布号37
chj uptime is 5 minutes
System returned to ROM by unknown reload cau - suspect boot_data[BOOT_COUNT] 0x0, BOOT_COUNT 0, BOOTDATA 19
System image file is "t f tp://255.255.255.255/unknown " cisco 7206VXR (NPE400) processor (revision A) with 57344K/8192K bytes of memory. #拥有56M 的系统内存和8M 的共享数据包内存
Processor board ID 4294967295 R7000 CPU at 150Mhz, Implementation 39, Rev 2.1, 256KB L2, 512KB L3 Cache #CPU 信息 6 slot VXR midplane, Version 2.1
Last ret from power-on
Bridging software.
X.25 software, Version 3.0.0.
PCI bus mb0_mb1 (Slots 0, 1, 3 and 5) has a capacity of 600 bandwidth points.
Current configuration on bus mb0_mb1 has a total of 200 bandwidth points.
This configuration is within the PCI bus capacity and is supported.
PCI bus mb2 (Slots 2, 4, 6) has a capacity of 600 bandwidth points.
Current configuration on bus mb2 has a total of 0 bandwidth points
This configuration is within the PCI bus capacity and is supported.
T o p S e c r e t
Plea refer to the following document "Cisco 7200 Series Port
Adaptor Hardware Configuration Guidelines" on CCO <>,
for c7200 bandwidth points oversubscription/usage guidelines.
1 FastEthernet/IEEE 802.3 interface(s) #拥有一个快速以太网口
4 Serial network interface(s) #拥有4个串口
125K bytes of non-volatile configuration memory. #NVRAM 的大小为125K
65536K bytes of ATA PCMCIA card at slot 0 (Sector size 512 bytes). #ATA PCMCIA 大小为64M 8192K bytes of Flash internal SIMM (Sector size 256K). #8M 的FLASH 内存
Configuration register is 0x2102 #配置寄存器的值,0X2102 是从NVRAM 中启动router ,如果是0X2142 是忽略NVRAM 中的配置,从SETUP 启动
2,show process cpu
功能:查看设备的CPU 信息,包括一端时间间隔内的信息、峰值和低流量时间、各个进程的CPU 占用信息等
实例:
鄱阳湖拼音
chj#show process cpu
CPU utilization for five conds: 1%/0%; one minute: 0%; five minutes: 0%
#这一行最为有用!显示了CPU 在5S 、1MIN 、5MIN 间隔的利用率。
如果你发现CPU 的经常运行在超过75%的利用率上,那么是时候考虑给路由器升级了! PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
1 0 1 0 0.00% 0.00% 0.00% 0 Chunk Manager
2 0 398 0 0.00% 0.00% 0.00% 0 Load Meter
3 728 236 308
4 0.00% 0.00% 0.00% 0 Exec 4 1040 216 4814 1.16% 0.03% 0.02% 0 Check heaps
5 0 2 0 0.00% 0.00% 0.00% 0 Pool Manager (截取部分,下略)
3,show memory (常用:show memory dead )
功能:查看内存使用和分配情况
实例:chj#show memory dead
Head Total(b) Ud(b) Free(b) Lowest(b) Largest(b)
Processor 62128C00 23950336 9240752 14709584 14611044 14604624
I/O 3800000 8388616 1460632 6927984 6927984 6927932
Processor memory
# 总体量 已使用量 空闲量
T o p S e c r e t
#一下显示的是所有的死亡进程,但任然占据着分配给它们的内存。如果这个数字很大,可能需要找到已死亡的进程并且和CISCO TAC 协同工作以解决问题。 Address Bytes Prev Next Ref PrevF NextF Alloc PC what 6214AE18 0000000696 6214ADB4 6214B0FC 001 -------- -------- 60605DF4 *Packet Header* 624FDAD4 0000000024 624FD9F8 624FDB18 001 -------- -------- 604E1724 DHCP Autoinstall 624FDB18 0000000024 624FDAD4 624FDB5C 001 -------- -------- 604E1730 DHCP Autoinstall (截取部分,下略) 附:show memory failures alloc #这个命令显示了任何内存分配的失败问题,正常的情况下,这个命令不应该有任何的输出,如下: chj#show memory failures alloc Caller Pool Size Alignment When
4,show interfaces rial
功能:查看串口信息:包括接口硬件、配置、利用率、错误和队列信息等
实例:
chj#show inter s1/0
Serial1/0 is up, line protocol is up #2个UP 表明接口是正常的
Hardware is M4T #接口的硬件名字
Internet address is 12.1.1.1/24 #接口所配置的IP 地址和子网掩码
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 uc,
reliability 255/255, txload 1/255, rxload 1/255
# MTU 1500:是默认的以太网MTU (最大传输单元)大小
# BW 1544 Kbit :显示接口的带宽,但是并不实际改变这个接口的可用带宽,这里只是作为IGRP 、EIGRP 的度量值
# DLY 20000 uc : 以毫秒表示的平均接口延迟,这里只是作为IGRP 、EIGRP 的度量值 # reliability 255/255: 5MIN 间隔内的链路平均可靠性,255/255是100%的可靠性,127/255是50%的可靠性,1/255是0%的可靠性。值越大链路越好。
# txload 1/255, rxload 1/255:接口在5分钟内的传输负荷,255/255是100%的接口利用率。
Encapsulation HDLC, crc 16, loopback not t #接口的采用CISCO 默认的HDLC 封装 Keepalive t (10 c)
Restart-Delay is 0 cs
Last input 00:00:05, output 00:00:00, output hang never Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 #显示丢弃数据包的数量 Queueing strategy: weighted fair #显示接口的队列策略,本例是加权公平队列,这是低于2Mb (E1)的串行接口的默认队列类型。
T o p S e c r e t
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Rerved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/c
5 minute input rate 0 bits/c, 0 packets/c #接口的5MIN 的平均输入速率
5 minute output rate 0 bits/c, 0 packets/c #接口的5MIN 的平均输出速率
24 packets input, 1360 bytes, 0 no buffer
Received 24 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
47 packets output, 4343 bytes, 0 underruns
0 output errors, 0 collisions, 4 interface rets
0 output buffer failures, 0 output buffers swapped out
钾相对原子质量
4 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up
5,show interface fastethernet
功能:查看以太网接口的信息
常用逻辑用语实例:
chj#show inter fa0/0
FastEthernet0/0 is up, line protocol is up
Hardware is DEC21140, address is ca02.0b34.0000 (bia ca02.0b34.0000) #接口当前的MAC 地址,BIA 指烧入的地址
Description: xian jing #配置的接口描述
Internet address is 10.1.1.1/24 #配置的接口地址和掩码
MTU 1500 bytes, BW 100000 Kbit, DLY 100 uc, reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not t
Keepalive t (10 c)
Half-duplex, 100Mb/s, 100BaTX/FX #接口是半双的,100Mb 的带宽,介质类型是100Mbit/s 基带快速双绞线以太网/多模光纤以太网
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:41, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo #在以太网接口上,默认的队列类型是先进先出
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/c, 0 packets/c
说话和气5 minute output rate 0 bits/c, 0 packets/c
253 packets input, 30642 bytes
Received 249 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
593 packets output, 58252 bytes, 0 underruns
T o p S e c r e t
0 output errors, 0 collisions, 0 interface rets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
6,show controllers rial
功能:查看接口硬件的信息和电缆的类型以及时钟信息
实例:
chj#show controllers s1/0
M4T: show controller:
PAS unit 0, subunit 0, f/w version 3-101, rev ID 0x2800001, version 1
idb = 0x62379A70, ds = 0x6237B878, ssb=0x6237BC2C
Clock mux=0x0, ucmd_ctrl=0x1C, port_status=0x7B
Serial config=0x8, line config=0x200
maxdgram=1608, bufpool=48Kb, 96 particles
遇见最美的自己DCD=up DSR=up DTR=up RTS=up CTS=up
line state: up
cable type : V .11 (X.21) DCE cable, received clockrate 56000
七八十年代经典老歌曲
# 线缆类型是DCE,时钟频率为56000
ba0 registers=0x3C800000, ba1 registers=0x3C802000
mxt_ds=0x629ECE00, rx ring entries=47, tx ring entries=64
rxring=0x3903580, rxr shadow=0x623824D4, rx_head=9
txring=0x3903740, txr shadow=0x62382740, tx_head=26, tx_tail=26, tx_count=0 throttled=0, enabled=0
halted=0, last halt reason=0
Microcode fatal errors=0
rx_no_eop_err=0, rx_no_stp_err=0, rx_no_eop_stp_err=0
rx_no_buf=0, rx_soft_overrun_err=0, dump_err= 0, bogus=0, mxt_flags=0xC tx_underrun_err=0, tx_soft_underrun_err=0, tx_limited=1(2)
tx_fullring=0, tx_started=239 mxt_flush_count=0
rx_int_count=291, tx_int_count=243
Half-duplex hdx=0x62382220, summary:-
invalid_state=0, jigged_sig=0, invalid_timeout=0, tx_drop=0
tx_int_err=0, rx_drop=0, timer_error=0, rts_timeout=0
invalid_rx=0, tx_lost_cts=0, cts_timeout=0, late_rx=0
晁老 2009年1月6日星期二
T o p S e c r e t