log system on Linux
Syslog
Syslog-ng
log system:syslogd()
A:
B:
D:
Syslog Service:
SYSLOGD: system, non-kernel generated information
KLOGD: kernel, specifically responsible for recording internal medicine generated logs
kernel– Physical terminal (dev/console)--/VAR/LOG/DMESG
Log Demand scrolling ( log Cut ) :
Messages Message.1 Message.2
/sbin/init
/var/log/messages, System categorization malleability error log, non-kernel generates boot information, information generated by each subsystem;
/var/log/maillog: log information generated by the mail system
/var/log/secure record which users are trying to log in
Logrotate
/etc/cron.daily/logrotate This script will complete a scroll every day, and his configuration file is/etc/logrotate.conf
Information Detailed procedure: Log Level
subsystem:facility, facilities
Action:
Syslog:syslogd and klogd
the configuration file definition format is:facility.prority action
facility, which can be understood as the source of the log or device currently used by facility, has the following types:
Auth Certification-related
Authpriv permissions, licensing-related
Cron Task Schedule related
Daemon Daemon-related
Kern kernel-related
LPR Printing related
Mail message-related
Mark tags related to
News Stories related to
security-related, similar to auth
Syslog syslog self-related
UUCP Unix to UNIX CP related
Local0 to local7 user-defined use
* denotes all facility.
The level of the priority log levels, which generally have the following levels (from low to high)
debug information for debug programs or Systems
Info General Information
Notice does not affect the normal function, need to pay attention to the information
Warning/warn may affect system functionality and need to remind users of important events
Err/error Error message
Crit more serious.
Alert must be processed immediately.
Emerg/canic will cause the system to be unavailable
* indicates all log levels
None is related to *, it means nothing.
Location of the Action (action) log record
absolute path on the system Normal file such as /var/log/xxx
| pipelines are routed to other commands for processing
Terminal such as :/dev/console
$HOSR remote host such as @10.0.0.1
User System Users such as:root
* Login to all users on the system, the general Emerg level of the log is defined like this
Service Rsyslog Reload allows rsyslog to read configuration files without rebooting
Vi/etc/rc.d/init.d/rsyslog
vi/etc/rsyslog.conf Modifying a configuration file
Vi/var/log
This article from "Linux operation and Maintenance" blog, declined reprint!
Log system on Linux