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.

How to set quota on /tmp/eaccelerator

Discussion in 'General Discussion' started by steveluscher, Jun 3, 2009.

  1. steveluscher

    steveluscher Member

    Joined:
    Feb 11, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Eaccelerator keeps filling up my /tmp partition, which wrecks havoc on the rest of my server.

    Is there a way to either:

    • configure eaccelerator to limit the amount of disk space it uses
    • configure a disk quota for the directory /tmp/eaccelerator that deletes old files after the quota has been reached

    Cheers,
    Steven…
     
  2. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    You may have tmpwatch on your system. The cron for that is run daily:

    vi /etc/cron.daily/tmpwatch

    In there, you can set the max amount of hours for keeping an old file. Lowering this, will clear out all your old cache files.

    Another way, is to run a command like below in the tmp folder:

    find eaccelerator -mtime +30 -exec rm {} \;

    It will clear out any eacceletator files older than 30 days. Use that command carefully though! :)
     
    #2 ChrisRHS, Jun 3, 2009
    Last edited: Jun 3, 2009
  3. steveluscher

    steveluscher Member

    Joined:
    Feb 11, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Chris.

    I know about tmpwatch, but it doesn't solve the problem. I want the system to delete files once the directory reaches a certain size, not once the files inside it reach a certain age.
     
  4. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    Then write yourself a script and run it hourly from cron.

    #!shell
    #
    check disk usage of directory
    if (usage > a number)
    delete files
    fi
     
  5. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    Or do what I do, make /tmp bigger.
     
  6. steveluscher

    steveluscher Member

    Joined:
    Feb 11, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Hi everyone,

    I get that there are a million ways to crack this nut, and that shell scripts + cron can get 'er done, but I have to believe that, like cPanel sets per-user-directory quotas, there should be a way to set a bonafide quota on /tmp/eaccelerator.

    Does anyone know how to use the quota approach to solve the problem of /tmp/eaccelerator filling up the /tmp directory?
     
Loading...

Share This Page