Log server syslogd for Linux systems

Source: Internet
Author: User
Tags syslog dmesg

System logs are information that records hardware, software, and system problems in the system, and can also monitor events that occur in the system. It allows the user to check the cause of the error, or to look for traces left by the attacker in the event of an attack.

The Event Viewer for Windows is a log system. The Linux log system is created by installing the SYSKLOGD package to form two services:

/SBIN/KLOGD for hardware (for cores, many hardware-related)

/SBIN/SYSLOGD for Software (syslog server for the system)

To view hardware-related logs:

[[email protected] ~]# DMESG |grep-i CPU View information about the CPU

[[email protected] ~]# DMESG |grep-i mem View Memory related information

[Email protected] ~]# DMESG |grep-i eth0 View information about eth0

Network devices: Routers, firewalls, switches, etc. all have their own log capabilities.

The purpose of the log is to let us know the changes of the system in time to help us make some diagnoses.

Category files for logs:/etc/syslog.conf

  

  

As you can see from the Man Handbook, the first column of the log classification file represents the type of log and the level of the log, and the second column represents the action taken on the log specified in the first column.

The usual actions are taken by three kinds:

1. Write the specified type log to the file (file name)

2. Send the specified type log to each user currently logged on to the system (*)

3. Send the specified type log to another log server (@ address)

To implement a log server on Linux:

1. Turn on log service

  

The system is turned on by default.

2. Edit the configuration file

  

The Add-r option indicates that logs from other hosts are allowed to be logged.

3. Restart Service

  

At this point, the log server is configured to complete. Next, open another Linux virtual machine, as the application server, which is the client in the log schema, to test.

4. Test:

In the client edit/etc/syslog.conf file, modify the action listed as: @ Log server address. Restart the log service.

  

Observe the log information sent by the client on the server.

  

You can see that the client's log information is displayed on the server side.

Windows implementation Log server: You need to install a third-party software KIWI_SYSLOGD log server.

Log server syslogd for Linux systems

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.