-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quotas Bar Charts Incorrect #110
Comments
Thanks for reporting. Just do the following:
I need that content that will contain numbers about the charts. Please send it to me and I will provide fix as soon as possible. |
I'll try to do this tonight for you .. at college until 9PM :( On Tue, Feb 17, 2015 at 6:13 PM, Ilia Rostovtsev [email protected]
|
I see. Alright! |
You might need to install CPAN module |
So can you help me out? Quotas doesn't work on my system for some reasons.. If you don't want to install anything there is another way.. |
I'll be able to do this today on our teat server.
|
Test server that is :(
|
Any server where quotas are working. If you do it on different machine, please attach a screenshot again. It should only take few minutes really. |
Hi Here is the info... (the test server only has two sites so only two sets of $VAR1 = { 'chart' => [ '1073741824', 110587904, 10125312 ], $VAR1 = { 'chart' => [ '1073741824', 409600, 8192 ], [image: Inline image 1] I can create a webmin user account for you if you would like to take a look Craig On Thu, Feb 19, 2015 at 8:46 AM, Ilia Rostovtsev [email protected]
|
Thanks. Great. No need for test login. Could you please take a screenshot. What are the numbers on the right? |
There's a partial screen capture in my previous message. Are the numbers On Thu, Feb 19, 2015 at 4:52 PM, Ilia Rostovtsev [email protected]
|
Hi! I'm experiencing the same issue. Below is the requested information: $VAR1 = { 'value' => '612.75 MB of 5 GB', 'chart' => [ '5368709120', 642482176, 32768 ], 'desc' => 'tld_domain.dns' }; |
Alright, guys! Seems like I got it. Please test it. Replace |
So glad I could help! Thank you Mr. Rostovtsev! |
Could you please test it? It should display correct information now. Is it? |
Ohh, yeah!! :) Now let's see what @clawrie says! I think it should also work fine! Great, thank you guys! |
Hi Ilia That looks to have fixed the issue - thanks very much. Craig On Fri, Feb 20, 2015 at 5:16 AM, Ilia Rostovtsev [email protected]
|
Great! Thanks for reporting! |
to me is wrong yet... |
Print an array please. |
$VAR1 = { $VAR1 = { $VAR1 = { $VAR1 = { ..... |
Look:
It's totally wrong. Total value (the first one) is never right? I will report it to Webmin developers. |
I don't know... 137438953472 is the total value of what? are they bytes? |
Where do you see |
Virtualmin framed theme reports the same: 584 kB of 4 GB |
I would call it a bug. Will see what Jamie says. |
I will fix it very soon in version 10.0.0. |
Great. Looking forward to it. |
@7starsone I think the reason for the bandwidth problem is in Virtualmin 4.14. I tested it with Virtualmin pre-release 4.15 and all was fine. Let's please wait. I think it will fix the problem.. but I would like to see the screenshot for the bandwidth, as I never seen it on the System Information Page. |
How does it show in Virtualmin theme? I would guess the same? If so, please report it to Webmin thread right now. |
Ahh, OK. No. It's gonna be fixed in Virtualmin 4.15, I think it's out today. ;) |
I don't see bandwidth on 4.14 Virtualmin framed theme...
is it related? |
No worries. It will be fixed in Virtualmin 4.15. I will report a bug for you to Virtualmin. |
Restarted Webmin? ;) |
...and 170mb out of 2gb = ~8% - where is the problem here? |
yes and.. |
Yes, actually it is.. Hmm.. Ok, can you print the array again? That is wierd.. It's all correct on my server.. |
e.g.
|
that should be correct and i don't understand... i cleared cache and restarted webmin.. |
|
authentic-lib.cgi, line 340 replace with Does it work? |
Yes, it works ;-) |
Alright, please update to version 10.1.0. Does it fully fix your problem? |
Attached VAR output as requested (four quota entries in my list): $VAR1 = { $VAR1 = { $VAR1 = { $VAR1 = { |
From what I can see you have old buged type output. You ether didn't update Virtualmin or still have old, cache version of the lib files in memory... Try to double check please. When I get to PC I will post more things to check. If it persists will create a bug to Virtualmin team. |
I restarted webmin (service webmin restart) and rebooted the server but nothing changed. I am positive that I am running the latest version of Virtualmin (4.15gpl-2) |
What is the content of:
Besides, what is your version of Webmin? |
Contents of /usr/share/webmin/authentic-theme/sysinfo.cgi, line 40-50 : ''
) . '</h3>' . "\n";
print '</div>';
print '<div class="panel-body">' . "\n";
# Get system info to show
my @info = &list_combined_system_info( { 'qshow', 1 } );
if ( $level == 0 ) { Contents of /usr/share/webmin/virtual-server/system_info.pl, line 285-363 # Top quota users
my @quota = $info->{'quota'} ?
grep { &can_edit_domain($_->[0]) } @{$info->{'quota'}} : ( );
if (!$data->{'noquotas'} && @quota && (&master_admin() || &reseller_admin())) {
my @usage;
my $max = $data->{'max'} || 10;
my $maxquota = $info->{'maxquota'};
# Work out if showing by percent makes sense
my $qshow = $data->{'qshow'};
if ($qshow) {
my @quotawithlimit = grep { $_->[2] } @quota;
$qshow = 0 if (!@quotawithlimit);
}
# Limit to those with a quota limit, if showing a percent
if ($qshow) {
@quota = grep { $_->[2] } @quota;
}
if ($qshow) {
# Sort by percent used
@quota = grep { $_->[2] } @quota;
@quota = sort { ($b->[1]+$b->[3])/$b->[2] <=>
($a->[1]+$a->[3])/$a->[2] } @quota;
}
else {
# Sort by usage
@quota = sort { $b->[1]+$b->[3] <=> $a->[1]+$a->[3] } @quota;
}
# Message above list
my $qmsg;
if (@quota > $max) {
@quota = @quota[0..($max-1)];
$qmsg = &text('right_quotamax', $max);
}
elsif (&master_admin()) {
$qmsg = $text{'right_quotaall'};
}
else {
$qmsg = $text{'right_quotayours'};
}
my $open = 0;
foreach my $q (@quota) {
my $cmd = &can_edit_domain($q->[0]) ? "edit_domain.cgi"
: "view_domain.cgi";
my $chart = { 'desc' => &ui_link(
'/'.$module_name.'/'.$cmd.'?dom='.$q->[0]->{'id'},
&show_domain_name($q->[0])) };
if ($qshow) {
# By percent used
my $qpc = int($q->[1]*100 / $q->[2]);
my $dpc = int($q->[3]*100 / $q->[2]);
$chart->{'chart'} = [ 100, $qpc, $dpc ];
}
else {
# By actual usage
$chart->{'chart'} = [ $maxquota, $q->[1], $q->[3] ];
}
if ($q->[2]) {
# Show used and limit
my $pc = int(($q->[1]+$q->[3])*100 / $q->[2]);
$pc = " $pc" if ($pc < 10);
$chart->{'value'} = &text('right_out',
&nice_size($q->[1]+$q->[3]),
&nice_size($q->[2]));
}
else {
# Just show used
$chart->{'value'} = &nice_size($q->[1]+$q->[3]);
}
if ($q->[2] && $q->[1]+$q->[3] >= $q->[2]) {
# Domain is over quota
$open = 1;
}
push(@usage, $chart);
}
Webmin version is 1.730 |
Sure, let's wait and see if the Webmin devs can say something more. I will patch the sysinfo.pl file as suggested && remain at your disposal to troubleshoot this thing. Thank you for your time! |
Do you have anything changed in |
No, I don't think so. I am not very experienced in Linux server administration and avoid touching anything whose purpose is not clear to me. I have no custom commands regarding quotas in |
Heh. The problem got solved by itself. I decided to reset the quotas (by writing 2048 MB instead of 2GB) just to see what would happen and as soon as I did this for all four virtual servers, the chart started showing the proper units (I have not yet patched the |
Alright, it's cache problem. Jamie is aware! Thanks for reporting! |
Bars for disk quotas in System Information are not accurate.
Please refer to attached image.
The text was updated successfully, but these errors were encountered: