WTCS.ORG |
Testing your SNMP Implementation
getif SNMPUTIL
Testing
NT Testing
NetWare
If you have successfully installed SNMP on either NetWare or NT, and have added the performance NLMS (NetWare) or MIBS/DLLS (NT), then you are ready to see if you can actually access that information from your Network Management Station. WHAT?! You DON'T have a NMS? So NOW what are you going to do?
There are a couple of ways you can query the MIBS you have made accessible using SNMP4NT or SNMP4NW. One of them is getif, and the other is SNMPUTIL. This page discusses both, and provides sample strings for you to use to test your SNMP implementation.
Please see the Getif Page for detailed information! Newly expanded!
SNMPUTIL.EXE is a command line utility (included with the Windows NT 3.51 and 4.0 resource kits) that allows the querying of MIB information from a network device. While it supports GET/GETNEXT and WALK, I would hazard a guess that most peopleuse it to GET information and to WALK OID trees.
With the SNMPUTIL program, you can access the SNMP OID and get the information you want from a command line. The following image (showing a GET of the free memory on my Windows NT 4.0 system) is the SNMPUTIL equivalent of the getif MIB browse (free memory) on my Windows NT 4.0 system:
Download SNMPUTIL.EXE here. Save it in your %systemroot%\system32 directory. You can get SNMPUTIL.EXE as part of the Windows NT Resource Kit, or as part of SNMP4NT.
Most of the SNMPUTIL command lines below should work, although depending on the OID "leaf" details, it may not return an accurate value. Remember, these are only to help you along with your testing. Each system will be a bit different, and, well, some of the OIDs may not return a value! Assume a target system IP of 127.0.0.1, with a community name of PUBLIC. Change to your values. Now, open a command prompt (start/run/cmd), and you are ready to play!You can then "drill down" to the OID you need to access! Try it!
Getting Server
Name:
snmputil get 127.0.0.1 public
.1.3.6.1.4.1.23.2.28.1.1.0
Getting Server Serial
Number:
snmputil get 127.0.0.1 public
.1.3.6.1.4.1.23.2.28.1.2.0
Getting IPX Internal Net
Number:
snmputil get 127.0.0.1 public
.1.3.6.1.4.1.23.2.28.1.3.0
Getting Current Number of Open
Files:
snmputil get 127.0.0.1 public
.1.3.6.1.4.1.23.2.28.1.7.0
Getting Values for DOS Memory
:
snmputil get 127.0.0.1 public
.1.3.6.1.2.1.25.2.3.1.6.1
Alloc Memory Pool:
snmputil
get 127.0.0.1 public .1.3.6.1.2.1.25.2.3.1.6.2
Cache
Buffers (you need to multiply the returned value by 4096 to get the
actual value)...
snmputil get 127.0.0.1 public
.1.3.6.1.2.1.25.2.3.1.6.3
Cache Moveable Memory (you need to multiply the
returned value by 4096 to get the actual value)...
snmputil get 127.0.0.1
public .1.3.6.1.2.1.25.2.3.1.6.4
Cache Non-Moveable Memory
(you need to multiply the returned value by 4096 to get the actual
value)...
snmputil get 127.0.0.1 public
.1.3.6.1.2.1.25.2.3.1.6.5
Code and Data
Memory:
snmputil get 127.0.0.1 public
.1.3.6.1.2.1.25.2.3.1.6.6
SYS:
snmputil get 127.0.0.1
public .1.3.6.1.2.1.25.2.3.1.6.7
FIRST VOL: (will be SYS on NetWare
3.1x/4/4.1x and NSS_ADMIN on NetWare 5)...
snmputil get 127.0.0.1
public .1.3.6.1.2.1.25.2.3.1.6.8
SECOND VOL:
snmputil get 127.0.0.1 public
.1.3.6.1.2.1.25.2.3.1.6.9
THIRD VOL:
snmputil get
127.0.0.1 public .1.3.6.1.2.1.25.2.3.1.6.10
Walking the NetWare Server OID trees:
Walking the NetWare Server
(nwSystem) tree:
snmputil walk 127.0.0.1 public
.1.3.6.1.4.1.23.2.28.1.
Walking Memory Usage
Tree:
snmputil walk 127.0.0.1 public
.1.3.6.1.2.1.25.2.3.1.6
To return the the main page,
click the logo!