取消
显示结果 
搜索替代 
您的意思是: 
cancel
2992
查看次数
0
有帮助
2
回复

N3K重启后show logging只能查到重启后的日志?

请教下,交换机因故障重启,但是show logging只能查到重启后的日志。怎么才能查到重启前的日志?

1 个已接受解答

已接受的解答

ilay
VIP
VIP

大多数cisco设备重启之后是看不到重启前的log信息的,有可能N3K也适用于此情况。

目前手里有两类的N3K,N3048和N31108PCV,简单的对log的情况查了一下:

N3048设备已经比较老了,前一段时间设备异常,手动重启了一下,之前的log是没有保存的,

N31108PCV 暂时没有任何重启或异常记录,相比N3048 多了一个logflash:的存储设备,log:messages 和logflash:log:messages的大小也不一样(目前针对logflash的特性还不清楚,如果你的设备存在logflash,可以看看此目录中是否有相关的log信息)

N31108PCV-1# dir logflash:
       4096    Sep 05 00:51:52 2020  ISSU_debug_logs/
       4096    Apr 23 18:20:05 2021  command/
       4096    Sep 05 00:34:20 2020  core/
       4096    Sep 05 00:34:20 2020  debug/
       4096    Aug 31 15:38:24 2021  debug_logs/
       4096    Sep 05 00:34:20 2020  generic/
       4096    Sep 05 00:35:48 2020  log/
      16384    Sep 05 00:34:14 2020  lost+found/
       4096    Apr 23 18:22:27 2021  vdc_1/

Usage for logflash://sup-local
  455028736 bytes used
 7865872384 bytes free
 8320901120 bytes total
N31108PCV-1#
N31108PCV-1# dir logflash:log
     272481    Aug 17 10:43:57 2021  messages

Usage for logflash://sup-local
  455028736 bytes used
 7865872384 bytes free
 8320901120 bytes total
N31108PCV-1#
N31108PCV-1# dir log:
         31    Apr 23 08:42:33 2021  dmesg
         48    Apr 23 08:42:50 2021  l2fwder.debug
          0    Apr 23 08:42:49 2021  libfipf.27394
          0    Apr 23 08:43:05 2021  libfipf.29584
          0    Apr 23 08:43:09 2021  libfipf.29670
          0    Apr 23 08:43:13 2021  libfipf.29718
       1814    Apr 23 08:43:32 2021  libnsusd-internal-log
      82765    Aug 17 10:43:57 2021  messages
        186    Apr 23 08:43:32 2021  mtm_lib.log
         21    Apr 23 08:43:06 2021  plcmgr.dbg
       2983    Apr 23 08:43:32 2021  pss_helper_ncftp.log
      10148    Jul 22 10:24:13 2021  startupdebug
        716    Apr 23 08:42:51 2021  syslogd_ha_debug

Usage for log://sup-local
     188416 bytes used
   52240384 bytes free
   52428800 bytes total
N31108PCV-1# 

---------

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus3000/sw/system_mgmt/92x/b-cisco-nexus-3000-series-nx-os-system-management-configuration-guide-92x/b-cisco-nexus-3000-series-nx-os-system-management-configuration-guide-92x_chapter_01000.h...

N3K的文档中表示,log可以设置logfile保存,或者通过log server保存,logfile 大概类似于传统IOS中的logging buffer,可以通过show logg查看,但都是掉电易失的。对比之下最为稳妥的还是指定外部的logging server。

如果设备的bootflash: log:  logflash:中都没有相关信息,那基本是查不到了。建议设置ntp之后再配置log server,将log单独存放吧。

 

 

在原帖中查看解决方案

2 条回复2

ilay
VIP
VIP

大多数cisco设备重启之后是看不到重启前的log信息的,有可能N3K也适用于此情况。

目前手里有两类的N3K,N3048和N31108PCV,简单的对log的情况查了一下:

N3048设备已经比较老了,前一段时间设备异常,手动重启了一下,之前的log是没有保存的,

N31108PCV 暂时没有任何重启或异常记录,相比N3048 多了一个logflash:的存储设备,log:messages 和logflash:log:messages的大小也不一样(目前针对logflash的特性还不清楚,如果你的设备存在logflash,可以看看此目录中是否有相关的log信息)

N31108PCV-1# dir logflash:
       4096    Sep 05 00:51:52 2020  ISSU_debug_logs/
       4096    Apr 23 18:20:05 2021  command/
       4096    Sep 05 00:34:20 2020  core/
       4096    Sep 05 00:34:20 2020  debug/
       4096    Aug 31 15:38:24 2021  debug_logs/
       4096    Sep 05 00:34:20 2020  generic/
       4096    Sep 05 00:35:48 2020  log/
      16384    Sep 05 00:34:14 2020  lost+found/
       4096    Apr 23 18:22:27 2021  vdc_1/

Usage for logflash://sup-local
  455028736 bytes used
 7865872384 bytes free
 8320901120 bytes total
N31108PCV-1#
N31108PCV-1# dir logflash:log
     272481    Aug 17 10:43:57 2021  messages

Usage for logflash://sup-local
  455028736 bytes used
 7865872384 bytes free
 8320901120 bytes total
N31108PCV-1#
N31108PCV-1# dir log:
         31    Apr 23 08:42:33 2021  dmesg
         48    Apr 23 08:42:50 2021  l2fwder.debug
          0    Apr 23 08:42:49 2021  libfipf.27394
          0    Apr 23 08:43:05 2021  libfipf.29584
          0    Apr 23 08:43:09 2021  libfipf.29670
          0    Apr 23 08:43:13 2021  libfipf.29718
       1814    Apr 23 08:43:32 2021  libnsusd-internal-log
      82765    Aug 17 10:43:57 2021  messages
        186    Apr 23 08:43:32 2021  mtm_lib.log
         21    Apr 23 08:43:06 2021  plcmgr.dbg
       2983    Apr 23 08:43:32 2021  pss_helper_ncftp.log
      10148    Jul 22 10:24:13 2021  startupdebug
        716    Apr 23 08:42:51 2021  syslogd_ha_debug

Usage for log://sup-local
     188416 bytes used
   52240384 bytes free
   52428800 bytes total
N31108PCV-1# 

---------

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus3000/sw/system_mgmt/92x/b-cisco-nexus-3000-series-nx-os-system-management-configuration-guide-92x/b-cisco-nexus-3000-series-nx-os-system-management-configuration-guide-92x_chapter_01000.h...

N3K的文档中表示,log可以设置logfile保存,或者通过log server保存,logfile 大概类似于传统IOS中的logging buffer,可以通过show logg查看,但都是掉电易失的。对比之下最为稳妥的还是指定外部的logging server。

如果设备的bootflash: log:  logflash:中都没有相关信息,那基本是查不到了。建议设置ntp之后再配置log server,将log单独存放吧。

 

 

谢谢您的指点,我的设备是cisco Nexus3500 C3548P-10GX Chassis

快捷链接