linux log management part

1. The theme is log management. The role of the log. Log rotation
2. The log is how to generate?
a. rsyslog
b. Application (httpd, MySQL)
3.rsyslog Program Manager
to install: yum install -y rsyslog
start: systemctl start rsyslog
query: systemctl status rsyslog
query: ps aux | grep rsyslog

4.rsyslog program, maintaining profiles
upgrade: yum update rsyslog
configuration file: /etc/rsyslog.conf
rules: device-level file

The log rotation configuration file What?
the /etc/logrotate.conf
/etc/logrotate.d/*

6. log rotation rules?
Weekly rotation weekly
reservations 4 parts rotate 4
to create a new file create
date of the file extension dateext do
use compression compress
lost not prompt missingok

Published 16 original articles · won praise 0 · Views 545

Guess you like

Origin blog.csdn.net/QAQkira/article/details/104567092