jablonka.czprosek.czf

switches

Subversion Repositories:
[/] [switches.cgi] - Diff between revs 17 and 27

Show entire file Ignore whitespace

Rev 17 Rev 27
Line 183... Line 183...
my $popis = ""; my $popis = "";
my $macinfo = ""; my $macinfo = "";
my $macip = ""; my $macip = "";
my $hip = ""; my $hip = "";
my @row = (); my @row = ();
  my $dhcp2 = $dhcp;
   
print "<b>$desc</b> <a href=http:\/\/$myip>$myip</a>"; print "<b>$desc</b> <a href=http:\/\/$myip>$myip</a>";
   
my $speedall = `$snmpwalk -Os -c $com -v $ver $myip .1.3.6.1.2.1.2.2.1.5`; my $speedall = `$snmpwalk -Os -c $com -v $ver $myip .1.3.6.1.2.1.2.2.1.5`;
my $adminstatusall = `$snmpwalk -Os -c $com -v $ver $myip .1.3.6.1.2.1.2.2.1.7`; my $adminstatusall = `$snmpwalk -Os -c $com -v $ver $myip .1.3.6.1.2.1.2.2.1.7`;
my $operstatusall = `$snmpwalk -Os -c $com -v $ver $myip .1.3.6.1.2.1.2.2.1.8`; my $operstatusall = `$snmpwalk -Os -c $com -v $ver $myip .1.3.6.1.2.1.2.2.1.8`;
my $mactable = `$snmpwalk -Os -c $com -v $ver $myip atPhysAddress`; # my $mactable = `$snmpwalk -Os -c $com -v $ver $myip atPhysAddress`;
my $mactableport = `$snmpwalk -Os -c $com -v $ver $myip ipNetToMediaIfIndex`; # my $mactableport = `$snmpwalk -Os -c $com -v $ver $myip ipNetToMediaIfIndex`;
my $dhcpdconf = `wget -t 1 -T 1 http://$dhcp/cgi-bin/dhcp.cgi -q -O -`; my $mactable = `$snmpwalk -Os -Cc -c $com -v $ver $myip mib-2.17.4.3.1.1`;
# $arpn = `wget -t 1 -T 1 http://$dhcp/cgi-bin/arpn.cgi -q -O -`; my $mactableport = `$snmpwalk -Os -Cc -c $com -v $ver $myip mib-2.17.4.3.1.2`;
  my $dhcpdconf = `wget -t 1 -T 1 http://$dhcp2/cgi-bin/dhcp.cgi -q -O -`;
  my $arpn = `wget -t 1 -T 1 http://$dhcp2/cgi-bin/arpn.cgi -q -O -`;
   
foreach (split("\n",$operstatusall)) { foreach (split("\n",$operstatusall)) {
s/^ifOperStatus\.([0-9]+) = INTEGER: (.*)$/$1 $2/; s/^ifOperStatus\.([0-9]+) = INTEGER: (.*)$/$1 $2/;
@row = split ; @row = split ;
$pole_operstatus[$row[0]] = $row[1]; $pole_operstatus[$row[0]] = $row[1];
} }
Line 284... Line 287...
$title = "$mac " . $pole_dhcpdhosts{$mac}; $title = "$mac " . $pole_dhcpdhosts{$mac};
$popis = $pole_dhcpdhosts{$mac}; $popis = $pole_dhcpdhosts{$mac};
} else { } else {
$barva = "red"; $barva = "red";
$popis = $mac; $popis = $mac;
$macinfo = `wget -t 1 -T 1 http://$dhcp/cgi-bin/macinfo.cgi?$mac -q -O -`; $macinfo = `wget -t 1 -T 1 http://$dhcp2/cgi-bin/macinfo.cgi?$mac -q -O -`;
if ($macinfo) { ($macip) = split(" ", $macinfo, 1) } else { $macip = "none" }; if ($macinfo) { ($macip) = split(" ", $macinfo, 1) } else { $macip = "none" };
$title = "$mac je neznama MAC adresa! Nalezena IP : $macip"; $title = "$mac je neznama MAC adresa! Nalezena IP : $macip";
} }
print "<font color=$barva title=\"$title\">$popis</font><br>" print "<font color=$barva title=\"$title\">$popis</font><br>"
}; };

Powered by WebSVN 2.2.1