The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

suxec_log problem

Discussion in 'General Discussion' started by Radio_Head, Sep 28, 2004.

  1. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    Hello

    I noticed that suexec_log is becoming big and hard disk write on it very often !.
    To reduce iowait (hard disk work) is it not better to eliminate suexec logs when
    uid and gid are the same ?

    for example I have millions of lines like it

    [2004-09-28 02:12:28]: info: (target/actual) uid: (contusal/contusal) gid: (contusal/contusal) cmd: ad.pl

    Is it important to log it when uid and gid are the same (OK) ?
    I think no , so there is a way to change the way suexec store his logs ?
    In this way hd will work less and suexec log will be processed faster .

    Could it not be better if suxec stores only the errors ? I think
    the errors are only 5% !.



    Thank you
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Clearing down the logs in /etc/httpd/logs/ is a good idea. This is easiest done with logrotate and you can do it by changing the contents of /etc/logrotate.d/httpd to:
    Code:
    /etc/httpd/logs/*log {
        missingok
        notifempty
        sharedscripts
        compress
        postrotate
            /bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
        endscript
    }
    
    You can the force a logrotate run if you wish using:

    /usr/sbin/logrotate -vf /etc/logrotate.conf
     
  3. Vatoloco

    Vatoloco Well-Known Member

    Joined:
    Jun 21, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Code:
    -rw-r--r--    1 root     nobody   79434598 Jan 28 06:08 suexec_log
    -rw-r--r--    1 root     nobody   173523383 Jan 23 04:02 suexec_log.1
    -rw-r--r--    1 root     nobody   152644045 Jan 16 04:02 suexec_log.2
    -rw-r--r--    1 root     nobody   144830761 Jan  9 04:02 suexec_log.3
    -rw-r--r--    1 root     nobody   125997969 Jan  2 04:02 suexec_log.4
    :)

    My suexec_log is huge also so I searched on here and found this topic. Great forum!

    I have a question about my /etc/logrotate.d/httpd file though. The first line in mine has /usr/local/apache/logs/*log instead of /etc/httpd/logs/*log like in chirpy's example. I looked in both those directories and it looks like they both have exact duplicates of each other. Is that normal and should I change the first line in my /etc/logrotate.d/httpd?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    No need to change. /etc/httpd is symlinked to /usr/local/apache so they are exactly the same files ;)
     
Loading...

Share This Page