show log

メモリ上に保存されているログを参照する

コマンドの書式

show log
  [level { emerg | alert | crit | error | warning | notice | info | debug }]
  [function { appgw | auth | daemon | dhcp | ether | ike | ipf | kern | l2tp |
    nat | ntp |  ppp | route | smf | syslog | user | wlan }]
  [debug]
level
レベルを指定して出力する
注: 指定レベルのログのみ出力します
emerg
発火など、システムや設備に深刻な損害を与える可能性がある
alert
critかつ他のシステムにも悪影響を与える可能性がある
crit
オペレータの介入が必要(ケーブルや周辺機器との接続など)
error
設定/仕様通りの動作が不可能な問題
warning
異常が疑われる事象が発生したが、対処の必要はない
notice
正常動作だが特に通知すべき事象
info
一般的な動作状況の通知
debug
開発及び動作解析の ための詳細な情報
function
機能を指定して出力する
appgw
アプリケーションゲートウェイ
auth
ログイン認証
daemon
デーモンプログラム
dhcp
DHCP
ether
イーサネット
ike
IKE
ipf
IPパケットフィルタ
kern
カーネルプロセス
l2tp
L2TPv3
nat
NAT/NAPT
ntp
NTP
ppp
PPP(PPPoEのPPP部分を含む)
route
経路制御
smf
SMF
syslog
ログ
user
ユーザプロセス
wlan
無線LAN
debug
出力にdebugレベルのログを含める
注: 無指定時はdebugレベルのログを除外します

出力例:動作中のログ

Jan  1 09:00:00    info  syslog  syslogd: restart
Jan  1 09:00:00  notice    kern  /netbsd: syncing disks... done
Jan  1 09:00:00  notice    kern  /netbsd: unmounting file systems...unmounted procfs on /proc type procfs
Jan  1 09:00:00  notice    kern  /netbsd: unmounted ptyfs on /dev/pts type ptyfs
Jan  1 09:00:00  notice    kern  /netbsd: unmounted kernfs on /kern type kernfs
Jan  1 09:00:00  notice    kern  /netbsd: Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
Jan  1 09:00:00  notice    kern  /netbsd:    2006, 2007, 2008, 2009, 2010, 2011, 2012
Jan  1 09:00:00  notice    kern  /netbsd:    The NetBSD Foundation, Inc.  All rights reserved.
Jan  1 09:00:00  notice    kern  /netbsd: Copyright (c) 1982, 1986, 1989, 1991, 1993
Jan  1 09:00:00  notice    kern  /netbsd:    The Regents of the University of California.  All rights reserved.
Jan  1 09:00:00  notice    kern  /netbsd: 
Jan  1 09:00:00  notice    kern  /netbsd: NetBSD 6.0_STABLE (SEILW1_MD) #0: Tue Nov 20 17:18:48 JST 2012
Jan  1 09:00:00  notice    kern  /netbsd: total memory = 128 MB
Jan  1 09:00:00  notice    kern  /netbsd: avail memory = 99576 KB
…