1

Topic: Dashboard: Domain usage bar has the wrong amount of space used

==== Required information ====
- iRedMail version: v1.8.2 (MySQL) PRO
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Linux/BSD distribution name and version: CENT OS6
- Related log if you're reporting an issue:
====

My Dash board while looking at domains shows the wrong amount of space used by that domain.

Its off by large amount  it should be 395G but it shows 226G , also can we get this number in human readable format?

The allocated is 9TB and the limit is set at 500G, I did once set the limit to 9T to stop it from showing over 100% erroneously.

How is this corrected?

2

Re: Dashboard: Domain usage bar has the wrong amount of space used

Could you please help capture a screenshot to help me understand this issue? Also, show me the quota setting in domain profile page please.

3 (edited by jpforte 2014-08-29 04:21:36)

Re: Dashboard: Domain usage bar has the wrong amount of space used

Zhang,

Hope this works for you

https://www.dropbox.com/s/064om71fpeurc … 4.png?dl=0

Mailstorage root is /home

Here is the df -vh

[root@ces-mail log]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       40G  6.7G   31G  18% /
tmpfs           935M     0  935M   0% /dev/shm
/dev/xvdc1      493G  411G   57G  88% /home

4

Re: Dashboard: Domain usage bar has the wrong amount of space used

Could you please replace function 'filesizeformat()' in file libs/iredutils.py by below one, then restart Apache service and try again?
Let me know if it doesn't work for you. And it would be better if you can allow me to login to your server to debug this issue.

def filesizeformat(value, baseMB=False):
    """Convert file size to a human-readable format, e.g. 13 KB, 20 MB, 1 GB."""
    try:
        bytes = float(value)
    except:
        return 0

    if baseMB is True:
        bytes = bytes * 1024 * 1024

    base = 1024

    if bytes == 0:
        return '0'

    ret = '0'
    if bytes < base:
        ret = '%d Bytes' % (bytes)
    elif bytes < base * base:
        ret = '%d KB' % (bytes / base)
    elif bytes < base * base * base:
        ret = '%d MB' % (bytes / (base * base))
    elif bytes < base * base * base * base:
        ret = '%.2f GB' % (bytes / (base * base * base))
    else:
        ret = '%.3f TB' % (bytes / (base * base * base * base))

    return ret

5 (edited by jpforte 2014-09-03 00:05:46)

Re: Dashboard: Domain usage bar has the wrong amount of space used

Zhang, I tried this and the number is prettier but still wrong


plus I will send you credentials via email from me, james