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 can we make domlogs count for quotas?

Discussion in 'General Discussion' started by eurorocco, Apr 27, 2005.

  1. eurorocco

    eurorocco Well-Known Member

    Joined:
    Jun 23, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Hi!

    I wonder if there is a way to make Cpanel take the files in /usr/local/apache/domlogs into account when calculating site quotas.

    See, we have a bunch of high-traffic sites that have domlogs that are several times what their home directory weighs. The domlogs there grow really fast when the customer has heavy-duty pop3, ftp or http traffic.

    Achieving this could help us get even with very high-traffic sites that keep overloading our servers or bringing them down; sites that deserve a semi-dedicated or dedicated server.

    We could sell them plans with bigger storage capacity instead of giving them the domlogs storage for free.

    We submitted a feature request to the Cpanel bugzilla, but who knows.

    Is there a way to do it now?

    Thanks for your help!

    ER
     
  2. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    Turn off keeping the log files after each stats run, and have the client configure the option within their cPanel to save the logs when the stats run. This way the log files are stored in the users dir and count towards quota.
     
  3. eurorocco

    eurorocco Well-Known Member

    Joined:
    Jun 23, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Thanks, but then...

    Haze,

    Thanks for your participation, but then, the solution that you spell out seems to leave those logs at the mercy of that user. The customer can delete the logs that way. First thing they say is "I don't need the logs", delete them, when they are substantial.

    The idea would be to change ownership of those files to the site admin, so they count towards quota, but then apache resets ownerships every time it restarts.

    I am thinking of a script to charge for those logs every day changing ownership of the logs to the site, and then placing a link owned by root in the /home/site/logs folder , so that they do not delete the log.

    Believe me, those pesky heavy sites make me a fireman everyday until I figure a fair way to charge customers a fee proportional to their total site storage usage.

    I do not really want to begin selling "Heavy Duty" service plans, which are hard to explain, hard to understand and hard to justify. I really want to sell service plans by the megabyte of storage, and charge for whatever storage the site commands.

    Thanks for the help!

    ER
     
  4. eurorocco

    eurorocco Well-Known Member

    Joined:
    Jun 23, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Closest workaround I got...

    Assume site is x.com and admin is x, and that the site has subdomain a.x.com.

    chown x:x /usr/local/apache/domlogs/x.com
    chown x:x /usr/local/apache/domlogs/a.x.com
    chown x:x /usr/local/apache/domlogs/x-smtp
    chown x:x /usr/local/apache/domlogs/x-popbytes_log.offset
    chown x:x /usr/local/apache/domlogs/x-smtpbytes_log.offset

    Then maybe making a link in /home/x/logs/ so the user can detect that they do consume storage too.

    This is what I know now, but I would appreciate a Chirpy opinion. :)

    Thanks!

    ER
     
Loading...

Share This Page