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.

Possible to get a domain's total disk usage with a script?

Discussion in 'General Discussion' started by electric, Apr 11, 2007.

  1. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    Hello,

    Is it possible to get the total disk space and bandwidth usage for any given domain name or cpanel account username?

    Any examples on how to do this?

    Thanks.
     
  2. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    lol. I posted this into the "Backend/Scripts" forum for a reason. ;)

    Is it possible to get disk space / bw usage stats with a script?
     
  3. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Logon to WHM, click on List Accounts, will give you the space for each account.
    Click on "show bandwidth usage", and you get the bandwidth :)
     
  4. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
  5. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    This might be usefull:

    Code:
    more /home/{reseller username}/tmp/cpbandwidth/domain.com-bytes_log
    
    
     
  6. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    1) How does cpanel get the disk and bw usage when displaying the quota to the user when they login to their cpanel? Is this done dynamically, or is it pulling from a file somewhere?

    2) How does WHM get the disk and bw usage when listing stats for a reseller under the "Reseller Center-->Show Reseller Stats" area?

    Surely there must be a file somewhere with all this information.

    Anyone?
     
Loading...

Share This Page