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.

/var/log/messages is taking up 2 GBs!!!

Discussion in 'General Discussion' started by Jeff75, Nov 28, 2004.

  1. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    My /var/log/messages file is taking up a lot of space on my server and I really need to free up some space. Can someone tell me what this file is and if it's OK to delete it?
     
  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
    No, it's not OK to simply delete it. You need to rotate it using logrotate.d and find out why it's not been rotated if not. You can force a log file rotation with:

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

    Check the output for errors.

    To rotate it manually:

    cd /var/log
    mv messages messages.old
    /etc/init.d/syslog restart
    gzip messages.old
     
  3. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    I'm not sure what was going on but within a few minutes this file went from 2 GBs to 2.5 GBs and the disk space usage on my server was at 95% (up from 90%) so I had to delete it. I ended up creating a new file for it and everything appears to be working correctly. Do you have any idea why it got to be so big (especially within a few minutes)?
     
  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
    You'd have to look through that file to find out. If you've deleted it, then you're going to be none the wiser.
     
Loading...

Share This Page