检查上次发生配置更改的时间
用途
当路由器出现问题时,最好检查上次进行的配置更改,因为这可能对问题有一定影响。
要检查上次配置更改的时间,请按照以下步骤操作:
配置配置更改跟踪
操作
要配置此类日志,请按照以下步骤操作:
在配置模式下,转至以下层次结构级别:
[edit]user@host# edit system syslog配置日志文件:
[edit system syslog]user@host# edit file filename例如:
[edit system syslog]user@host# edit file mw-configuration-changes配置更改日志功能和严重度级别:
[edit system syslog filename]user@host# set change-log info验证配置:
[edit system syslog]user@host# showfile mw-configuration-changes {change-log info;}提交配置:
user@host# commit
显示配置的日志文件
用途
以在配置模式中显示日志文件。
操作
要在配置模式下显示日志文件,请输入以下命令:
[edit system syslog]
user@host# run show log filename
例如:
[edit system syslog]
user@host# run show log mw-configuration-changes
示例输出
[edit system syslog] user@host# run show log mw-configuration-changes Sep 17 07:03:22 nut mgd[7793]: UI_CFG_AUDIT_OTHER: User 'root' override: /config/juniper.conf Sep 17 07:07:21 nut mgd[2751]: UI_CFG_AUDIT_OTHER: User 'root' set: [interfaces lo0 unit 0 family inet address 127.0.0.1/32] Sep 17 07:07:21 nut mgd[2751]: UI_CFG_AUDIT_SET: User 'root' set: [system domain-name] "englab.company.net" -> "englab.company.net" Sep 17 07:07:21 nut mgd[2751]: UI_CFG_AUDIT_OTHER: User 'root' set: [system name-server 172.17.28.101] Sep 17 07:07:22 nut mgd[2751]: UI_CFG_AUDIT_OTHER: User 'root' set: [system domain-search] "englab.company.net" Sep 17 07:07:22 nut mgd[2751]: UI_CFG_AUDIT_OTHER: User 'root' set: [system domain-search] "company.net" Sep 17 07:07:22 nut mgd[2751]: UI_CFG_AUDIT_OTHER: User 'root' set: [system domain-search] "jnpr.net"
含义
示例输出显示了日志文件的内容,最后一次配置更改是在9月17日07:07:22。