mirror of
https://github.com/webmin/webmin.git
synced 2025-08-15 21:20:10 +00:00
Show burstable memory limit, if there is one
This commit is contained in:
@ -29,7 +29,8 @@ right_real=Real memory
|
||||
right_virt=Virtual memory
|
||||
right_procs=Running processes
|
||||
right_disk=Local disk space
|
||||
right_used=$1 total, $2 used
|
||||
right_used=$2 used, $1 total
|
||||
right_used2=$2 used, $1 guaranteed, $3 burstable
|
||||
right_out=$1 of $2
|
||||
right_quota=Disk usage and quota
|
||||
right_header5=Account Information
|
||||
|
@ -161,7 +161,18 @@ if ($level == 0) {
|
||||
# Memory usage
|
||||
if ($info->{'mem'}) {
|
||||
@m = @{$info->{'mem'}};
|
||||
if (@m && $m[0]) {
|
||||
if (@m && $m[0] && $m[5]) {
|
||||
# Show memory usage with bursting
|
||||
print &ui_table_row($text{'right_real'},
|
||||
&text('right_used2',
|
||||
&nice_size($m[0]*1024),
|
||||
&nice_size(($m[0]-$m[1])*1024),
|
||||
&nice_size($m[5]*1024))."<br>\n".
|
||||
&bar_chart_three($m[5], $m[1], $m[0]-$m[1],
|
||||
$m[5]-$m[0]));
|
||||
}
|
||||
elsif (@m && $m[0] && !$m[5]) {
|
||||
# Show memory usage on a regular system
|
||||
print &ui_table_row($text{'right_real'},
|
||||
&text('right_used',
|
||||
&nice_size($m[0]*1024),
|
||||
@ -214,7 +225,7 @@ if ($level == 0) {
|
||||
|
||||
print &ui_table_end();
|
||||
|
||||
# Check for incorrect OS
|
||||
# Show other webmin-generated notifications
|
||||
if (&foreign_check("webmin")) {
|
||||
&foreign_require("webmin", "webmin-lib.pl");
|
||||
&webmin::show_webmin_notifications();
|
||||
|
Reference in New Issue
Block a user