tail-logs
要打开系统日志以查看在与思科技术支持中心 (TAC) 合作解决问题时编写的消息,请使用 tail-logs 命令。
tail-logs
Command History
版本 |
修改 |
---|---|
6.1 |
引入了此命令。 |
Usage Guidelines
tail-logs 命令会打开系统日志,以便您可以查看写入的消息。请在配合思科技术支持中心 (TAC) 解决问题时使用此命令,以便他们帮助您解释输出内容并选择要查看的相应日志。
命令会显示一个列出所有可用日志的菜单。按照命令提示符选择日志。如果日志很长,您将看到 More 行;按 Enter 键一次前进一行,按 Space 键一次进入一页。查看完日志后,按 Ctrl+C 返回命令提示符。
Examples
以下示例显示了如何跟踪 ngfw.log 文件。文件列表首先在顶部列出目录,然后列出当前目录下的文件。
> tail-logs
===Tail Logs===
============================
Directory: /ngfw/var/log
----------sub-dirs----------
cisco
mojo
removed_packages
setup
connector
sf
scripts
packages
removed_scripts
httpd
-----------files------------
2016-10-14 18:12:04.514783 | 5371 | SMART_STATUS_sda.log
2016-10-14 18:12:04.524783 | 353 | SMART_STATUS_sdb.log
2016-10-11 21:32:23.848733 | 326517 | action_queue.log
2016-10-06 16:00:56.620019 | 1018 | br1.down.log
<list abbreviated>
2016-10-06 15:38:22.630001 | 9194 | ngfw.log
<list abbreviated>
([b] to go back or [s] to select a file to view, [Ctrl+C] to exit)
Type a sub-dir name to list its contents: s
Type the name of the file to view ([b] to go back, [Ctrl+C] to exit)
> ngfw.log
2016-10-06 15:38:22 Running [rm -rf /etc/logrotate-dmesg.conf /etc/logrotate.conf /etc/logrotate.d
/etc/logrotate_ssp.conf /etc/logrotate_ssp.d] ... success
2016-10-06 15:38:22 Running [ln -sf /ngfw/etc/logrotate-size.conf /etc/] ... success
2016-10-06 15:38:22 Running [ln -sf /ngfw/etc/logrotate-size.d /etc/] ... success
2016-10-06 15:38:22 Running [ln -sf /ngfw/etc/logrotate.conf /etc/] ... success
2016-10-06 15:38:22 Running [ln -sf /ngfw/etc/logrotate.d /etc/] ... success
2016-10-06 15:38:22 Running [rm -f /usr/sbin/ntpd] ... success