#!/usr/local/bin/perl # Show server or domain information BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); &ReadParse(); &load_theme_library(); if (&get_product_name() eq "usermin") { $level = 3; } else { $level = 0; } %text = &load_language($current_theme); $bar_width = 300; foreach $o (split(/\0/, $in{'open'})) { push(@open, $o); $open{$o} = 1; } &popup_header(undef, &capture_function_output(\&WebminCore::theme_prehead)); print "

\n"; } if ($level == 0) { # Show general system information print "
| $text{'right_host'} | \n"; print "",&get_system_hostname()," |
| $text{'right_os'} | \n"; if ($gconfig{'os_version'} eq '*') { print "$gconfig{'real_os_type'} | $gconfig{'real_os_type'} $gconfig{'real_os_version'} | \n"; } print "
| $text{'right_webmin'} | \n"; print "",&get_webmin_version()," |
| $text{'right_time'} | \n"; print "$tm |
| $text{'right_kernel'} | \n"; print "",&text('right_kernelon', $o, $r, $m)," |
| $text{'right_uptime'} | \n"; print "$uptime |
| $text{'right_cpu'} | \n"; print "",&text('right_load', @c)," |
| $text{'right_real'} | \n"; print "",&text('right_used', &nice_size($m[0]*1024), &nice_size(($m[0]-$m[1])*1024)), " |
| \n"; print " | ",&bar_chart($m[0], $m[0]-$m[1], 1), " |
| $text{'right_virt'} | \n"; print "",&text('right_used', &nice_size($m[2]*1024), &nice_size(($m[2]-$m[3])*1024)), " |
| \n"; print " | ",&bar_chart($m[2], $m[2]-$m[3], 1), " |
| $text{'right_procs'} | \n"; #print "",scalar(@procs)," |
| $text{'right_disk'} | \n"; print "",&text('right_used', &nice_size($total), &nice_size($total-$free))," |
| \n"; print " | ",&bar_chart($total, $total-$free, 1), " |
| $text{'right_host'} | \n"; print "",&get_system_hostname()," |
| $text{'right_os'} | \n"; if ($gconfig{'os_version'} eq '*') { print "$gconfig{'real_os_type'} | $gconfig{'real_os_type'} $gconfig{'real_os_version'} | \n"; } print "
| $text{'right_usermin'} | \n"; print "",&get_webmin_version()," |
| $text{'right_time'} | \n"; print "$tm |
| $text{'right_uquota'} | \n"; print "",&text('right_out', &nice_size($usage*$bsize), &nice_size($quota*$bsize))," |
| \n"; print " | ",&bar_chart($quota, $usage, 1), " |
\n";
print "$text";
}
else {
print "
\n";
print "$text";
}
print "