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.

Addon Bandwidth

Discussion in 'General Discussion' started by abcc, Jan 26, 2006.

  1. abcc

    abcc Member

    Joined:
    Sep 27, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    I know there are some functions for basic account maintenance (suspend etc), however, how can I add additional bandwidth to an account? Is there any specific file, or database used for logging bandwidth in CPanel?

    Regards,

    Andy
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Account settings are stored in /var/cpanel/users/

    There's a value in each account's file called BWLIMIT which determines, in bytes, the bandwidth limit. Modifying this would probably do the trick, and could be done in PHP through the remote access functionality.
     
  3. abcc

    abcc Member

    Joined:
    Sep 27, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Hi webignition,

    Cheers for that!

    Ok, next part - how can I add data to the POP3 / SMTP / HTTP etc fields for the actual usage statistics?

    Regards,

    Andy
     
  4. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    I'm not sure what you mean by that - could you clarify?
     
  5. abcc

    abcc Member

    Joined:
    Sep 27, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Ok, CPanel (somewhere) parsed logs detailing the amount of e-mail (POP3, SMTP, IMAP), web traffic (HTTP) which is used for bandwidth graphing etc.

    What I'd like to do is find a way to add additional bandwidth logging data to the POP3, SMTP, IMAP 'counters' to be included in the next update to the bandwidth graphing. The information is coming from three seperate (custom) services running on seperate servers.
    As the services are custom, I can modify how the data is passed to CPanel.

    So ... any ideas?
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    On the latest versions of cPanel, bandwidth collection is handled by /usr/local/cpanel/bin/cpbandwd

    However, I'm not aware of any way to add your own bandwidth measurements to the stats tool that's collates that data.
     
  7. abcc

    abcc Member

    Joined:
    Sep 27, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Hi Chirpy,

    Just had a look at the file (appears to be in perl) - thanks for the pointer.
    It appears to write out a series of intermediate files, however, can't see where it stores the data 'for the long run'.

    However, I have found a number of data files at /var/cpanel/bandwidth, which is in text format. Appears to break each protocol down per day, per site. Will have to experiment with adding to these values and see if they are processed into the logs.

    Regards,

    Andy
     
  8. IPSecureNetwork

    IPSecureNetwork Well-Known Member

    Joined:
    May 28, 2005
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    graphs statics

    cpanel use rrdtool to creat the bandwhit charts... just use the rrdtool or modificate the instance in the database to add or remove o create e new chart whit this utilitie.

    Good luck!
     
Loading...

Share This Page