mirror of
https://github.com/webmin/webmin.git
synced 2026-02-08 08:19:57 +00:00
Show collected CPU averages
This commit is contained in:
@@ -19,6 +19,8 @@ right_cpu=CPU load averages
|
||||
right_cpuinfo=Processor information
|
||||
right_cputype=$5, $8 cores
|
||||
right_load=$1 (1 min) $2 (5 mins) $3 (15 mins)
|
||||
right_cpuuse=CPU usage
|
||||
right_cpustats=$1% user, $2% kernel, $4% IO, $3% idle
|
||||
right_real=Real memory
|
||||
right_virt=Virtual memory
|
||||
right_procs=Running processes
|
||||
|
||||
@@ -107,13 +107,24 @@ if ($level == 0) {
|
||||
print "<td>$pr</td> </tr>\n";
|
||||
}
|
||||
|
||||
# Load and memory info
|
||||
# Load averages
|
||||
if ($info->{'load'}) {
|
||||
@c = @{$info->{'load'}};
|
||||
if (@c) {
|
||||
print "<tr> <td><b>$text{'right_cpu'}</b></td>\n";
|
||||
print "<td>",&text('right_load', @c),"</td> </tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
# CPU usage
|
||||
if ($info->{'cpu'}) {
|
||||
@c = @{$info->{'cpu'}};
|
||||
print "<tr> <td><b>$text{'right_cpuuse'}</b></td>\n";
|
||||
print "<td>",&text('right_cpustats', @c),"</td> </tr>\n";
|
||||
}
|
||||
|
||||
# Memory usage
|
||||
if ($info->{'mem'}) {
|
||||
@m = @{$info->{'mem'}};
|
||||
if (@m && $m[0]) {
|
||||
print "<tr> <td><b>$text{'right_real'}</b></td>\n";
|
||||
|
||||
Reference in New Issue
Block a user