#!/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; } $prehead = defined(&WebminCore::theme_prehead) ? &capture_function_output(\&WebminCore::theme_prehead) : ""; &popup_header(undef, $prehead); print "
\n"; } if ($level == 0) { # Show general system information print "
$text{'right_host'} | \n"; print "",&get_system_hostname(),$ip," |
$text{'right_os'} | \n"; if ($gconfig{'os_version'} eq '*') { print "$gconfig{'real_os_type'} | $gconfig{'real_os_type'} $gconfig{'real_os_version'} | \n"; } # Webmin version print "
$text{'right_webmin'} | \n"; print "",&get_webmin_version()," |
$text{'right_time'} | \n"; if (&foreign_available("time")) { $tm = "$tm"; } print "$tm |
$text{'right_kernel'} | \n"; print "",&text('right_kernelon', $info->{'kernel'}->{'os'}, $info->{'kernel'}->{'version'}, $info->{'kernel'}->{'arch'})," |
$text{'right_cpuinfo'} | \n"; print "",&text('right_cputype', @c)," |
$text{'right_uptime'} | \n"; print "$uptime |
$text{'right_procs'} | \n"; if (&foreign_available("proc")) { $pr = "$pr"; } print "$pr |
$text{'right_cpu'} | \n"; print "",&text('right_load', @c)," |
$text{'right_cpuuse'} | \n"; print "",&text('right_cpustats', @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_disk'} | \n"; print "",&text('right_used', &nice_size($total), &nice_size($total-$free))," |
\n"; print " | ",&bar_chart($total, $total-$free, 1), " |
$text{'right_updates'} | \n"; @poss = @{$info->{'poss'}}; @secs = grep { $_->{'security'} } @poss; if (@poss && @secs) { $msg = &text('right_upsec', scalar(@poss), scalar(@secs)); } elsif (@poss) { $msg = &text('right_upneed', scalar(@poss)); } else { $msg = $text{'right_upok'}; } if (&foreign_available("package-updates")) { $msg = "$msg"; } print "$msg |
$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), " |