#!/usr/bin/perl -w

use CGI qw(fatalsToBrowser);

my $gQ = new CGI;
print $gQ->header( -type=>'text/html', -charset=>'gb2312');

$gQ->print( "<html><head><title>·þÎñÔËÐÐ×´Ì¬</title>" );
$gQ->print( "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\"></head>" );
$gQ->print( "<body>\n<br>&nbsp;<br>" );
$gQ->print( "<table border=0 cellpadding=0 width=750 align=center><tr><td>" );

	$gQ->print( "<P align=left>Íø¿¨Ç§Õ×¹¤×÷×´Ì¬¡£</P><PRE>" );
	$gQ->print( "Gigabit Eth0(8):     " );    system( "/usr/sbin/rshrun -la /sbin/ethtool eth0|awk '/Speed/ {print}'|grep 1000M|wc -l" );
    $gQ->print( "Gigabit Eth1(4):    " );    system( "/usr/sbin/rshrun -lg=link,delivery,backup /sbin/ethtool eth1|awk '/Speed/ {print}'|grep 1000M|wc -l" );

	$gQ->print( "\r\n" );
	$gQ->print( "<P align=left>´ÅÅÌIO×´Ì¬¡£</P><PRE>" );
	$gQ->print( "IO_Database:     " );	system( "/usr/bin/snmpwalk -Oqv database 1.3.6.1.4.1.8888.2.2.101.5|tr '\"' ' ' " );
	$gQ->print( "IO_Backup:     " );	system( "/usr/bin/snmpwalk -Oqv backup 1.3.6.1.4.1.8888.2.2.101.5|tr '\"' ' ' " );
	$gQ->print( "IO_Managr:    " );	system( "/usr/bin/snmpwalk -Oqv manager 1.3.6.1.4.1.8888.2.1.101.5|tr '\"' ' ' " );
	$gQ->print( "IO_Managr_NFS:    " );	system( "/usr/bin/snmpwalk -Oqv manager 1.3.6.1.4.1.8888.2.3.101.5|tr '\"' ' ' " );
	
	$gQ->print( "\r\n" );
	$gQ->print( "<P align=left>´ÅÅÌÊ£Óà¿Õ¼ä¡£</P><PRE>" );
	$gQ->print( "DF_Database:     " );	system( "/usr/bin/rsh database df | grep sdb |tr '    ' ' ' | tr -s ' ' | cut -d ' ' -f4  " );
	$gQ->print( "DF_Backup:     " );	system( "/usr/bin/rsh backup df |grep sdb|tr '    ' ' ' | tr -s ' ' | cut -d ' ' -f4  " );
	$gQ->print( "DF_Managr_root:  " );	system( "/bin/df |grep sda1 |tr '    ' ' ' | tr -s ' ' | cut -d ' ' -f4  " );
	$gQ->print( "DF_Managr_export:  " );	system( "/bin/df |grep sdc |tr '    ' ' ' | tr -s ' ' | cut -d ' ' -f4   " );
 

$gQ->print( "</td></tr></table>" );
$gQ->print( "</body></html>\n" );

