默认情况下日志消息不包括日期和时间戳。
service timestamps {debug | log } uptime
service timestamps {debug | log } datetime [mesc] [localtime] [show-timezone] [year]
debug 参数 在调试输出时包括时间戳
log 参数 在每种日志消息中添加一个时间戳
uptime 在消息中包括路由器开机以来的时间
0w2d: #SYS-5-CONFIG_I : Configured from console by console
0w2d 开机后0周2天
datetime 显示准确的日期和时间 UTC 格式 标准格式 MM DD HH:MM:SS
datetime后面可以跟一些参数
mesc 消息中包括毫秒信息
localtime 显示基于本地配置的时区时间
show-timezone 输出包括时区名称
year 输出包括年份信息
Connected to Dynamips VM "default" (ID 0, type c7200) - Console port
使用Dynamips 测试
r1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
r1(config)#service timestamps ?
debug Timestamp debug messages
log Timestamp log messages
<cr>
r1(config)#service timestamps log ?
datetime Timestamp with date and time
uptime Timestamp with system uptime
<cr>
r1(config)#service timestamps log uptime 首先使用开机时间 uptime
r1(config)#do show ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.100.2 YES NVRAM up up 产生一条消息用
Serial1/0 unassigned YES NVRAM administratively down down
Serial1/1 unassigned YES NVRAM administratively down down
Serial1/2 unassigned YES NVRAM administratively down down
Serial1/3 unassigned YES NVRAM administratively down down
r1(config)#int fa 0/0
r1(config-if)#shut
r1(config-if)#
00:02:58: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
00:02:59: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
00:02:58 开机时间 。 2 3 层改变为down
r1(config-if)#exit
r1(config)#service timestamps log datetime ?
localtime Use local time zone for timestamps
msec Include milliseconds in timestamp
show-timezone Add time zone information to timestamp
year Include year in timestamp
<cr>
r1(config)#service timestamps log datetime localtime msec show-timezone year
r1(config)#int fa 0/0
r1(config-if)#no shut
r1(config-if)#
*Sep 15 2007 08:18:13.923 UTC: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Sep 15 2007 08:18:14.923 UTC: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
2 3 层改变为up Sep 15 2007 08:18:13.923 UTC 7月 15日 8点 18分 13秒 923 毫秒 UTC时间
r1(config)#service timestamps debug ?
datetime Timestamp with date and time
uptime Timestamp with system uptime
<cr>
r1(config)#service timestamps debug uptime
r1(config)#do debug all
This may severely impact network performance. Continue? (yes/[no]): yes
All possible debugging has been turned on
r1#
00:07:09: IP routecache flags changed on Null0,
added No CEF; now No CEF
00:07:09: IP routecache flags changed on Null0,
added No CEF; now No CEF
00:07:10: CEF: background resolution thread state:
00:07:10: Thread fast_thread: Empty
00:07:10: Thread todothread: Empty
00:07:10: Thread slow_thread: Emp
r1#un all
r1#conf t
r1(config)#service timestamps debug datetime ?
localtime Use local time zone for timestamps
msec Include milliseconds in timestamp
show-timezone Add time zone information to timestamp
year Include year in timestamp
<cr
r1(config)#$estamps debug datetime localtime msec show-timezone year
r1(config)#do debgug
This may severely impact network performance. Continue? (yes/[no]): yes
All possible debugging has been turned on
r1#
*Sep 15 2007 08:22:27.335 UTC: IP routecache flags changed on Null0,
added No CEF; now No CEF
*Sep 15 2007 08:22:27.339 UTC: IP routecache flags changed on Null0,
added No CEF; now No CEF
*Sep 15 2007 08:22:27.359 UTC: CEF: background resolution thread state:
*Sep 15 2007 08:22:27.359 UTC: Thread fast_thread: Empty
*Sep 15 2007 08:22:27.359 UTC: Thread todothread: Empty
*Sep 15 2007 08:22:27.359 UTC: Thread slow_thread: Empty
*Sep 15 2007 08:22:27.923 UTC: Local MobileIP: aging arp mobility cache entries
*Sep 15 2007 08:22:27.927 UTC: IP-ST: if_list try 0
*Sep 15 2007 08:22:27.927 UTC: IP-ST: gw_list total 0, try 0, completed list TRUE
日志消息前面有个* 。日志消息一般是从三种字符的一种开始:空格 星号 句号
空格 路由器的时钟被手动设置,或者和NTP时间服务器同步
星号 路由器的时钟没有别设置,或者没有和NTP服务器同步
句号 路由器的时钟被设置为同步,但和NTP服务器失去了联系
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
route_ppt 1 EIGRP 2 OSPF 3 OSPF 4 Redistribute 5 BGP ch08 在企业网中实施IPv6 switch_ppt 1 VLAN 2 STP 3 routing-svi-cef 4 redundancy 5 sec 模块8 园区网中的语音和视频 tshoot_ppt 模块1 规划复杂网络的维护 模块2 规划复杂网络的排障 模块3 维护和排障的工具、应用程序 模块4 园区交换网络的维护和排障 模块5 路由网络的维护和排障 模块6 网络安全问题的维护和排障 模块7 集成、复杂企业网络的维护和排障
资源推荐
资源详情
资源评论
收起资源包目录
新版思科CCNP路由交换排错中文PPT--难得一见 (120个子文件)
backbonefast.doc 218KB
交换机安全.doc 147KB
网关冗余.doc 99KB
RSTP的改进特性.doc 64KB
PAgP LCAP 区别.doc 64KB
bpdu防护.doc 51KB
VRRP.doc 33KB
loop guard.doc 32KB
RSTP.doc 30KB
ip sla配置和注解.doc 26KB
IP SLA和对象跟踪.doc 22KB
Redundancy 2.doc 22KB
note.doc 21KB
autostate exclude.doc 20KB
~$note.doc 162B
NSF不间断转发技术白皮书.pdf 434KB
ICMP重定向详解.pdf 217KB
UDLD单向链路检测.pdf 100KB
复杂的实现.pkt 37KB
04.OSPF LSA.ppt 4.75MB
01.思科IOS软件的基本诊断工具.ppt 3.52MB
03.EIGRP on the Wan.ppt 3.36MB
06.路由器性能问题的排障.ppt 3.12MB
03.配置并检查路由重发布.ppt 2.95MB
04.使用HSRP配置三层冗余.ppt 2.59MB
02.配置私有VLAN(PVLAN).ppt 2.57MB
06.OSPF Special Area Types.ppt 2.56MB
01.描述VLAN间路由.ppt 2.54MB
04.配置并检查基本的BGP.ppt 2.39MB
01.Introducing EIGRP.ppt 2.38MB
02.安全特性回顾.ppt 2.34MB
00.Describing network requirements.ppt 2.24MB
03.OSPF Network Types.ppt 2.02MB
02.Implementing and Verifying EIGRP.ppt 2.01MB
04.EIGRP Authentication.ppt 1.96MB
05.交换机性能问题的排障.ppt 1.93MB
01.STP增强特性 .ppt 1.89MB
01.企业园区网架构.ppt 1.87MB
01.Introducing IPv6.ppt 1.86MB
05.BGP的排障.ppt 1.77MB
02.STP稳定性机制.ppt 1.73MB
01.网络中路由的性能和安全问题.ppt 1.7MB
07.Configuring OSPF Authentication.ppt 1.68MB
02.EIGRP的排障.ppt 1.68MB
01.交换机安全问题.ppt 1.66MB
02.使用专业的维护和排障工具.ppt 1.57MB
05.BGP路径属性和选路原则.ppt 1.55MB
03.欺骗攻击的防范.ppt 1.53MB
05.路径控制的网络性能问题.ppt 1.53MB
03.OSPF的排障.ppt 1.49MB
03.园区网中语音、视频和数据的融合.ppt 1.48MB
03.实施网络监控.ppt 1.47MB
03.网络维护的工具、应用程序和资源.ppt 1.42MB
05.Configuring Advanced EIGRP Options.ppt 1.36MB
11.Tunneling IPv6 Traffic.ppt 1.34MB
03.规划并执行排障过程.ppt 1.29MB
04.第一跳冗余协议的排障.ppt 1.28MB
05.使用VRRP和GLBP配置三层冗余.ppt 1.23MB
01.introducing the OSPF protocol.ppt 1.23MB
09.IPv6 Redistribution.ppt 1.23MB
02.运行多种路由协议的网络.ppt 1.22MB
02.部署多层交换.ppt 1.2MB
03.使用EtherChannel配置链路聚合.ppt 1.2MB
04.路由重发布的排障.ppt 1.18MB
05.OSPF Router Summarization.ppt 1.14MB
01.最佳的VLAN拓扑.ppt 1.1MB
02.OSPF Packet Types.ppt 1.05MB
12.Translation Using NAT-PT.ppt 1.04MB
02.在园区网中集成VoIP.ppt 1.02MB
02.生成树的排障.ppt 1000KB
01.规划企业到ISP的连接.ppt 948KB
06.Configuring EIGRP for IPv6.ppt 938KB
05.Configuring OSPFv3.ppt 925KB
02.排障的方法.ppt 887KB
04.Configuring Static Routing.ppt 856KB
01.VLAN的排障.ppt 804KB
02.使用BGP的优势.ppt 789KB
01.高可用性概述.ppt 778KB
01.网络层连通性的排障.ppt 736KB
02.实现高可用性.ppt 732KB
01.规划园区网以支持语音.ppt 677KB
08.IPv6 PBR.ppt 670KB
04.在网络维护流程中融入排障.ppt 641KB
07.Multiprotocol BGP (MP-BGP).ppt 618KB
01.网络排障案例.ppt 542KB
02.VLAN攻击的防范.ppt 539KB
02.Configuring and Verifying IPv6 Unicast Addresses.ppt 537KB
04.网络服务的安全性.ppt 529KB
03.SVI和VLAN间路由的排障.ppt 496KB
10.Transitioning IPv4 to IPv6.ppt 493KB
03.iBGP和eBGP的功能和使用.ppt 490KB
01.复杂环境的排障.ppt 469KB
01.网络维护的方法.ppt 391KB
13.summary.ppt 383KB
02.常见的维护流程.ppt 383KB
03.Routing IPv6 Traffic.ppt 310KB
01.安全特性的排障.ppt 251KB
06.总结.ppt 21KB
06.总结.ppt 19KB
07.总结.ppt 18KB
共 120 条
- 1
- 2
资源评论
- uijasmine2015-02-21很好的资料!很管用!
- nanzhangjiang2019-10-20没仔细看,2014年的资料,有点老了
machen_smiling
- 粉丝: 506
- 资源: 1958
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 关于纯真IP库的使用方法
- 基于Verilog的SPI通信FPGA程序设计,适合FPGA初学者,或者有SPI使用需求的开发者
- LM35+LM393+其他电阻电容器件20-120温度3状态
- Spring boot整合websocket实现即时通讯
- 基于51单片机STC89C52RC(TQFP44封装) 最小系统板Altium设计硬件(原理图+PCB+3D封装库)文件.zip
- Redis-rs 是 Rust 的高级 redis 库 它通过一个非常灵活但低级的 API 提供对所有 Redis 功能的便捷访
- Oracle11g-R2安装包
- 步进电机调速系统设计资料毕业设计(程序+结构图+流程图+源文件)
- HCIA-AI Solution V1.0 培训手册和实验手册.zip
- mipi DPHY CTS V1.0
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功