Log system on Linux

Source: Internet
Author: User
Tags syslog rsyslog

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.