. Endscript setting is enabled. As for the available environment:
Prerotate: Instructions before starting logrotate, such as modifying the properties of the login file;
Postrotate: A command that starts after logrotate, such as restarting (KILL-HUP) a service!
Prerotate and postrotate for the file processing that has been added special attributes, it is quite important
the logrotate command in Linux to perform log dumping. You can use the cron scheduled task to easily implement the scheduled dump of the log file./etc/logrotate. conf provides the configuration of the log dump. The following describes some settings of the configuration file:
01
[Root @ xhot ~] # Cat/etc/logrotate. co
, the/etc/rsyslog is required. add a configuration line in d/50-default.conf:1Auth.info @ 10.123.76.11Add the following configuration in/etc/syslog. conf of the log server:1SYSLOGD_OPTIONS = "-m 0-r" // just add "-r" here.2KLOGD_OPTIONS = "-x"3SYSLOG_UMASK = 077Then restart the syslog service of the log server.1Service syslog restartOver time, log files will become larger and larger. When the size of log files exceeds a certain hour, it will affect the system performance. Sometimes, the system a
Linux saves detailed records of events that occur in the system, which are called log files or message files. You can refer to the log file to determine the current state of the system, observe the intruder trail, and look for data related to a particular program (or event). SYSLOGD and KLOGD (monitor the Linux kernel-submitted messages) daemon is responsible for recording, sending the information generated
Log System in Linux
The log system records every status information of the system running in text, which helps us to observe the normal status of the system running and how to quickly locate the error location during system running errors; the following describes the log functions in Linux.
Each operating system has its own powerful log function, which is available in windows, and also in
the Xfree86 xwindows server. If you are having problems booting to graphics mode, you will generally find the reason for the failure in this file.
D, in the/var/log directory, there are some files that end with a number, which are the archived files that are already in circulation. Log files can become particularly large and unwieldy. Linux provides a command to cycle through these logs so that your current log information is not submerged in old irr
Linux system management commands and linux System Management
System and management commands
Users and Groups commandsUsersImportance: MediumDisplays all logged-on users. This command is basically the same as who-q.
GroupsImportance: MediumLists the current user and the group it belongs. This is equivalent to $ GROUPS internal variable, but this command will give the group name, not a number.
Chown, chgrpIm
} '| sh
1117 how to create multiple X (noclouds)Startx is the first X starting from display: 0.0 by default. Multiple X can be created by passing parameters to xserver:# Startx --: 1.0# Startx --: 2.0...Then switch with Ctrl-Alt-F7/f8.
1118 let a program continue running after logging out (noclouds, Chen Xu)# # DisownOrNohup command
1119 check the screen display information when Linux is started (Chen Xu)Run the dmesg command to view
1120 keep VI ale
reach the minimum value will be the rotation, or even if the time to achieve or not round
Size sizes
Log rotation is only larger than the specified size, not by time rotation
Dateext
Use date as the suffix of the rotation file
Note: The global configuration is represented outside of curly braces, and if there is the same configuration in curly braces, it is replaced by the configuration in curly braces, otherwise it is replaced by braces.(3) Adding
# RPM Packages Drop log rotation information into this directoryInclude/etc/logrotate.d# no packages own wtmp--we'll rotate them here/var/log/wtmp {MonthlyCreate 0664 Root utmpRotate 1} # system-specific logs May is also is configured here.Run Time:[Email protected] log]# RPM-QL logrotate/etc/cron.daily/logrotate/etc/logrotate.conf/etc/logrotate.d/usr/sbin/logrotate
tags:Prerotate: Instructions to be made before starting logrotate, such as modifying file propertiesPostrotate: A command that starts after logrotate, such as restarting a service.5.logrotate [-VF] logfile: Instruction logrotate Service, parameters,1)-V: Start display mode, will show the process of
Linux log rotation analysis [plain] # Log rotation for/etc/Cron in the default sub-cron. daily/logrotate # the log file depends on the configuration file/etc/logrotate. conf # Description of the configuration file weekly # By default, logs are cleared once a week in rotate10 # warranty... linux log rotation analysis [p
security logs, user and Working Group changes, user logon authentication information, And/var/log/btmp records Linux logon failures. user, time, and remote IP address, /var/log/cron records the execution of scheduled tasks.
The syslog service is managed by two important configuration files:/etc/syslog. conf main configuration file and/etc/sysconfig/syslog auxiliary configuration file, while/etc/init. d/syslog is the startup script.
After the system
logs, user and Working Group changes, user logon authentication information, And/var/log/btmp records linux logon failures. user, time, and remote IP address, /var/log/cron records the execution of scheduled tasks.
The syslog service is managed by two important configuration files:/etc/syslog. conf main configuration file and/etc/sysconfig/syslog auxiliary configuration file, while/etc/init. d/syslog is the startup script.
After the system has been w
Configure linux as the log host of the pix, switch, and router-Linux Enterprise Application-Linux server application information. For more information, see the following. I. linux Configuration:
1. vi/etc/sysconfig/syslog (press I to enter the vi editing status, Press ESC to return to the command line status after the
This article and everyone to share is the use of Linux in the command logrotate to the Nginx Log cutting related implementation method, hope to help you better learning Linux systems . Nginx installation directory:/usr/local/nginx/Nginx Log directory:/usr/local/nginx/logs/,/usr/local/nginx/logs/nginx_logs/1. Add nginx log Cutting scriptCD/ETC/LOGROTATE.D # Ente
security. Because log files can record various daily events of the system in detail, you can check the causes of errors through log files, or trace the attackers when they are attacked or attacked. Two important roles of logs are review and monitoring. The configured Linux Log is very powerful. For Linux systems, all log files are stored in/var/log. By default, Linux
Introduction to login Files
The login file records the activity information of the system, and by analyzing the information, we can solve the system errors and network problems. Login files are generally in the /var/log/ directory, in general messages file records the most information. The generation of the login file:Software developers customize the resulting login file and its format Linux system provides login file management services to manage t
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.