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.

Disk Usage

Discussion in 'cPanel Developers' started by gdawkins, Apr 10, 2011.

  1. gdawkins

    gdawkins Registered

    Joined:
    Apr 8, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Okay, I'm running tests using the cpanel php class with the statsbar module on a few accounts with the same shared host. On 2 accounts the Disk Space usage displays fine, on the third it displays as 0 MB. Why would that be and what am I able to do (being on a shared hosting environment and without ssh access) to fix this?

    I searched these forums for answers first but didn't see threads geared toward shared hosting accounts having this problem and figured it would be quicker to just ask.

    Thanks.
     
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    What output do you see? What is the quota allocated to the account?
     
  3. gdawkins

    gdawkins Registered

    Joined:
    Apr 8, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hey Matt,

    Thanks for replying. Here's the standard code:

    PHP:
    $args = array('display' => 'addondomains|parkeddomains|diskusage|emailaccounts|sqldatabases|emailforwarders|ftpaccounts|subdomains');

    $stat $xmlapi->api2_query($account['username'], "StatsBar""stat"$args);

    echo 
    $stat->data[2]->item ": " $stat->data[2]->count " " $stat->data[2]->units " of " $stat->data[2]->max "\n\n";
    And the web output:

    HTML:
    Disk Space Usage: 0 MB of unlimited MB
    Kind of has me puzzled. I don't have ssh but my server does support system() and exec() if you need me to run any commands to help troubleshoot.

    Thanks again for the assistance!
     
  4. gdawkins

    gdawkins Registered

    Joined:
    Apr 8, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I might add that the Disk Space Usage icon in cpanel is working correctly and shows around a gig of diskspace. Is it possible that the host has blocked displaying this information on accounts using too many files or more than a certain amount of diskspace? :confused:
     
  5. morissette

    morissette Well-Known Member

    Joined:
    May 24, 2009
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Austin, TX
    cPanel Access Level:
    Root Administrator
    Ever figure this out?
     
  6. gdawkins

    gdawkins Registered

    Joined:
    Apr 8, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Okay, testing the same cpanel disk space api on another server and it's confusing me as well.

    Script Output: 6407.19 MB
    Stats column in cpanel: 6407.19 / 20480 MB
    Diskspace Quota output inside cpanel: Refer to picture attached. disk_quota.png
     
  7. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    That's weird, 6.4 or 6.2 GB used, but the mail directory has > 10 GB in it? Are all the files/directories owned by user:user (likely to be the case unless there's been some eclectic customizations taking place)? Might be worth having one of our techs take a look at since there's certainly some inconsistency here just within the UI. I understand that the data is cached, but it seems unusual for so much data to be generated between times when the data is cached. I don't recall the exact interval at which the data is cached, but I suspect it's not longer than once per 24 hours.
     
  8. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Just got asked this question by a user...
    The disk space usage on their cPanel page shows 2.7GB used and the disk space usage icon, shows 1.6GB used.
    (off by 1.1GB). The 2.7GB is correct, in my WHM it shows that much used... So why is the disk space usage icon off by that much???
     
  9. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    For anyone else who needs to know this. We're running cxs, and there were quite a few core dump files moved to the quarantine directory... They added up to the additional disk space.

    However, the disk space usage program should be reporting the same quota used as the cPanel home page.
     
Loading...

Share This Page