problem diagnosis command
The chapter describes the commands of problem
diagnosis. Users can use these commands to find the reasons of problems, and
can use other commands(such as debug) to solve problems.
This chapter only introduces the common commands .more details,please
refer to the reference book.
use the
command”logging ” to record the log to the syslog server .
logging A.B.C.D
no logging A.B.C.D
parameter:
A.B.C.D: syslog ip address of server 。
Defaut:
Do not
record to the server.
command mode:
global configuration mode
explanation:
Command “logging”
can record the log to appointed syslog server. Users can
use the command several times to appoint several syslog server.
Example:
logging 192.168.1.1
relevant command:
logging trap
User can register the log to the memory of router by using command “logging buffered”.
logging buffered [size | level | dump
]
no logging buffered
size: size of buffer memory, from 4096 bytes to 2147483647 bytes.
level: level of the log registered to the buffer memory.
dump: When there’s something wrong in the system, user can save
information in the current memory to FLASH, Reseting system will resume them.
default:
Do not save to buffer memory.
command mode:
global configuration mode
explanation:
This command register the log to the buffer
memory of the router. The buffer is used circlely , so new information will
cover the olds when the buffer is full.
To use “show logging”command to show the log registered in buffer memory in router.
Do not use too much memory, or that will cause the lack of memory.
table-1 level of the logs
|
level |
description |
Syslog
definition |
emergencies |
0 |
System unusable |
LOG_EMERG |
alerts |
1 |
Immediate action needed |
LOG_ALERT |
critical |
2 |
Critical conditions |
LOG_CRIT |
errors |
3 |
Error conditions |
LOG_ERR |
warnings |
4 |
Warning conditions |
LOG_WARNING |
notifications |
5 |
Normal but significant condition |
LOG_NOTICE |
informational |
6 |
Informational messages only |
LOG_INFO |
debugging |
7 |
Debugging messages |
LOG_DEBUG |
relevant command:
clear logging
show loggin
“logging console” command can be used to control information capacity displayed in console interface.
“no logging console” command can be used to forbid to display information in console interface.
logging console level
no logging console
parameters:
level: Information level that display the log on the console interface,please refer to table-2.
default:
none
command mode:
global configuration mode
explanation:
After appointed level, information whose level is equal to or less than it will be displayed on console interface.
Command “show logging” can be used to display current level configuration and stat.information of the log.
table-2 levels of log
|
level |
discreption |
Syslog
definition |
emergencies |
0 |
System unusable |
LOG_EMERG |
alerts |
1 |
Immediate action needed |
LOG_ALERT |
critical |
2 |
Critical conditions |
LOG_CRIT |
errors |
3 |
Error conditions |
LOG_ERR |
warnings |
4 |
Warning conditions |
LOG_WARNING |
notifications |
5 |
Normal but significant condition |
LOG_NOTICE |
informational |
6 |
Informational messages only |
LOG_INFO |
debugging |
7 |
Debugging messages |
LOG_DEBUG |
example:
logging console alerts
relevant command:
logging facility
Users can use command“logging facility” to configure what kind of error information will be loged. resume to “local 7”, use command“ no logging facility”.
logging facility facility-type
no logging facility
parameter:
facility-type: Facility types. Refer to table-3.
default:
local7
command mode:
global configuration mode
explanation:
table-3 facility types
type |
description |
auth |
Authorization system |
cron |
Cron facility |
daemon |
System daemon |
kern |
Kernel |
local0-7 |
Reserved for locally defined messages |
lpr |
Line printer system |
|
Mail system |
news |
USENET news |
sys9 |
System use |
sys10 |
System use |
sys11 |
System use |
sys12 |
System use |
sys13 |
System use |
sys14 |
System use |
syslog |
System log |
user |
User process |
uucp |
UNIX-to-UNIX copy system |
example:
logging facility kern
relevant command:
logging console
Command “logging monitor” can be used to control information quantity displayed on terminal line.
Command “no logging monitor” forbid to display log information on terminal line .
logging monitor level
no logging monitor
parameter:
level: Information
levels to display log information on terminal line. Refer to table-4.
default:
debugging
command mode:
global configuration mode
explanation:
table-4 levels of log:
|
level |
description |
Syslog
definition |
emergencies |
0 |
System unusable |
LOG_EMERG |
alerts |
1 |
Immediate action needed |
LOG_ALERT |
critical |
2 |
Critical conditions |
LOG_CRIT |
errors |
3 |
Error conditions |
LOG_ERR |
warnings |
4 |
Warning conditions |
LOG_WARNING |
notifications |
5 |
Normal but significant condition |
LOG_NOTICE |
informational |
6 |
Informational messages only |
LOG_INFO |
debugging |
7 |
Debugging messages |
LOG_DEBUG |
example:
logging monitor errors
relevant command:
terminal monitor
Command “logging on” is used to control record of error information.
Command “no logging on ” can forbid all logs.
logging on
no logging on
parameter:
none
default:
logging on
command mode:
global configuration mode
example:
Router_config# logging on
Router_config# ^Z
Router#
Configured from console 0 by DEFAULT
Router# ping 192.167.1.1
Router#ping 192.167.1.1
PING 192.167.1.1 (192.167.1.1): 56 data bytes
!!!!!
--- 192.167.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0/4/10 ms
Router#IP: s=192.167.1.111 (local), d=192.167.1.1 (FastEthernet0/0), g=192.167.1.1, len=84, sending
IP: s=192.167.1.1 (FastEthernet0/0), d=192.167.1.111 (FastEthernet0/0), len=84,rcvd
IP: s=192.167.1.111 (local), d=192.167.1.1 (FastEthernet0/0), g=192.167.1.1, len=84, sending
IP: s=192.167.1.1 (FastEthernet0/0), d=192.167.1.111 (FastEthernet0/0), len=84,rcvd
IP: s=192.167.1.111 (local), d=192.167.1.1 (FastEthernet0/0), g=192.167.1.1, len=84, sending
IP: s=192.167.1.1 (FastEthernet0/0), d=192.167.1.111 (FastEthernet0/0), len=84,rcvd
IP: s=192.167.1.111 (local), d=192.167.1.1 (FastEthernet0/0), g=192.167.1.1, len=84, sending
IP: s=192.167.1.1 (FastEthernet0/0), d=192.167.1.111 (FastEthernet0/0), len=84,rcvd
IP: s=192.167.1.111 (local), d=192.167.1.1 (FastEthernet0/0), g=192.167.1.1, len=84, sending
IP: s=192.167.1.1 (FastEthernet0/0), d=192.167.1.111 (FastEthernet0/0), len=84,rcvd
Router_config# no logging on
Router_config# ^Z
Router#
Router# ping 192.167.1.1
PING 192.167.1.1 (192.167.1.1): 56 data bytes
!!!!!
--- 192.167.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0/4/10 ms
relevant command:
logging
logging buffered
logging monitor
Command "logging trap" is used to control information quantity recorded to syslog server.
Command "logging on" forbids to record information to syslog server.
logging trap level
no logging trap
parameter:
level: Information levels to display log
on terminal line. Refer to table-5.
default:
Informational
command mode:
global configuration mode
explanation:
table-5 levels of log
|
level |
description |
Syslog
definition |
emergencies |
0 |
System unusable |
LOG_EMERG |
alerts |
1 |
Immediate action needed |
LOG_ALERT |
critical |
2 |
Critical conditions |
LOG_CRIT |
errors |
3 |
Error conditions |
LOG_ERR |
warnings |
4 |
Warning conditions |
LOG_WARNING |
notifications |
5 |
Normal but significant condition |
LOG_NOTICE |
informational |
6 |
Informational messages only |
LOG_INFO |
debugging |
7 |
Debugging messages |
LOG_DEBUG |
example:
logging 192.168.1.1
logging trap notifications
relevant command:
logging
Command “service timestamps” is used to add timestamps when system debug or register logs.
Command “no service timestamps” is used to cancel timestamps when system debugg or register logs.
service timestamps [log|debug] [uptime| datetime]
no service timestamps [log|debug]
parameter:
log: add timestamps in front of log information
debug: add timestamps in front of debug information
uptime: timestamps format is the time from starting router to now
datetime: timestamps format is real clock time
default:
service timestamps log date
service timestamps debug date
command mode:
global configuration mode
explanation:
uptime Timestamps format is HHHH:MM:SS, it means time from starting a router to now.
date Timestamps format is YEAR-MON-DAY HH:MM:SS, it means real clock time.
example:
service timestamps debug uptime
This command is used to clear log in buffer memory.
clear logging
parameter:
none
command mode:
supervisor mode
relevant command:
logging buffered
show logging
Command “show break” is used to display unexpected interrupt information of a router.
show break [map-filename]
parameter:
map-filename: appoint the filename of the function map
default:
none
command mode:
supervisor mode
explanation:
Command “show break” is used to display captured information about abnormal interrupt of a router. So users can know failure reasons.
Example:
Router#sh break
Exception Type:1400-Data TLB error
BreakNum: 1 s date: 2000-1-1 time: 0:34:6
r0 r1 r2 r3 r4 r5 r6
00008538-01dbc970-0054ca18-00000003-80808080-fefefeff-01dbcca1-
r7 r8 r9 r10 r11 r12 r13
00000000-00009032-00000000-7ffffff0-00008588-44444444-0054c190-
r14 r15 r16 r17 r18 r19 r20
000083f4-000083f4-00000000-00000000-00000000-00000000-00000000-
r21 r22 r23 r24 r25 r26 r27
00000000-0000000a-00000001-00000000-00000000-004d6ce8-01dbd15c-
r28 r29 r30 r31 spr8 spr9 ip
00000002-00467078-00010300-00000300-00000310-00008588-00000370-
Variables :
00008538-44444444-01dbd15c-01dbcaac-00000002-00000000-004d6ce8-
01dbca18-
00008538 --- do_chram_mem_sys_addr---bspcfg.o
0001060c --- subcmd---cmdparse.o---libcmd.a
000083e4 --- do_chram_mem_sys---bspcfg.o
0000fb24 --- lookupcmd---cmdparse.o---libcmd.a
0000f05c --- cmdparse---cmdparse.o---libcmd.a
003e220c --- vty---vty.o---libvty.a
00499820 --- pSOS_qcv_broadcast---ksppc.o---os\libsys.a
There are six
parts of all display content.
1.RROR:file
function.map not found
This
information shows that system does not load function.map, but it will not
affect system running. If the version of “function.map” is different from the
running version of a router, it will prompt” version is incamptible”.
2.Exception Type—abnormal
hexadecimal code + abnormal name
3.BreakNum
It means the
current abnormal number. it is the number that abnormal have happened in system
from last powered to now, following is the time the abnormal happened.
4.register
content
Here lists the contents
of common registers.
5.Variable area
Here lists the contents
in stacks
6.invocation relationship between functions
If a system does
not load a map file, it will only display address of function. If it does, it
will also display corresponding names of functions, ”.o” file name and “.a” file name.
Their invocation
relationship is from bottom to top.
Comman “show controller” is used to display information of a interface controller of a router.
show controller [interface]
parameter:
interface: name of the appointed interface
default:
none
command mode:
supervisor mode
explanation:
Command “show controller” is used to display the controller status and configuration information of the appointed interface. Users can know the failure reasons through analyzing these information.
example:
Router#show controller s1/0
Interface Serial1/0
Hardware is PowerQUICC MPC860T
SCC Registers:
General [GSMR]=0x68034:0x22, Protocol-specific [PSMR]=0x3000
Events [SCCE]=0, Mask [SCCM]=0xcf, Status [SCCS]=0x3
Transmit on Demand [TODR]=0, Data Async [DSR]=0x7e7e
Interrupt Registers:
[CICR]=00e49f80 [CIPR]=4000c006 [CIMR]=48000000, [CISR]=00000000
Command register [CR]=0x6c0
SICR=0900002c, BRG=00000000:00010288:00000000:00000000 (aux=0)
Statistics: scc4, port3
int 751229 bad_first 0 too_long 0 drop 0
tx_count 1 bk_count 0 h_Q 81 s_Q 0
Port A [PADIR]=0000 [PAPAR]=53c3 [PAODR]=0000 [PADAT]=fefe
Port B [PBDIR]=00021001 [PBPAR]=00001020 [PBODR]=0000 [PBDAT]=0001e3be
Port C [PCDIR]=0000 [PCPAR]=0008 [PCSO]=0438 [PCDAT]=0fe7 [PCINT]=0008
Receive Ring
rmd(fff02320): status=9000 length=0000 address=01155f58
rmd(fff02328): status=9000 length=0000 address=01156c90
rmd(fff02330): status=9000 length=0000 address=01156b18
rmd(fff02338): status=9000 length=0000 address=011569a0
rmd(fff02340): status=9000 length=0000 address=01156828
rmd(fff02348): status=9000 length=0000 address=011566b0
rmd(fff02350): status=9000 length=0000 address=01156538
rmd(fff02358): status=b000 length=0000 address=01156f80
Transmit Ring
tmd(fff02360): status=0000 length=0000 address=00000000
tmd(fff02368): status=0000 length=0000 address=00000000
tmd(fff02370): status=0000 length=0000 address=00000000
tmd(fff02378): status=0000 length=0000 address=00000000
tmd(fff02380): status=0000 length=0000 address=00000000
tmd(fff02388): status=9000 length=0051 address=01156df4
tmd(fff02390): status=0000 length=0000 address=00000000
tmd(fff02398): status=2000 length=0000 address=00000000
SCC GENERAL PARAMETER RAM (at 0xfff03f00)
Rx BD Base [RBASE]=0x2320, Fn Code [RFCR]=0x15
Tx BD Base [TBASE]=0x2360, Fn Code [TFCR]=0x15
Max Rx Buff Len [MRBLR]=252
Current Rx(2) State [RSTATE]=0x9000, BD Ptr [RBPTR]=0x1156b18
Current Tx(5) State [TSTATE]=0x9000, BD Ptr [TBPTR]=0x1156df4
SCC UART PARAMETER RAM (at 0xfff03f30)
Maximum idle characters 1
Break Character 1
Received Parity Error 58445
Received Frame Error 65261
Received Noise Error 39256
Number of break conditions 22595
Last Received Break length 1524
uart1 63220 uart2 1
Transmit Out of sequence 0
cc[0] = 4011 cc[1] = 4013 cc[2] = 8000 cc[3] = 4011
cc[4] = 4013 cc[5] = 8000 cc[6] = 9c80 cc[7] = 7051
rccm = c0ff rccr = bf28 rlbc = a6fe
RxBufSiz 254 flow 1
flag=00000120, size=00000008, X=11, Xoff=13
DCR_B3#
All displayed
contents can be divided to following parts:
1.name
and kind of interface controller
Here is MPC860,SCC.
2.controller
running status
statistic data of
interrupt,error and reset
the length of
queue
3.configuration
parameters of controller
contents of
parameter register
local parameters
of controller
parameters of
physical protocols
4.status of
receiving and transmitting BD
listing length,
status and pointer of BD
location and
status of receiving and transmitting BD currently
Command “show debug” is used to display all opened debugging items of a router.
show debug
parameter:
none
command mode:
supervisor mode
example:
Router# show debug
Crypto Subsystem:
Crypto Ipsec debugging is on
Crypto Isakmp debugging is on
Crypto Packet debugging is on
relevant command:
debug
command “show logging” is used to display status of logging(syslog).
show logging
parameter:
none
command mode:
supervisor mode
explanation:
Command “show logging” is used to display logging status of console, monitor , syslog and etc.
example:
Router# show logging
Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns)
Console logging: level debugging, 12 messages logged
Monitor logging: level debugging, 0 messages logged
Buffer logging: level debugging, 4 messages logged
Trap logging: level informations, 0 message lines logged
Log Buffer (4096 bytes):
2000-1-4 00:30:11 Configured from console 0 by DEFAULT
2000-1-4 00:30:28 User DEFAULT enter privilege mode from console 0, level = 15
relevant command:
clear logging