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 and Disk View are different

Discussion in 'General Discussion' started by adapter, Nov 24, 2006.

  1. adapter

    adapter Well-Known Member
    PartnerNOC

    Joined:
    Sep 17, 2003
    Messages:
    391
    Likes Received:
    0
    Trophy Points:
    16
    Hi all,

    i have a quota problem with the domains on my servers, the bloack size of my hd is 4kb but apps with small files like Joomla take more of the normal space and the Cpanel Disk usage report a different value from Cpanel Disk Viewer i have try to check it also from ssh and this is what i get

    root@ares [/home/user/www/images/stories/food]# du -h

    52K .


    root@ares [/home/user/www/images/stories/food]# du -bh
    21K .


    root@ares [/home/user/www/images/stories/food]# ls -la
    total 60
    drwxr-xr-x 2 user 4096 Nov 24 18:58 ./
    drwxr-xr-x 4 user 4096 Nov 24 18:59 ../
    -rw-r--r-- 1 user 7216 Nov 24 18:58 bread.jpg
    -rw-r--r-- 1 user3581 Nov 24 18:58 bun.jpg
    -rw-r--r-- 1 user 2641 Nov 24 18:58 coffee.jpg
    -rw-r--r-- 1 user 47 Nov 24 18:58 index.html
    -rw-r--r-- 1 user 3855 Nov 24 18:58 milk.jpg

    why there is so difference btw du -h and du-bh? which command is used from Cpanel to read disk space usage?

    thanks
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    du -b won't necessarily give you the amount of quota space used on disk, you'll only get that using du on its own which is what I'd guess cPanel uses, but you'd have to ask them that since it's closed source. They may not use du and simply get the size using a directory trawl of all the files and adding up their stat() size.
     
  3. adapter

    adapter Well-Known Member
    PartnerNOC

    Joined:
    Sep 17, 2003
    Messages:
    391
    Likes Received:
    0
    Trophy Points:
    16
    ok but i am the only one with this size difference? Joomla take 9mb on my pc and 20 on my server!!
     
  4. Mr_Stepfire

    Mr_Stepfire Active Member

    Joined:
    Dec 20, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    The Netherlands
    nope same problem here
     
  5. grzeg

    grzeg Member

    Joined:
    Jul 8, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    I know it's been a while, but now I've got the same problem.
    Is there anything I can do? How am I suppose to explain to my customer why there is such a big difference in disk usage?

    First server ( FC3 - ~750 accounts ):
    #du -sh mydir/
    30M mydir/

    Second server ( Centos 4.4 - new machine - 0 accounts ):
    #du -sh mydir/
    14M mydir/

    What do you suggest? OS upgrading(I'd prefer not)?
    Best regards
     
    #5 grzeg, May 20, 2007
    Last edited: May 20, 2007
  6. xMoDx

    xMoDx Member

    Joined:
    Feb 18, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    what i want to display like...

    #du -sh /home/

    14m site1
    1m site2
    3m site3
    15m site4


    is that posible?? and how??


    - thanks in advance
     
Loading...

Share This Page