打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Debugging output
userphoto

2013.12.19

关注

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

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

Configuration files

Note that if you want to turn on debugging via the config file, but *only*for the agent (rather than all SNMP commands), then you'd need a blocksomething like

   [snmp]    doDebugging 1    debugTokens  this,that,theother

in your snmpd.conf file (the leading [snmp] token indicates it's actually going to be directives from the main snmp.conf file; use "[snmpd]" to switch back to snmpd.conf tokens after that if you need to.)

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
snmpd 命令手册
Linux下如何安装配置snmpd-Linux-IT学习者
Centos yum安装snmp 
LINUX SNMP 配置
suselinux snmpd服务无法启动
SNMPD.CONF配置说明
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服