Operating System - Tru64 Unix
1752329 Members
5682 Online
108786 Solutions
New Discussion юеВ

Re: system statistics

 
SOLVED
Go to solution
Arnaud Veron
Valued Contributor
Solution

Re: system statistics

You can query the snmp agent with the "snmp_request" tru64 command. example : snmp_request 127.0.0.1 public get 1.3.6.1.2.1.2.2.1.10.2
where :

127.0.0.1 = IP of the host where the snmp agent is running
public = the snmp community you want to query
get = snmp type of method
1.3.6.1.2.1.2.2.1.10.2 = SNMP OID of the metric you're interested in ( you can find OID in the SNMP MIB )

Other OS support SNMP querying :
linux : snmpwalk
windows : getif

good luck.
Ali Humaidan
Occasional Advisor

Re: system statistics

Thanks Arnaud Veron for your reply, now SNMP is clearer to me ... just two questions though:

1. Is there an SNMP system call for snmp_get to read the result from a C program .. or using exec() to invoke snmp_get is the only way.

2. How to query SNMP to view all the groups of a specific branch for example (1.3.6.1.4.1.232.*) .. because MIB files have only a specific branch ie.
--The compaq enterprise (1.3.6.1.4.1.232)
--cpqSystemInfo Group (1.3.6.1.4.1.232.2)
--cpqSiComponent Group (1.3.6.1.4.1.232.2.2)
--cpqSiAsset Group (1.3.6.1.4.1.232.2.2.2)

Thanks again for your help
Arnaud Veron
Valued Contributor

Re: system statistics

1 - i don't know. But i'm sure you will find what you want here : http://www.netsnmp.org/
you have all the C source of snmp utilities.

2 - you have to use the "getnext" snmp method instead of the "get" one. You also have to tell snmp_request to run into "tree mode", so as to browse the tree you're interested in.
example : snmp_request localhost public getnext -t 1.3.6.1.4.1.232.2.2.2