Linux syslog, System log, logs, system, network, kernel, service, etc.
[Email protected] ~]# cat/var/log/messages
Imagine that if all the operating contents of the system are recorded in the file, it will cause the file to be too large and how to avoid it.
[[email protected] ~]# du-sh! $du-sh/var/log/messages228k/var/log/messages# found the log is not large [[email protected] ~] # ls/var/log/messages*/var/log/messages/var/log/messages-20180121/var/log/messages-20180108/var/log/messages -20180130/var/log/messages-20180119# prevents the log from being added indefinitely, setting up a log cutting tool. Logrotate[[email protected] ~]# cat/etc/logrotate.conf# see ' Man logrotate ' for details# rotate log files weekly weekly cut Cut weekly# Keep 4 weeks worth of backlogs reserved 4 rotate 4# Create new (empty) log files after rotating old ones create a file create# us E date as a suffix of the rotated file suffix name dateext# Uncomment this if you want your log files compressed whether compressed #compress# Tells Logrotate to read the log dump parameters stored in the/ETC/LOGROTATE.D directory, which is useful when the RPM package is installed in the system. The log dump parameters for RPM packages are generally stored in the/ETC/LOGROTATE.D directory. # RPM Packages Drop log rotation information into this directory include/etc/logrotate.d# no packages own wtmp and btmp --we ' ll rotate them here/var/log/wtmp {monthly Create 0664 root utmp minsize 1M Rotate 1}/var/log/btmp {Missingok monthly create 0600 root utmp rotate 1}# system-specific logs may be ALS O is configured here.
Reference https://my.oschina.net/u/2000675/blog/908189
Dmesy command, hardware run log. is not associated with/VAR/LOG/DMESG, the file is logged by the system startup.
Last command to view the correct login and restart history. Call is/var/log/wtmp, the binary file cannot be cat
LASTB command to view the history of login failures. The call is/var/log/btmp and cannot be cat
Security log/var/log/secure will record some information such as brute force cracking.
Linux8.7 Linux system logs