table of Contents
Priority (high ----> Low) log message
Common usage journalctl logging facility
View hardware information module
Common system log
/ Var / log / messages recorded kernel messages, public services messages
Various messages / var / log / dmesg recording system startup process
/ Var / log / cron cron scheduled tasks associated with the recording of information
/ Var / log / mailog mail messages related to the recording
/ Var / log / secure records and restrict access to security-related news
Priority (high ----> Low) log message
Case level 0, the system is unavailable: EMERG (emergency)
ALERT (alert): level 1, you must immediately take the measures
CRIT (critical): Level 2, serious situation
ERR (error): Level 3 errors
WARNING (Warning): Level 4, it is worth warning the situation
NOTICE (Note): Level 5 ordinary things but the value of attention
INFO (Information): Level 6, General Information
DEBUG (debug): Level 7, program / service debug messages
Common usage journalctl logging facility
journalctl | grep Keywords
journalctl -u server -p priority
journalctl -n number of message
journalctl --since="yyyy-mm-dd HH:MM:SS" --until="yyyy-mm-dd HH:MM:SS"
For example:
[root@pc01 ~]# journalctl -p err -n 10
[root@pc01 ~]# journalctl --since "2017-01-06 14:11" --until "2017-01-06 19:11"
[root@pc01 ~]# journalctl -u httpd
View hardware information module
[root@pc01 ~]# dmesg | grep -i vbr
[ 62.157532] device vbr-nic entered promiscuous mode
[ 62.283506] vbr: port 1(vbr-nic) entered listening state
[ 62.283516] vbr: port 1(vbr-nic) entered listening state
[ 62.283575] IPv6: ADDRCONF(NETDEV_UP): vbr: link is not ready
[ 62.313847] vbr: port 1(vbr-nic) entered disabled state
[ 62.699983] IPv6: ADDRCONF(NETDEV_UP): vbr-nic: link is not ready
[90636.235930] vbr: port 2(vnet5) entered listening state
[90636.235939] vbr: port 2(vnet5) entered listening state
[90638.241630] vbr: port 2(vnet5) entered learning state
[90640.246914] vbr: topology change detected, propagating
[90640.246936] vbr: port 2(vnet5) entered forwarding state
[90640.247039] IPv6: ADDRCONF(NETDEV_CHANGE): vbr: link becomes ready