本文提供指令关于怎样配置在Cisco千兆交换路由器(GSR)线卡(LC)的核心转储。
There are no specific requirements for this document.
本文档中的信息基于以下软件和硬件版本:
Cisco IOS软件版本12.0(24)S1
本文适用于所有Cisco 12xxx系列GSR路由器
警告: 对远程服务器的核心转储能花费从任何地方20到45分钟。路由器是不可访问的,并且不此时转发信息包。小心地使用此程序。
The information in this document was created from the devices in a specific lab environment.All of the devices used in this document started with a cleared (default) configuration.If your network is live, make sure that you understand the potential impact of any command.
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
核心转储是路由器创建的二进制文件,当发现一个不可恢复的错误并且需要重新载入自己时。它是路由器的存储图像的充分的复制。您需要配置路由器为了创建核心转储。然而,不是所有的崩溃类型导致核心转储。这些是通常有用的对技术支持代表并且帮助识别事故的原因。
此表显示使用FTP的必要的最小配置为了配置核心转储的LC :
使用FTP的核心转储 |
---|
hostname GSR ! ip ftp source-interface Ethernet0 ip ftp username test ip ftp password blah !--- These commands enable the router for FTP transfer. !--- These commands are not necessary if you use the default !--- protocol TFTP for file transfer. ! interface Ethernet0 ip address 10.77.240.91 255.255.255.128 ! ip route 0.0.0.0 0.0.0.0 10.77.240.1 ! exception protocol ftp !--- Specifies FTP as the protocol for core dumps. The default is TFTP. exception dump 10.77.233.129 !--- Specifies the IP address of the server which receives the core dump file. exception linecard slot 2 !--- Enables the storage of crash information for the LC that you specify. !--- Here you specify slot 2. |
使用此基本配置:
如果千兆路由处理器(GRP)失败,称为GSR-core的核心转储在FTP服务器存储位于10.77.233.129。
如果在slot 2的LC失败称为Router-core的核心转储, slot 2在同一个位置存储。
当您配置核心转储的时路由器,请测试设置是否工作。
Cisco IOS提供write core命令为了测试或触发核心转储,不用需要对于重新加载。
请使用write core命令在特许exec模式(特权模式)。此命令造成系统生成核心转储,不用需要重新载入,并且GRP内存的内容被转存。
此命令是有用的,当您检查文件写道服务器的连接时。
GSR#write core Remote host [10.77.233.129]? Base name of core files to write [cdfile1]? writing uncompressed ftp://10.77.233.129/cdfile1 Writing cdfile1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! !--- This output is suppressed.
请使用隐藏的test crash命令为核心转储测试配置。请使用attach命令连接到必需的线卡。输入test crash命令那里为了生成线卡的核心转储。命令您在线卡使用执行在该线卡的Cisco IOS镜像。此IOS镜像不包含write core命令。为了测试在LC的核心转储配置,您需要使用此方法。
警告: test crash命令打乱生产网络。在转存其内存前,内容它造成路由器失败并且防止路由器的再度出现。时间这采取依靠相当数量在RP或LC的动态RAM (DRAM)存在。
GSR#attach 2 Entering Console for 1 Port Packet Over SONET OC-12c/STM-4c in Slot: 2 Type "exit" to end this session Press RETURN to get started! LC-Slot2> LC-Slot2>enable LC-Slot2#test crash WARNING: Command selections marked with '(crash router)' will crash router when issued. However a selection 'C' will need to be issued IMMEDIATELY before these selections to enable them. Type the number for the selected crash: -------------------------------------- 1 (crash router) Bus Error, due to invalid address access 2 (crash router) Bus Error, due to parity error in Main memory 3 (crash router) Bus Error, due to parity error in I/O memory 4 (crash router) Address Error, due to fetching code from odd address 5 (crash router) Jump to zero 6 (crash router) Software forced crash 7 (crash router) Illegal read of address zero 8 (crash router) Divide by zero 9 (crash router) Corrupt memory C Enable crash router selection marked with (crash router) U (crash router) User enter write bus error address W (crash router) Software watchdog timeout (*** Watch Dog Timeout ***) w (crash router) Process watchdog timeout (SYS-2-WATCHDOG) d Disable crashinfo collection e Enable crashinfo collection i Display contents of current crashinfo flash file n Change crashinfo flash file name s Save crashinfo to current crashinfo flash file q Exit crash menu ? C !--- Enter C here and press return. Type the number for the selected crash: -------------------------------------- 1 (crash router) Bus Error, due to invalid address access 2 (crash router) Bus Error, due to parity error in Main memory 3 (crash router) Bus Error, due to parity error in I/O memory 4 (crash router) Address Error, due to fetching code from odd address 5 (crash router) Jump to zero 6 (crash router) Software forced crash 7 (crash router) Illegal read of address zero 8 (crash router) Divide by zero 9 (crash router) Corrupt memory C Enable crash router selection marked with (crash router) U (crash router) User enter write bus error address W (crash router) Software watchdog timeout (*** Watch Dog Timeout ***) w (crash router) Process watchdog timeout (SYS-2-WATCHDOG) d Disable crashinfo collection e Enable crashinfo collection i Display contents of current crashinfo flash file n Change crashinfo flash file name s Save crashinfo to current crashinfo flash file q Exit crash menu ? 6 !--- Enter the number that corresponds to !--- the crash type you want to test. Unexpected exception, CPU signal 23, PC = 0x400E8DA8 -Traceback= 400E8DA8 40C6A4DC 404006E09C 400C477C 400C4768 $0 : 00000000, AT : 41B30000, v0 : 431A8F40, v1 : 00000032 !--- Output is suppressed.
此命令引起失败,并且内存的内容被转存。如果没有核心转储生成,您必须查看全部的设立和配置。
此部分说明本文使用的命令和一些其他可选命令。
修改核心转储LC失败生成的唯一的例外命令exception linecard命令。此列表适用于coredump GRP生成的其他例外in命令。
exception core-file file-name compress —设置GRP失败生成的核心转储文件的文件名,并且创建内核文件。默认情况下,内核文件有名字hostname-core其中主机名-是路由器的名字。用此命令,每个路由器有其自己的唯一core-file。
例如,如果主机名-您的路由器是"lab1,"默认情况下您的路由器生成一个核心转储文件有命名lab1-core。使用使用exception core-file Test命令,您能更改生成测试核心转储的名字。
您能压缩与压缩选项的核心转储文件。
Note: 压缩,当您把核心转储文件写到一个闪存盘时,自动地使用。当您在远程拷贝协议(RCP)帮助下时,写核心转储文件没有压缩选项的技术支持。
例外协议{ftp|rcp|当您把内核文件写到远端主机时, tftp} —设置协议使用。它可以是文件传输协议(FTP)、简单文件传输协议(TFTP)或者远程拷贝协议(RCP)。默认协议是TFTP。
Note: 您大于16 MB不能使用TFTP为了转存内核文件。
Note: 当您使用FTP时,您必须有在该系统和足够的空闲磁盘空间的有效用户用户帐号。这是因为内核文件可以是非常大的。默认协议是TFTP。
exception dump ip address —设置IP地址或主机名内核文件将被写的-远程服务器对。
例外闪存{procmem|iomem|所有} {device_name [:partition_number]} — GSR在其他平台中支持闪存盘作为选择对线性闪存或PCMCIA闪存卡。这些闪存盘大存储容量做他们为另一个平均值的好候选捕获核心转储。这是您需要为了设置与使用的核心转储一个闪存盘的路由器配置命令:
exception flash {procmem | iomem | all} {device_name[:partition_number]}
目前,没有LC核心转储的实施到一个闪存盘。
exception crashinfo file设备:文件名—,当GRP失败时,配置路由器为了写崩溃信息文件。默认情况下路由器被启用。
当您指定选项记录设施:文件名,它是您使用为了存储诊断信息的闪存设备和文件名。冒号是必要的。默认位置是Bootflash,并且文件的默认名称是失败crashinfo_datetime。
exception crashinfo buffersize kilobytes —,当GRP失败时,配置路由器为了写崩溃信息文件。默认情况下路由器被启用。
使用选项buffersize千字节,您能更换路由器到您使用崩溃信息文件缓冲区的大小。默认大小是32 KB (最大数量是100 KB,您用异常冲突信息缓冲区100)配置。
exception suffix slot-number —,如果不为GRP core-file,指定文件名添附slot-number对核心文件名。有插槽编号的默认添加在LC生成的核心转储的。
exception linecard {全部|slot slot-number} [corefile文件名|主存储器大小[k|m]|queue-ram大小[k|m]|RX缓冲区大小[k|m]|sqe-register-rx|sqe-register-tx|tx缓冲大小[k|m]] —此语法说明解释此in命令更详细的资料组件。
所有LCs全存储失败信息。
slot插槽编号—存储LC失败信息在您指定的slot。
corefile文件名—设置LC失败生成的核心转储文件的文件名。默认文件名是hostname-core-slot-number (例如, Router-core-2)。
主存储器大小—在存储主存储器失败信息为了并且指定失败信息的大小。内存的大小为了存储是0至268435456。
queue-ram大小—在LC存储队列随机存取存储器失败信息并且指定失败信息的大小。内存的大小为了存储可以是从0到1048576。
RX缓冲区大小和tx缓冲大小—在LC存储接受(rx)失败信息和transmit (TX)缓冲区并且指定失败信息的大小。内存的大小为了存储可以是从0到67108864。
sqe-register-rx和sqe-register-tx —存储接受或传输硅队列引擎失败信息在LC注册。
k和m — k选项倍增您由1K的大小(1024)指定,并且m选项倍增您指定1M的大小(1024*1024)。
示例:
exception linecard slot 6 — Enable (event)一core-file的创建LC的在slot 6,如果失败。
exception linecard slot 6 core-file router_slot6_core —设置LC在slot 6生成对router_slot6_core的core-file的文件名。
exception linecard slot 6 main-memory 16 Mbytes —设置将被转存的相当数量主存储器内容对16兆字节。
Note: 最大数量是256兆字节。指定此是安全的。
如果指定“exception linecard slot 6主存储器256个M”,您在配置看不到此。这是因为它是默认配置,当您enable (event) LC的时core-file生成。
异常存储器{分段大小|最小尺寸} —在调试过程时,您能造成路由器创建核心转储和重新启动,当有某些存储容量参数的侵害时。参数片段允许您确定最低的连续内存块在空闲池的,在字节。最小数量指示空闲存储器池的最小尺寸。大小值在字节和被检查每60秒。如果输入比空闲存储器极大的大小,并且,如果配置exception dump命令,有核心转储的生成和路由器重新载入在60秒之后。如果不配置exception dump命令,没有核心转储的任何生成的路由器重新载入。
exception region-size size —,当有在处理器内存池时的损坏标记您使用此命令为了定义少量的内存担当回退池。这帮助您在核心转储进程时防止内存故障。默认区域大小是16,384个字节。如果配置例外区域大小对最大数量(65536个字节),增加成功的核心转储的机会。
exception delay-dump delay —允许您在核心文件传输的开始前指定延迟在冗余系统。默认情况下系统暂停在30秒为了提供暂挂的时刻稳定,在核心文件传输的初始化前。有效范围值是从30到300秒。
ip ftp username username —,当您加载与使用的内核文件FTP到远程服务器,允许您配置用户名使用。在示例中设置用户名测试(ip ftp username test)。
ip ftp password [type] password —允许您为设置的用户名指定密码在ip ftp username username命令。它是胡说在示例(ip ftp password blah)。
ip ftp source-interface interface —确定接口来源FTP连接从。
ip ftp passive —默认情况下路由器设法使用被动模式FTP为了连接。用no ip ftp passive命令关闭此。
Note: 从Cisco IOS Software Release 12.0(22)S,多数最近引擎类型(2, 3, 4支持核心转储生成, 4+)。此功能,当一个新的引擎出来,应该支持。所有线卡支持此功能为了使故障排除流程更加容易。