Skip to content
Back to top
View this page
Edit this page

# Troubleshooting

Don’t panic when your PySNMP application does not work as expected. This page provides some tips and tricks to troubleshoot your PySNMP application.

## PySNMP Built-in Debugging

If you find your PySNMP application behaving unexpectedly, try to enable a /more or less verbose/ built-in PySNMP debugging by adding the following snippet of code at the beginning of your application:

    from pysnmp import debug

    # use specific flags for debugging
    debug.set_logger(debug.Debug('dsp', 'msgproc', 'secmod'))

    # use 'all' for full debugging
    debug.set_logger(debug.Debug('all'))

Then run your app and watch stderr. The Debug initializer enables debugging for a particular PySNMP subsystem, ‘all’ enables full debugging. More specific flags are:

- io

- dsp

- msgproc

- secmod

- mibbuild

- mibview

- mibinstrum

- acl

- proxy

- app

You might refer to PySNMP source code to see in which components these flags are used.

## Common Utilities

While built-in debugging is a good start, you might want to use some other tools and utilities to troubleshoot your PySNMP application at packet level so as to gain more insights. Then you might want to use some tools below,

- Wireshark is a great tool to see what’s going on the wire.

- tcpdump is a command-line tool to capture network traffic.

- Net-SNMP command-line tools are great to see how your SNMP agent responds to requests.

## Commercial Support

If you are still stuck, you might want to consider hiring a professional to help you out.

LeXtudio Inc. does not only support PySNMP ecosystem by maintaining the GitHub repositories but also offers commercial support such as consulting services. You can easily open a support ticket via its homepage.

## Related Resources

- Support Options

- Quick Start

- Samples

- API References