English 中文(简体)
• 如何看到DEBUGMSGTL在网状中的标识
原标题:how to see the log of the DEBUGMSGTL in net-snmp

I am trying to write a snmp subagent that using agentX, which is supported by net-snmp. At first, I used the example codes from net-snmp FAQ:

http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent

And from the example codes (example-demon.c,nstAgentSubagentObject.c,nstAgentSubagentObject.h), I build a subagent which can use agentX to perform snmpget and snmpset.

My question is: From the code in nstAgentSubagentObject.c, there are many trace codes such as follows:

DEBUGMSGTL(("nstAgentSubagentObject",
                "Initializing the nstAgentSubagentObject module
"));

但是,我可以看一看这个记录。

I tried to start snmpd (demon of snmp) by snmpd -f -DnstAgentSubagentObject -Lf /tmp/snmp.log.

但我仍然看着这个记录。 谁能告诉我,如何看到DEBUGMSGTL的标志?

最佳回答

而不是从<条码>开始<>snmpd with -D nstAgent Subagent 反对: 在你开始的时候,你希望把这一指挥线选择交给你的代理人。

在辅导中,它建议从指挥员开始:

% ./mysubagent &

为了能够发出更严厉的信号,而是试图以以下指挥系统开始:

% ./mysubagent -D nstAgentSubagentObject

If I remember correctly, that should print out the debug output to the console. You can combine it with the -L option if you d prefer it written to a file.

问题回答

i 仅能树立旗帜:

-Dverbose

或如果你想看到所有标识:

-Dall

值此之际,您也可将以下内容提一下。 编织案,并tw开其中的选择:

debugTokens nstAgentSubagentObject
doDebugging 1

但是,另一个答案是明确的:你需要转而去,在哪里,该法典将受到打击,而后者则处于次要地位(双方将阅读该书)。





相关问题
How do I use SNMP to monitor job status on a printer?

I ve been trying to figure out how to monitor job status via SNMP and I have found a solution on Xerox based printers (using Xerox implemented mibs), but I m looking for something that will work ...

SnmpExtensionTrap has a size limit?

I am working on a problem in SNMP extension agent in windows, which is passing traps to snmp.exe via SnmpExtensionTrap callback. We added a couple of fields to the agent recently, and I am starting ...

SNMP on AIX 5.3

I need to monitor a system with AIX 5.3, but can t find a good source for the OIDs. Does anybody know the OIDs for CPU, Memory and Harddisk values?

opensource network monitoring tools developed in java

i want to know the best opensource network monitoring tool developed in java with very good support via forums and which should have the following features .. Fault and Alert mgmt Performance Poll ...

snmp and platform specific information

I need to come with a strategy to use gather information about the health of my linux platform, hardware health such as high CPU temperature and may be disk space usage, etc... I know my examples are ...

SNMP in Java, specifically to be JMX adapter

I have a few JAVA application that I monitor using JMX. I would like to write an SNMP client for these applications that wraps the JMX interface and by discovery exposes the same attributes that are ...