#!/usr/local/bin/perl

use SNMP 1.8;

require "parameters.plib";


$var = new SNMP::Varbind(['1.3.6.1.4.1.785.6.1.1', '0']);

$session = new SNMP::Session ( DestHost => $host,
                                Community => $community,
                                RemotePort => $port );

print "Could not open session"
                if !defined($session);

$resp = $session->get($var);

print "SNMP-request error\n"
                if !defined($resp);

$value = $var->[$SNMP::Varbind::val_f];

if ($session->{ErrorInd} != 0) {
	printf "Return error status '%d' means '%s' at index '%d'\n",
			$session->{ErrorNum}, 
			$session->{ErrorStr}, 
			$session->{ErrorInd};
} else {
	if ($value == 1) {
		print "The Extended Scoreboard Status 'ON'\n";
	} elsif ($value == 2) {
		print "The Extended Scoreboard Status 'OFF'\n";
	} else {
		print "Panic, should not be possible\n";
	}
}


