Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

/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:
    166
    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,470
    Likes Received:
    21
    Trophy Points:
    463
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    166
    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,470
    Likes Received:
    21
    Trophy Points:
    463
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice