Syslogd for Linux system services

Source: Internet
Author: User

SyslogdDaemon introduction:

A lot of things will happen at the same time, especially for network services that are disconnected in the terminal window. Therefore, it is necessary to provide a standard mechanism for recording special events and messages.LinuxUse the syslogd daemon to provide this service.

The syslogd daemon provides a standard method for recording system activities and messages. Many other types of Unix operating systems also use compatible daemon. This provides a method for cross-platform recording in the network. In a large network environment, this is more valuable.

The record files used by syslogd to store data are concise text files, which are generally stored in the/var/log subdirectory. Each data item forms a line, including the date, time, host name, process name, process PID, and messages from the process. A global function in the Standard C function library provides a simple mechanism for generating and recording messages. If you do not like writing program code but want to generate data items in the record file, you can use the Logger command. As you can imagine, an important tool like syslogd should be started as part of the boot command script program. Any linux release version you want to use in the server environment has been set for you.

1. Call syslogd

If you need to manually start syslogd, or modify the command script program to start it during boot, you must pay attention to the command line parameters of syslogd. Please refer to the relevant books for details.

2./etc/syslog. conf file

The/etc/syslog. conf file contains the configuration information required to run syslogd. The format of this file is somewhat unusual, but the existing default configuration file is enough to meet your needs, unless you need to find specific information in a specific file, or you need to send the information to the remote recording computer.

Record Information Classification

Before learning about the format of the/etc/syslog. conf file, you must first understand how messages are classified. Each message has a function value Facility) and a Priority value Priority ). The function value tells us which subsystem generates the message, and the priority value tells us how important the message is. These two values are separated by periods and both have equivalent strings, making them easy to remember.

/Etc/syslog. conf file format

The format of each statement in the configuration file is as follows:

Facility/priority combinations separated by commas file

/Process/host to log

Example:

Kern.info/ver/log/kerned

Syslogd can also flexibly send recorded messages to different storage destinations. It can save a message as a file, send the message to a FIFO queue, send the message to a group of users, or record the message in a large site) to a central record host. To differentiate these destinations, the following rules are used at the destination entry:

1. If the start character of the destination to be saved is a slash (/), the message is sent to a file.

2. If the start character of the destination is vertical |), the message is sent to a FIFO queue.

3. If the start character of the destination is "@", the message is sent to a host.

Through the introduction above, we should have known what syslogd is in the Linux system service. Hope to help you.

  1. Linux System Service init
  2. Use LVM to Manage Server buckets in Linux
  3. How to Use Yum to automatically update Linux Server
  4. Debugging notes for Fedora Core Linux system servers
  5. 8.3.2 description of the syslogd daemon configuration file
  6. 8.3.1 syslogd daemon
  7. 10.4.3 Configure syslogd

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.