logrotateããã¾ããããªãï¼
æ°ãããµã¼ãã¼ãç´å ¥ãã¦ä¸é±éãçµéãæ¨æ¥ã®æ¥ææ¥ã®æ·±å¤CPUã®ã¢ã©ã¼ããä¸ãã£ãã¨ç³åãããããã調ã¹ã¦ã¿ããã§ãããã©ãã«ãåå ãåãããªãããããªæ/var/log/messagesã«ãããªã¨ã©ã¼ãã»ã»ã»
Feb 9 04:02:12 hogehoge logrotate: ALERT exited abnormally with [1]
Feb 10 04:02:09 hogehoge logrotate: ALERT exited abnormally with [1]
Feb 11 04:02:10 hogehoge logrotate: ALERT exited abnormally with [1]
Feb 12 04:02:10 hogehoge logrotate: ALERT exited abnormally with [1]
ãããï¼ï¼ã¨æã£ã¦ãã°ã確èªãã¦ã¿ãã¨ããã¼ãã¼ã·ã§ã³ãæ£å¸¸ã«è¡ããã¦ããªãï¼ï¼
ããã¦ã¦ãã°ã®ãã¼ãã¼ã·ã§ã³ãæ£å¸¸ã«è¡ããã¦ãããããã§ãã¯ãã¾ãã
# /usr/sbin/logrotate -vd /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file acpid
reading config info for /var/log/acpid
reading config file cups
reading config info for /var/log/cups/*_log
reading config file httpd
reading config info for /var/log/httpd/*log /var/log/httpd/hogehoge/*log
reading config file httpd.default
error: httpd.default:1 duplicate log entry for /var/log/httpd/access_log
ï¼ã³ãã³ãã¯-vdã§è©³ç´°ãåºå+ãããã°ã¢ã¼ãã§è¡¨ç¤ºã«ãªãã¾ã
ãã£ã±ãã¨ã©ã¼ãåºã¦ãã¾ãããã¡ããã¨äºåã«ç¢ºèªãã¦ãããªãã¨ã ãã§ããã»ã»ã»
åå ãããããã¨èª¿ã¹ã¦ã¿ã¾ãããä»åãã°ããã¼ãã¼ã·ã§ã³ããã«ããã£ã¦httpdã®ãã°ãã¼ãã¼ã·ã§ã³(/etc/logrotate.d/httpd)ãå¤æ´ãããã§ãããã®ã¨ãã«ããã©ã«ããã¡ã¤ã«ãhttpd.defaultã§ä¿åãã¦åããã£ã¬ã¯ããªã«ç½®ãã¦ããããã§ããã©ããããããåå ã®æ§åã
ãã¡ã¤ã«ã.httpd.defautã«ãã¦é ããã¡ã¤ã«ã«ãã¦ã¿ããã§ããçµæã¯å¤ãããããããã«å¥ã®ãã£ã¬ã¯ããªã«ç§»ãã¦ã¿ãã¨ããããããæ£å¸¸ã«åä½ããããã§ãã
# mv httpd.default ../
# /usr/sbin/logrotate -vd /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file acpid
reading config info for /var/log/acpid
reading config file cups
ï¼ï¼ï¼ï¼ï¼é·ãã®ã§å²æï¼ï¼ï¼ï¼ï¼
ã¡ããã¨åä½ç¢ºèªãè¡ã£ã¦ããåºãªãã¨å±éºã§ããï¼