) "content"-t object manually send logs,-p specifies the object category, send Information 8. place the web service access log on the log server CustomLog "| logger-p local4.info-t apache" common9.syslogd to use port 514 and use iptables to control which users will receive logs 10. log polling is executed on/etc/cron every day. in daily/vim/etc/logrotate. conf # see "man logrotate" for details # rotate log
error messages. Check that the file permissions are turned into the previous 640.I checked the nginx. Related information: The task schedule for log cutting, log default permissions, and permissions for the Linux user group are described in the next section.Issue 2 Workaround: Add the normal user previously used for synchronization to an affiliate group, which is in the ADM group. or re-establish a user with the appropriate permissions (for the system log read-only, and attached ADM group), as
configuration file does not have "Dateext"parameter, the log file will need to be renamed when the first log rotation is current"Access_log"The log will be renamed to"Access_log.1", let's Create a new"Access_log"file, when making a second log rotation"Access_log.1"will be renamed to"access_log.2", and"Access_log"The file will be renamed to"Access_log.1"then new"Access_log"File to save the new log information. And so on Log Replacement : When the old log exceeds the saved range, the oldest log i
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 rotate 10 # reserved log files # create new (empty) log files after rotating old ones create # create a new storage # uncomment this if you wan
How to start and cut MongoDB system logs
When the mongos routing service is enabled during mongodb sharding, a log storage location is specified:1 mongos -- configdb 127.0.0.1: 27019 -- logpath/var/log/mongodb/mongos. log -- pidfilepath/var/run/mongodb/mongos. pid -- logappend -- logRotate reopen -- fork
We have specified the log storage location in/var/log/mongodb/mongos. in the log file, when the system data volume is large and has been running for
daily/vim/etc/logrotate. conf # see "man logrotate" for details # rotate log f iles weeklyweekly (The unit of file record week) # keep 4 weeks worth of backlogsrotate 4 (the volume of logs stored for one month) # create new (empty) log f iles after rotat ing old onescreate (create a new file) # uncomment this if you want your log f iles compressed # compress (whether to use compression) # RPM packages drop
the date as the suffix for the log file, such as "secure-20130605". In this case, the log file name does not overlap, so there is no need to rename the log files, just save the specified number of logs, delete the extra log files. If the "Dateext" parameter is not in the configuration file, then the log file needs to be renamed. When the first log rotation is made, the current "secure" log is automatically renamed secure.1, and then create a new secure log, which is used to save the new log. Wh
The general default installation directory for PHP is:
/usr/local/php/
We use PHP-FPM to reload the configuration file (such as php.ini):
/USR/LOCAL/PHP/SBIN/PHP-FPM Reload
Note:/USR/LOCAL/PHP/SBIN/PHP-FPM also has other parameters, including: Start|stop|quit|restart|reload|logrotate.
Using PHP-FPM to control the fastcgi process of php-cgi
/USR/LOCAL/PHP/SBIN/PHP-FPM {start|stop|quit|restart|reload|logrotate
enumerate (du) "/" Directory depth is a folder (--max-depth=1) of the size of the folder and in a way that people can read (-h) that is m,g,kb what the }Can see the home folder is the largest, but this file folder in the 2nd step of the time already know that is not with the MySQL files on the same diskNext is the/USR folder and the/var folder5. Resolving capacity issues for/USR foldersStill viewing the/usr folder using the du commandfound that the original/usr/local/nginx/logs folder in t
separate settings; If the source is installed, you need to configure rotation)vi/etc/logrotate.conf/usr/local/apache/logs/access_log {
daily
create
rotate
}iv. logrotate Commandlogrotate [Options] Profile Name option: If this command does not have an option, the log rotation is followed by the criteria in the configuration file-V: Displays the log rotation process. With the-v option, the rotation of the log is displayed
. In this regard, Lastcomm is more secure than SA. If the system is compromised, do not trust the information recorded in Lastlog, Utmp, WTM, but do not ignore it, as the information may have been modified. It is also possible that someone has replaced the WHO procedure to deceive the people. In general, process accounting can work effectively after certain suspicious activities have been identified. Use Lastcomm to isolate user activity or execute commands at specific times.
3, the use of Logro
command. In this regard, Lastcomm is more secure than SA. If the system is compromised, do not trust the information recorded in Lastlog, Utmp, WTM, but do not ignore it, as the information may have been modified. It is also possible that someone has replaced the WHO procedure to deceive the people. In general, process accounting can work effectively after certain suspicious activities have been identified. Use Lastcomm to isolate user activity or execute commands at specific times.
3, the us
individual services. ii.. login File Management CentOS provides rsyslog.service this service to unify the management of login files Oh!also, the issue of log log too large can be With logrotate (login file rotation) This thing to automate the processing of login file capacity and update problems Oh! The so-called logrotate basically is to change the old login file name, and then create an empty login file
Tags: config--How to root Prevent tool information targe. NetLinux syslog, System log, logs, system, network, kernel, service, etc.[Email protected] ~]# cat/var/log/messagesImagine that if all the operating contents of the system are recorded in the file, it will cause the file to be too large and how to avoid it.[[emailprotected] ~]# du-sh! $du-sh/var/log/messages228k/var/log/messages# found the log is not large [[emailprotected] ~] # ls/var/log/messages*/var/log/messages/var/log/messages-20180
integrated into the main branch of PHP. Compared with Spawn-FCGI, PHP-FPM has better control over CPU and memory, and the former is easy to crash and must be monitored with crontab, while PHP-FPM has no such troubles.
PHP5.3.3 has already integrated php-fpm and is no longer a third-party package. PHP-FPM provides a better way of PHP process management, can effectively control the memory and process, can smoothly load PHP configuration, than spawn-fcgi has more, so PHP officially included. You c
(the default UDP port is 514, and the default tcp port is 146 ).
To avoid excessive logs, configure log rotation (man logrotate to view detailed help information)
Vi/etc/logrotate. conf
Add the following content
# System-specific logs may be also be configured here.
/Var/log/router. log (
Rotate 2
}
/Var/log/S8016.log {
Weekly // weekly round robin
Rotate 4 // round robin 4 times
}
Configure cr
following method:
1). Back up the "ggserr.log" file using the following command: cp -p ggserr.log ggserr.log.bkup 2). Truncate the file using the following command: cat /dev/null > ggserr.log
Note:In windows, you need to use a unix simulator (such as cygwin) to complete the preceding operations.
If ggserr. log is very large, and the previous step may take a long time. During this time, note that this time refers to the time difference b
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.