# /usr/bin/perl use warnings; use strict; use Net::SNMP; use Data::Dumper; my $oid= '1.3.6.1.4.1.1588.2.1.1.1.1.1'; my $host="host1.testdoman.com"; my $community='test'; my ($session, $error) = Net::SNMP->session( -hostname => $host, -community =>$community, -nonblocking => 1, ); my $result = $session->get_request(-varbindlist => [ $oid ],); if (!defined $result) { $error = $session->error(); print "GET_REQUEST ERROR: $error\n"; $session->close(); exit(1); } print Dumper $result; $session->close; exit(0); #### # /usr/bin/perl use warnings; use strict; my $community='test'; my $host= "host1.testdoman.com"; my $Time = `snmpwalk -v1 -c $community $host 1.3.6.1.4.1.1588.2.1.1.1.1.1`; print $Time;