RE: Question regarding DEBUGMSGTL

"Pamidipati Suresh-G20238" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi Karthikeyan,
 
Subagent logging to a file can be done by invoking API
"netsnmp_enable_filelog(logfile_name, dont_zero_log)" in subagent code.
If the second argument dont_zero_log is 0, then file will be opened in
write ("w") mode, else it will be opened in append ("a") mode.
This ensures that all the messages passed to snmp_log() API will get
logged to the subagent log file. 
For other log messages, you can specify the debug tokens (of your
interest) in subagent's configuration file as you do in snmpd.conf file.
For eg, the following line in the configuration file will result in all
messages passed through DEBUGMSGTL macro logged in the file.
 
[snmp] dodebugging 1
 
snmp_enable_stderrlog() API when invoked, messages will be logged to
stdouts.
 
Regards,
Suresh. 
 
 
 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Karthikeyan Ramasubramanian
Sent: Wednesday, July 11, 2007 1:02 PM
To: [email protected]
Subject: Question regarding DEBUGMSGTL


Hi,

      I am new to netSnmp. I am trying to debug my code using DEBUGMSGTL
macro. My code is running as a subagent. I have started the master agent
with debugging enabled in the snmpd.conf  file along with the token in
my DEBUGMSGTL call. I am logging towards the default log file in
/var/log/snmpd.log file. I am getting the debug messages logged only by
the master agent. My subagent messages are not getting logged. Later I
started the master agent with the command

/usr/local/sbin/snmpd -Lf /var/log/snmpd.log "-DALL"

Again I get the debug messages only from the master agent and not from
my subagent. Do I need to do anything else to get my debug messages from
subagent logged.

Also how can i enable my log messages passed thru snmp_log() function to
be logged onto a file/console.

-- 
R.Karthikeyan

"Vision without action is a Daydream. Action without vision is a
Nightmare"

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.