On Ubuntu, you can use perl to get the value of specific SNMP object using perl module Net::SNMP. You have to install libnet-snmp-perl package.

These lines below are example how to do it on perl :

——————————————————————————————-

#!/usr/bin/perl
use Net::SNMP;

# requires a hostname and a community string as its arguments
($session,$error) = Net::SNMP->session(Hostname => $ARGV[0],
                                       Community => $ARGV[1]);

die "session error: $error" unless ($session);

#  1.3.6.1.4.1.2021.9.1.5.1  
$result = $session->get_request("1.3.6.1.4.1.2021.9.1.5.1");

die "request error: ".$session->error unless (defined $result);

$session->close;

print "Disk Percent 1: ".$result->{"1.3.6.1.4.1.2021.9.1.5.1"}."\n";
 

——————————————————————————————–

Change the permission to 755 and execute using command : <script-name> <host> <community-name>

For example : getHDUsage.pl localhost heaven