ログ †
コンソールへのロギング †
rt(config)# logging console priority
- priority
- コンソールに出力するプライオリティ レベル
- debugging, informational, notifications, warnings, errors, critical, alerts, emergencies (デフォルトは debugging)
リモート 接続時のモニタ †
- リモート接続時にコンソール メッセージを出力する
rt# terminal monitor
バッファへのロギング †
rt(config)# logging buffered size priority
- size
- バッファに残すサイズ
- その分、メモリを消費するので上げすぎに注意
- 4,096~2,147,483,647 (デフォルトは 4,096 byte)
- priority
- バッファへ出力するプライオリティ レベル
- debugging, informational, notifications, warnings, errors, critical, alerts, emergencies
バッファの表示 †
rt# show logging
バッファの消去 †
rt# clear logging
Syslog サーバへのロギング †
rt(config)# logging ip-addr
rt(config)# logging source-interface type mod/num
rt(config)# logging facility facility
- ip-addr
- type mod/num
- facility
タイムスタンプ †
起動後の経過時間で記録 †
rt(config)# service timestamps debug|log uptime
実時間で記録 †
rt(config)# service timestamps debug|log datetime [msec] [localtime] [show-timezone]
コマンド再表示 †
設定変更ログ †
設定 †
- 設定モード
rt(config)# archive
rt(config-archive)# log config
- ロギング有効化
rt(config-archive-log-cfg)# logging enable
- パスワードを遮蔽
rt(config-archive-log-cfg)# hidekeys
- 保存数
rt(config-archive-log-cfg)# logging size size
- size
- 保持するログの数
- 1~1000 (デフォルトは 100)
確認 †
rt# show archive log config all
idx sess user@line Logged command
1 1 console@console | logging enable
2 2 console@console |interface FastEthernet0/0
3 2 console@console | ip address 192.168.0.1 255.255.255.0
4 2 console@console |!exec: enable
デバッグ †
開始 †
rt# debug option
停止 †
rt# no debug option