Difference between revisions of "Debugging output"

From Net-SNMP Wiki
Jump to: navigation, search
Line 9: Line 9:
 
To see every possible output use
 
To see every possible output use
 
  -D all
 
  -D all
 +
 +
[http://www.bestessays.com.au/ custom essay writing]
  
 
The token are not predefined but defined through usage.
 
The token are not predefined but defined through usage.

Revision as of 08:44, 20 August 2010

Net-SNMP applications and the agent support run-time selectable debugging output. The -D flag can be used to select tokens to display at runtime with a comma separated list. For example -Dtls,ssl,snmpd will display every debugging statement registered with the prefixes of "tls", "ssl" and "snmpd". This will include longer prefixes too such as "snmpd/main" and "sslctx_client" for example.


Command line options

Options for using -D for DEBUG output

-D token[,token[,token]...]

To see every possible output use

-D all

custom essay writing

The token are not predefined but defined through usage.

DEBUGMSG(( token, format, ...))

To find all existing tokens try

cd net-snmp-<Version>
find . -name "*.c" | xargs grep "DEBUGMSG.*\"" | sed 's/^.*((//;s/,.*$//' | sort -u | grep "^\""

for version 5.4.2.1 this returns 1589 tokens.

Some of these tokens will be found but not be used because they are inside a multiline comment.

debug_tokens_5.4.2.1