#!/usr/bin/perl -w
open (F, "wget -q --http-user=hoge --http-passwd=hoge http://hoge/cgi-bin/Statistic.cgi -O - --proxy=off|");
while (<F>) {
    if (/ifInOctets.*NOWRAP>(\d+)<TD/) {
	print $1 . "\n";
    } elsif (/ifOutOctets.*NOWRAP>(\d+)<TD/) {
	print $1 . "\n";
    }
}
close (F);
open (F, "wget -q --http-user=hoge --http-passwd=hoge http://hoge/cgi-bin/ConditionLog.cgi -O - --proxy=off|");
while (<F>) {
    if (/\(機器起動からの経過時間 ：(.*)\)/) {
	$uptime = $1;
	$uptime =~ s/日/days/;
	print $uptime . "\n";
    }
}
close (F);
print "hoge\n";
