WTCS.ORG

    Troubleshooting your SNMP Installation

stresssymbol.gif (7298 bytes)


MRTG Troubleshooting Other Problems/Issues
Microsoft Issues Troubleshooting SNMP4W2K
Cisco Tips Submitting questions

This section deals with problems you may be encountering with your SNMP and/or MRTG configuration, and anything else that's related.  Some of these tips may have appeared on the MRTG Mailing List, and some are as a result of my own testing and experiences.


Submitting Questions:

If you are having problems and would like some help, please send me an email containing the following information:

1) Windows NT version
2) Service Pack Version
3) MS BackOffice add-ons and version (i.e. Proxy Server 2, Exchange 5.5, IIS 4, Option Pack 4)
4) SNMP4NT.ZIP version (date)
5) Description of problem (what OIDs do not work, which ones do, etc.)

Please attach a registry dump of the HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMP hive (done like
so:)

1) Start/Run/regedt32
2) Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMP
3) BE SURE THAT THE SNMP hive is highlighted!!
4) Select Registry/Save Key, and save it to a temp directory (i.e. c:\temp\snmp_bad.reg)

I will look through the key, and see if there is a glaring (i.e. common) problem amongst the "broken" instances of SNMP4NT.  Any errors found will be immediately addressed, and SNMP4NT will be updated.

You can send the email to snmp4tpc.help@wtcs.org.

Thanks for your help, comments, and contributions to this matter. I do this as a hobby, so response may not be as speedy as you would like. Be gentle!  I do my best to provide a stable product.


Microsoft Issues

 safbul2a.gif (343 bytes) Memory leak when performance counters are unavailable Technet Online

Check out Technet Online!

 safbul2a.gif (343 bytes) SNMP Counters are unreliable in SMP Computers
 safbul2a.gif (343 bytes) NT Resource Kit has PERFM.BAT error
 safbul2a.gif (343 bytes) How to set up Performance Counter Agent Extension
 safbul2a.gif (343 bytes) Resource Kit perfmib.dll cannot read some SNMP counters
    Download PERF2MIB.EXE and PERFMIB.DLL Updates
(PERF2MIB_I386.EXE)
 safbul2a.gif (343 bytes) SNMP Process Object returns the incorrect value
 safbul2a.gif (343 bytes) BUG: The OID for memPercent CommittedBytesinUse Always Returns Zero
 safbul2a.gif (343 bytes) SNMP Error - Entry point not found.  The procedure entry point SnmpSvcGetEnterpriseOID could not be located in the dynamic link library snmpapi.dll
 safbul2a.gif (343 bytes) Event ID: 322     Source: SQL Executive   Message: The Data portion of event 19002 (19004) from MSSQLServices in invalid
 safbul2a.gif (343 bytes) Event ID: 1106    Source: SNMP    Message: The SNMP service is ignoring extension agent <path>\sqlsnmp.dll because it is missing or misconfigured.

Resolution: copy the sqlsnmp.dll file from here and put it wherever the <path> indicates

 safbul2a.gif (343 bytes) Managing and Monitoring MS Exchange Server (good performance counter tips!) 
 safbul2a.gif (343 bytes) Monitoring and Auditing for End Systems (a good read to help you develop a good strategy)
 safbul2a.gif (343 bytes) Starting the MS SNMP agent in debug mode
 safbul2a.gif (343 bytes) Re-installing the Windows NT 4 Performance Counters

 


Cisco Tips

 safbul2a.gif (343 bytes) Configuring TCP/IP on Cisco Routers (IOS 11)
 safbul2a.gif (343 bytes) Cisco SNMP Technical Tips
 safbul2a.gif (343 bytes) Cisco MIBs supported by Product

 


Other Problems/Issues

 safbul2a.gif (343 bytes) Unable to get HTTP/FTP Stats after installing SNMP 
 safbul2a.gif (343 bytes) Web link to list of Private Enterprise OIDs
 safbul2a.gif (343 bytes) Text list of Private Enterprise OIDs
 safbul2a.gif (343 bytes) SNMP OIDs no longer accessible after applying NT4/SP5
 safbul2a.gif (343 bytes) Figuring out OIDs for multiple disk drives
 safbul2a.gif (343 bytes) Adding Performance Monitor Counters to PERFMIB.MIB

 


MRTG Errors

 safbul2a.gif (343 bytes) MRTG fails with the following error:

SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.2.2.1.10.1)
SNMPv1_Session (remote host: "160.125.1.50" [160.125.1.50].161
community: "public"
request ID: 1039290968
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
SNMPGET Problem for ifInOctets.1 ifOutOctets.1 sysUptime sysName ifDescr.1
on public@160.125.1.50
SNMPGET: Failed to reach target: "1:public@160.125.1.50". I tried multiple
times! public@160.125.1.50

Resolution:  The HKLM/System/CurrentControlSet/Services/SNMP/Parameters/ExtensionAgents/RFC1156Agent key is missing

Here is a registry snapshot of a "healthy registry".  Note the RFC1156 entry.  Make yours look like that and you should be on your way.  It points to HKLM/Software/Microsoft/RFC1156Agent, where it subsequently points to inetmib.dll (see the picture here).  This is a regular occurrence with MS Windows NT. No good reason, but if it happens again, you will know how to fix it!

 


SNMP Stats (i.e. MIB-II) no longer accessible after applying Service Pack 5 for NT 4

OK, things are working great, so you decide to install SP5 for NT4.  Then, when you really need to, you discover that you can no longer access SNMP stats.  Well,  it happened to me too!.   After I installed SP5, and updated MRTG to v2.8.8, I found that NONE of the CFG files worked.  Arrggh!   Getif could not browse the MIB tree, either.  The SNMP service was starting and running properly.  So what could be the problem?  Dunno exactly, but here's what I did to get it running again ...

    Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMP
    Select Registry/Save, and saved it as D:\TEMP\SNMPSAVE.REG

Then I removed the SNMP Service and rebooted.  Then I added the SNMP Service and Rebooted (you'll get an error!).  Then, I reapplied SP5 (and yes, rebooted!).    At this point (probably 30 minutes later!) there is a completely new SNMP Key, but you will see that all the old Extension Agents are gone.  That's why you backed it up beforehand.   Restore the key you saved earlier.

    Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services
    Select   Edit/Add Key, and call it SNMPTEMP
    Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMPTEMP
    Select Registry/Restore, and select the file you created earlier (I used D:\TEMP\SNMPSAVE.REG)

Now, you can open the Paramters/Extension Agents in both the SNMP and SNMPTEMP keys.   One at a time, I recreated the keys in SNMP!

Note that in the new SNMP key, that the SOFTWARE\Microsoft\LANManagerMIB2Agent\CurrentVersion and SOFTWARE\Microsoft\RFC1156Agent\CurrentVersion extension agents are listed as 1 and 2.   Recreate the keys from SNMPTEMP from 3 to whatever, by selecting Edit/Add Value (REG_SZ:) and typing the next number.  You will then be prompted to enter a value.   I simply cut from SNMPTEMP/Parameters/ExtensionAgents and pasted in the SNMP/Parameters/ExtensionAgents.

If you had either or both a W3SVC and MSFTPSVC key, then recreate them too!    The do a net stop snmp, and a net start snmp from a cmd prompt.   That should get you back on the road!

 


redball.gif (995 bytes) DELETE THE HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMPTEMP KEY ONCE YOU HAVE FINISHED! DO NOT FORGET TO DO THIS!   Otherwise you may find two SNMP services in Control Panel/Services!


Unable to get HTTP/FTP SNMP Stats after installing SNMP

If you install SNMP after you install IIS, then the hooks into the IIS and HTTP MIB dlls will not be there, and you will not be able to browse the HTTP and FTP MIBs.  I guess Microsoft assumes that you will always install SNMP first.  Hmm.  Anyway, other than re-installing IIS (as far as I know anyway), there is no other way to get access to the counters other than by modifying the registry.   Feel up to it?  There is an assumption here that you have used and know about the Windows NT Registry Editor).  Here goes ...


redball.gif (995 bytes) By the way, I am providing this information to help you (cause this happened to me!), but ANY process that involves modification of the registry introduces a risk of corrupting it.  YOU HAVE BEEN WARNED!


1) You will need to download the following files:

SVC_SNMP.KEY SVC_W3SVC.KEY SW_W3SVC.KEY SVC_MSFTPSVC.KEY SW_MSFTPSVC.KEY


2) To generally fix SNMP for all MS Perfmib and IIS SNMP components:

Note: This will completely replace the HKLM/System/CurrentControlSet/Services/SNMP key!  Save yours BEFORE you do this unless you don't have any reason to.

- Stop the SNMP Service (open a command prompt, type "net stop snmp")
- Start the Registry Editor (start/run/regedt32)
- Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMP
- Select Registry/Restore, and select SVC_SNMP.KEY


3) To fix W3SVC (HTTP) SNMP Hooks:

- Create a key under HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services called W3SVC
- Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/W3SVC
- Select Registry/Restore, and select SVC_W3SVC.KEY

- Create a key under HKEY_LOCAL_MACHINE/Software/Microsoft called W3SVC
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/W3SVC
- Select Registry/Restore, and select SW_W3SVC.KEY


4) To fix FTP SNMP Hooks:

- Create a key under HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services called MSFTPSVC
- Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/MSFTPSVC
- Select Registry/Restore, and select SVC_MSFTPSVC.KEY

- Create a key under HKEY_LOCAL_MACHINE/Software/Microsoft called MSFTPSVC
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/MSFTPSVC
- Select Registry/Restore, and select SW_MSFTPSVC.KEY


5) Modify the SNMP Service properties:

- Go into Control Panel/Services, and select the SNMP Service.  You will need to change the startup characteristics to match yours (I have my SNMP service start with a service account).
- Go into Control Panel/Network, select the Services Tab, and double click SNMP.   Change the settings to your preferences!


6) Verify the path to the XXXmib.dll files:
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/MSFTPSVC/CurrentVersion
- Check to make sure the path to ftpmib.dll is accurate and that the file exists there!
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/W3SVC/CurrentVersion
- Check to make sure the path to httpmib.dll is accurate and that the file exists there!

You will more than likely need to change the paths, since you might have NT installed on a different drive/directory than I do.


7) Restart the SNMP service:
- Open a command prompt, type "net start snmp"

That ought'ta do it!


How to Start the SNMP Service in Debug Mode

The SNMP service can be started from either the control panel or from a console window.

Type "net help start snmp" in a console box to see how to configure error logging of the SNMP agent.

The syntax of the command is:
   net start snmp [/logtype: type] [/loglevel: level] 
where:
   net start snmp /logtype:6 /loglevel:10 
This starts the SNMP service with loglevel 10, and logs events in the eventlog as well as in SNMPDBG.LOG.

The SNMP service can also be started from a console window without typing "net start." This makes all error messages go to the console window and can be used to help in debugging when writing SNMP applications. For example, the following starts the SNMP service:
cmd-prompt> snmp

To return the the main page, click the Go Home! logo!