NETWORK ENGINEER BLOG

Tips and Reviews for Engineers

Juniper EX シリーズの Debug 方法

Cisco の Debug コマンドのように、ログをリアルタイムで出力させる際の手順を紹介します。

OSPF 関連の情報を取得する場合

# set protocols ospf traceoptions file debug.ospf
# set protocols ospf traceoptions flag all
# set system syslog file ospf any any

Radius 関連の情報を取得する場合

# set system processes general-authentication-service traceoptions file debug.radius
# set system processes general-authentication-service traceoptions flag radius
# set system syslog file radius any any

上記設定後、リアルタイムでログを出力させるには、以下を実行します。

# run monitor start debug.ospf
# run monitor start debug.radius

出力を止める場合は、stop オプションを使用します。

# run monitor stop debug.ospf
# run monitor stop debug.radius

確認コマンドは、show log [filename]になります。

# run show log debug.radius
sshd[38633]: Accepted password for oa105 from xx.xx.xx.xx port xxxx ssh2
mgd[38637]: UI_AUTH_EVENT: Authenticated user 'xxxx' at permission level 'j-super-user'
mgd[38637]: UI_LOGIN_EVENT: User 'xxxx' login, class 'j-super-user' [38637], 
ssh-connection 'xx.xx.xx.xx xxxx xx.xx.xx.xx 22', client-mode 'cli'

以上