이 문서에서는 Nexus 7000에서 사용할 수 있는 로깅 기능에 대해 설명합니다.
SUP1
SUP2
N7K1# dir logflash:
compact flash is either not present or not formatted
N7K1# mount logflash:
Failed to mount logflash
N7K1# system health check logflash
Unmount successful...
Fix any file system errors ...done.
N7K1# format logflash:
This command is going to erase the contents of logflash:.
Do you want to continue? (yes/no) [n] y
Notifying services to stop accessing the device...
Formatting logflash:
mke2fs 1.35 (28-Feb-2004)
Formatting completed
Nexus# show clock
21:19:03.878 UTC Fri Jan 25 2013
Nexus# show ver | in uptime
Kernel uptime is 16 day(s), 2 hour(s), 45 minute(s), 59 second(s)
Nexus# show file logflash://sup-active/log/messages
2008 Jan 1 14:05:54 %IDEHSD-2-MOUNT: logflash: online
2008 Jan 1 14:06:07 %MODULE-5-ACTIVE_SUP_OK: Supervisor 6 is active
(serial: JAF1545BTGH)
2008 Jan 1 14:06:07 %PLATFORM-5-MOD_STATUS: Module 6 current-stat
Nexus# dir logflash://sup-standby/vdc_3/log/messages
219040 Jul 16 20:51:25 2012 vdc_3/log/messages
N7K1# show system internal flash
Mount-on 1K-blocks Used Available Use% Filesystem
/ 409600 62432 347168 16 /dev/root
/proc 0 0 0 0 proc
/sys 0 0 0 0 none
/isan 1048576 366864 681712 35 none
/var 51200 544 50656 2 none
/etc 5120 1620 3500 32 none
/nxos/tmp 40960 1268 39692 4 none
/var/log 51200 51200 0 100 none
/var/home 5120 84 5036 2 none
/var/tmp 307200 2972 304228 1 none
/var/sysmgr 1572864 60 1572804 1 none
/var/sysmgr/ftp 512000 108476 403524 22 none
/var/sysmgr/srv_logs 102400 0 102400 0 none
/var/sysmgr/ftp/debug_logs 10240 0 10240 0 none
/dev/shm 3145728 748672 2397056 24 none
/volatile 512000 0 512000 0 none
/debug 5120 108 5012 3 none
/dev/mqueue 0 0 0 0 none
--------------------------------------SNIP---------------------------------
위에 표시된 것처럼 /var/log가 꽉 찼습니다.그런 다음 /var/log의 실제 내용을 확인하여 디렉토리를 사용하는 파일을 확인합니다.사용자 정의 디버그 또는 코어 파일 때문에 디렉터리가 채워져 로깅이 중지될 수 있습니다.
N7K1# sh system internal dir /var/log/external/
./ 420
../ 380
glbp.debug 231
libfipf.24944 0
vdc_4/ 80
libfipf.24115 0
vdc_3/ 80
libfipf.23207 0
vdc_2/ 80
libdt_helper.log 51523584
libfipf.5582 0
libfipf.4797 0
libfipf.4717 0
messages 651264
startupdebug 0
eobc_port_test_result 3
mgmt_port_test_result 3
bootup_test.log 18634
dir 로그를 사용할 수도 있습니다.내용을 볼 수 있습니다.
위의 예에서 libdt_helper.log는 대부분의 공간을 사용하므로 로깅에 문제가 있습니다.Cisco 버그 ID CSCue98451을 참조하십시오.
아래 예는 기본 레벨이 5인 ETPM(Ethernet Port Manager)에 대한 메시지를 인쇄한 syslog를 보여줍니다. 아래 메시지는 레벨 5이므로 로깅 레벨 "threshold"를 충족합니다.
Nexus(config)# int e 3/1
Nexus(config-if)# shut
2013 Jan 25 21:42:07 Nexus %ETHPORT-5-IF_DOWN_ADMIN_DOWN:
Interface Ethernet3/1 is down (Administratively down)
수준을 3으로 변경하면 메시지가 더 이상 인쇄되지 않습니다.이로 인해 문제 해결 능력이 크게 저하될 수 있습니다.
Nexus(config-if)# logging level ethpm 3
Nexus(config)# int e 3/1
Nexus(config-if)# no shut
Nexus(config-if)# sh log last 1
2013 Jan 25 21:42:07 Nexus %ETHPORT-5-IF_DOWN_ADMIN_DOWN:
Interface Ethernet3/1 is down (Administratively down)
Nexus# show accounting log
Fri Mar 15 10:19:58 2013:type=update:id=console0:user=Ciscoadmin:
cmd=configure terminal ; interface Ethernet1/1 (SUCCESS)
Fri Mar 15 10:19:59 2013:type=update:id=console0:user=Ciscoadmin:
cmd=configure terminal ; interface Ethernet1/1 ; shutdown (REDIRECT)
Fri Mar 15 10:19:59 2013:type=update:id=console0:user=Ciscoadmin:
cmd=configure terminal ; interface Ethernet1/1 ; shutdown (SUCCESS)
Fri Mar 15 10:20:03 2013:type=update:id=console0:user=Ciscoadmin:
cmd=configure terminal ; interface Ethernet1/1 ; no shutdown (REDIRECT)
Fri Mar 15 10:20:03 2013:type=update:id=console0:user=Ciscoadmin:
cmd=configure terminal ; interface Ethernet1/1 ; no shutdown (SUCCESS)
N7K1(config)# terminal log-all
N7K1(config)# show accounting log all
Thu Mar 14 17:54:11 2013:type=update:id=console0:user=vbhutta:
cmd=show system internal feature-mgr event-history errors (SUCCESS)
Thu Mar 14 17:54:11 2013:type=stop:id=console0:user=Ciscoadmin:cmd=
Thu Mar 14 17:54:11 2013:type=start:id=console0:user=Ciscoadmin:cmd=
Thu Mar 14 17:54:11 2013:type=update:id=console0:user=Ciscoadmin:
cmd=show system internal feature-mgr event-history msgs (SUCCESS)
N7K1# dir logflash://sup-active/vdc_1
130557 Jan 26 21:46:12 2013 accounting_log
250070 Jan 08 16:55:20 2013 accounting_log.1
N7K1(config)# ip adjmgr internal event-history errors size ?
disabled Disabled
*Default value is small
large Large buffer
medium Medium buffer
small Small buffer
show run all | i event-history to see the configured size
소프트웨어 구성 요소
N7K1# show ip ospf internal event-history event
OSPF events for Process "ospf-1"
2013 Jan 23 17:45:06.518702 ospf 1 [6219]: [6250]:
Got a URIB route notification message, xid 4294901878, count 3
2013 Jan 23 16:58:28.192141 ospf 1 [6219]: [6250]:
Got a URIB route notification message, xid 4294901876, count 3
2013 Jan 23 16:35:47.630173 ospf 1 [6219]: [6250]:
Got a URIB route notification message, xid 4294901874, count 3
모듈 레벨의 하드웨어 구성 요소
module-3# show hardware internal mac event-history info
1) At 596873 usecs after Tue Jan 22 17:06:52 2013
r2d2_fill_port_reset_info-275: Total ports 32
inst_affected 8 total_reset_time 4000 ms
2) At 577801 usecs after Tue Jan 22 17:06:52 2013
r2d2_fill_port_reset_info-187: Reset req. for
Inband instance so choose all instances