logrotate

Alibabacloud.com offers a wide variety of articles about logrotate, easily find your logrotate information here online.

Use shell to write information to syslog log files

Use shellSYslog log file write information ApplicationProgramUse S The log file (in the/var/log directory) That yslog sends messages to the Linux system ). S Ysklogd provides two System Tools : One is System Log Record , The other is kernel information capture. Most programs usually use the C language or S Yslog application or library to send S Yslog message. 1. the logger command is a shell command (interface ). You can use the syslog System Log Module to directly write a line

Compile and install nginx in Ubuntu server 9.04

check the differences between the two methods, we found that nginx_0.6.35-0ubuntu1_i386.deb files mainly have the following file copy process sudo dpkg-l nginx /. /usr/sbin/nginx/usr/share/doc/nginx/changelog.gz /usr/share/doc/nginx/readme/usr/share/doc/nginx/Copyright/usr/share/doc/nginx/news.debian.gz/usr/share/doc/nginx/changelog.debian.gz /usr/share/man/usr/share/m An/Man1/usr/share/man/Man1/nginx.1.gz/etc/nginx/sites-available/default/etc/ nginx/sites-enabled/etc/nginx/CONF. d/etc/nginx/fa

Use rsyslog in Linux to deploy the log server & amp; record history and send it to the rsyslog server, linuxrsyslog

Deploy the log server with rsyslog in Linux record history and send it to rsyslog server, linuxrsyslog1. syslog service Introduction Rsyslog is a multi-thread enhanced version of syslogd. Rsyslog is responsible for writing logs, logrotate is responsible for backing up and deleting old logs, and updating log filesLogger command To write custom information to the local log system, use the: logger command. Logger is a shell command interface that can be

Add User operation logs to CentOS

1. Put the following content to the end of/etc/profile (some systems such as CentOS 5.5 may need to end with/etc/bashrc) HISTFILESIZE = 2000 HISTSIZE = 2000 exportHISTTIMEFORMAT = "% Y % m % d-% H % M % S:" exportPROMPT_COMMAND = '{command = $(history1 | {readx y; echo $ y ;}| cut-d ":"-f2-); logger-p local1.notice-t bash "$ command (user = $ USER, ppid = $ PPID, from = $ SSH_CLIENT, pwd = $ PWD) ";} 'readonlyprompt _ COMMAND Note: readonly PROMPT_COMMAND prevents malicious normal users from c

Built-in audit tracking tool in Linux: last Command

-358.23.2 Mon Dec 2 18:56 – 19:20 (00:23)runlevel (to lvl 0) 2.6.32-358.23.2 Mon Dec 2 18:56 – 18:56 (00:00)leni tty1 Mon Dec 2 18:42 – down (00:00) You can see that there are two running levels. The entry for running level to lvl 3 means that the system runs in the full Console mode, not in X window or GUI. At the same time, when the system is shut down, it is actually switched to the running level 0, which is why the last to lvl 0 is displayed. View logon failures The last command records S

Rpm for linux package management

and generated for a file: rpm-qf/path/to/somefile 6 to query uninstalled packages: rpm [option]/path/to/pkg_file. Available combinations include-qpi,-qpl,-qpc, and-qpd. [Root @ localhost Packages] # rpm-q samba # query whether samba has installed samba-3.6.9-164.el6.x86_64 [root @ localhost Packages] # rpm-qa # query all installed package pulseaudio-module-gconf-0.9.21-14.el6_3.x86_64db4-devel-4.7.25-18.el6_4.x86_64libxklavier-4.0-9.el6.x86_64... [root @ localhost Packages] # rpm-qa | grep 'mys

Linux Log File System details

/maillog: the log information generated by the mail system /Var/log/secure: user login information log 2. Logs need to be rolled: After a period of time, rename the message as message1. and create a new message to store logs. Logrotate: Use this command to slice log files /Etc/cron. daily/logrotate Configuration File:/etc/syslog. conf The configuration file is defined in the format of facility. priority act

Log Management in linux

Command to view information of all logged-on usersLastlogThe accton command is used to monitor commands that have been used during user logon, but is only monitored when enabled. UsageStep 1: Enable user behavior monitoring in accton/vat/account/pacctStep 2: lastcomm -- user root check the commands used by the root userStep 3: Disable the monitoring service.5: actively add logsYou can use the logger command to manually add logs to a log file. Script maintenance can be used to mark logs.Log mana

What are CGI, FastCGI, PHP-CGI, PHP-FPM, and Spawn-FCGI ?, Fastcgiphp-cgi

version will be 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

Php-CGI Configuration

patch it to your PHP source code before using it after compiling and installing PHP. Now we can download the source code tree in the latest PHP 5.3.2 to directly integrate the branch of the PHP-FPM, it is said that the next version will be 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 a

Use AWStats to analyze some nginx log records

static files. BecauseLogrotate compresses old logs. Therefore, you need to modify the logrotate setting so that logs are not compressed.Modify VI/etc/logrotate. d/nginx /Var/log/nginx/* log {daily rotate 10 # retain the 10-day log missingok logs empty nocompress # Here the default value is compress compressed log sharedscripts postrotate [! -F/var/run/nginx. pid] | kill-usr1 'cat/var/run/nginx. PID 'endsc

The squid log file is too large. How can this problem be solved?

Squid is compressed once every 5 days by default. It is set in/etc/logrotate. d/squid. If you modify the log location, Modify/etc/logrotate. d/squid /Home/log/squid/access. Log {WeeklyRotate 5CopytruncateCompressNotifemptyMissingok}/Home/log/squid/cache. Log {WeeklyRotate 5CopytruncateCompressNotifemptyMissingok} /Home/log/squid/store. Log {WeeklyRotate 5CopytruncateCompressNotifemptyMissingok# This script

File wildcards, file creation, copying, and other operations in linux

tfile-2016-08-25-08-14-368: copy the files starting with "p" in the/etc directory and ending with non-numbers to the/tmp/mytest1 directory.[Root @ localhost ~] # Mkdir/tmp/mytest1[Root @ localhost ~] # Cp-r/etc/p * [^ [: digit:]/tmp/mytest1/[Root @ localhost ~] # Ls/tmp/mytest1/Pam. d passwd-pki plymouth Uth pm popt. d postfix ppp prelink. conf. d printcap profile. d protocols9: Copy all directories and files ending with. d in the/etc directory to the/tmp/mytest2 directory.[Root @ loc

PHP-FPM (PHP-FPM is a phpfastcgi manager)

-cgi/usr/local/php/sbin/php-fpm{start|stop|quit|restart|reload|logrotate}--start Start PHP fastcgi process--stop Force terminate PHP fastcgi process--quit smooth termination of PHP fastcgi process--restart Restart PHP fastcgi process--reload Re-smooth loading PHP php.ini--logrotate re-enable log fileFeatured FeaturesAll of these features are implemented in a "no-break" manner. That is, if you do not use the

Logging capabilities in Linux

Configuration file/etc/logrotate.confDailyThe rotation cycle of the log is dailyWeeklyThe rotation cycle of the journal is weeklyMonthlyThe rotation cycle of the log is monthlyRotate DigitalThe number of log files keptCompressLog rotation when old logs are compressedCreate Mode owner GroupCreate a new log, specifying the permissions of the new log with the owner and the owning groupMail addressThe output is sent by mail to the specified email address when the log rotation isMissingokIf the log d

Linux Log Analysis

startlogrotate. logrotate program daily by Cron Starts at the specified time (/etc/crontab). Reference diagram4.1. Logrotate configuration file#cat/etc/logroate.confWeekly # clean up log files once a week Rotate 4 # save four rotation logs Create # Create a new empty log file while clearing the old log Dateext # rollback file with a suffix of date # can go to/var/log look under th

MongoDB System Log Start cutting implementation method

When making a MongoDB shard, when the MONGOs routing service is enabled, we specify a location for the log to be stored:MONGOs--configdb 127.0.0.1:27019--logpath/var/log/mongodb/mongos.log--pidfilepath/var/run/mongodb/mongos.pid-- Logappend--logrotate Reopen--forkAbove we specify the location of the log in the/var/log/mongodb/mongos.log file, when the system data volume is large, after a long run time, the Mongos.log file will become a few g size, whi

nginx+php (FastCGI) +mysql installation configuration and optimization on small memory VPS (T1.MICRO)

Logrotate to cut logs and so on;After some toss, after filling a lot of pits, finally successfully completed the deployment of a new environment, feeling very good. Below, this is the entire installation configuration process:1. Install Common toolsYum install-y vim wget unzip screen tree mlocate 2. Install the Compilation toolYum install-y gcc gcc-c++ autoconf patch CMake Automake 3. Install Epel WarehouseYum Install-y http://dl.fedoraproject.org

CentOS 7 installs Gitlab 8-6 Chinese Edition tutorial

~]# rpm--import Http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias[Root@ds-vm-node83 ~]# 6. Detect key and update source cache [root@ds-vm-node83 ~]# Rpm-qa gpg*|grep 352c64e5gpg-pubkey-352c64e5-52ae6884[root@ds-vm-node83 ~]# Rpm-qa gpg*|grep 41a40948gpg-pubkey-41a40948-4ce19266[Root@ds-vm-node83 ~]# yum clean all yum Makecache 7, Installation Development tools development package and the necessary package files [root@ds-vm-node83 ~]# yum-y groupinstall ' Development T

Nginx optimized PHP-FPM optimized pressure test up to 1.5 million visits per minute Webbench site pressure

monitored with crontab, and PHP-FPM does not have this annoyance.PHP5.3.3 has integrated php-fpm, no longer a third-party package. PHP-FPM provides a better way to manage the PHP process, can effectively control memory and process, can be smooth overloaded PHP configuration, more than spawn-fcgi has more advantages, so by the official PHP included. The PHP-FPM can be turned on with the –ENABLE-FPM parameter when the./configure.Using PHP-FPM to control the fastcgi process of php-cgi/usr/local

Total Pages: 15 1 .... 11 12 13 14 15 Go to: Go

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.