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.

Can you safely purge old stats out of /tmp in Cpanel ?

Discussion in 'General Discussion' started by DR4296, Nov 2, 2013.

  1. DR4296

    DR4296 Member

    Joined:
    Jul 17, 2002
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    So, I'm trying to conserve disk space on a particular account.

    And there's 90 Megs of stats in /tmp, between folders for analog, awstats, and webalizer.
    There are file dates in there from as far back as 2004. I thought maybe I'd only keep the last three years' worth of files, but I wasn't sure if me just zapping those old files would possibly "break" those stats programs when I go to view their stats?

    My gut tells me I'm probably safe. But I Googled the topic, didn't find anything specifically about purging off old ones (found instead several threads on deleting EVERYTHING out of /tmp, which is not necessarily something I'd like to do), and thought I'd ask here.

    Thanks!

    -= Dave =-
     
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    cd to dir and use the find command to locate and delete files older than x days. Example:
    Code:
    find . * -type f -mtime +30 -exec rm {} \;
    will delete files older than 30 days.
     
  3. DR4296

    DR4296 Member

    Joined:
    Jul 17, 2002
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Well, I wasn't asking HOW to do it, I was asking if it would break anything.... other than the fact that when I'd use those stats utilities, I wouldn't be able to "see" that far back in time ??

    I mean, I don't want to delete older files from those stats programs and suddenly find that those programs stop working. My gut tells me I'll probably be okay, but I thought I'd take the time to check before pulling the trigger.

    -= Dave =-
     
  4. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    I believe it's ok to delete the files, but you could 1st move the files to another directory, and if all is well after that you can delete the files.
     
  5. DR4296

    DR4296 Member

    Joined:
    Jul 17, 2002
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Good point. Might as well.

    Thanks!
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Analog stats will be the one taking up most of the space, IMO. If you don't use it, disable it:
    WHM » Server Configuration » Statistics Software Configuration

    Some users might like to have Awstats going back to 2004 for statistical reasons of some sort. I'd start with analog first and see if thats enough free space for you to leave the rest.

    Suggestions of course. YMMV. :)
     
Loading...

Share This Page