0
DEBUGMSGTL(("","Initializing scalar integer.  Default value = %d\n"));

snmp_log(LOG_ERR,"fscanf failed in temp fun(),errno:\n");

with these log I want all logs from startinn of snmp service to end of it. But don't know where to see.

where these logs are going to be saved ? I am using NET-SNMP version: 5.7.2.rc1

while installation I have not given any location in

Location to write logfile & Location to write persistent information.

Jatin Bodarya
  • 1,425
  • 2
  • 20
  • 32

2 Answers2

0

This is a compile-time option --with-logfile. Your package maintainer should document the default for itself.

hd1
  • 33,938
  • 5
  • 80
  • 91
  • As I have mentioned I have given "NULL" with this option... So can I get any default location ? – Jatin Bodarya Nov 22 '12 at 06:39
  • did you install it from source or was it in a package? – hd1 Nov 22 '12 at 07:03
  • I have downloaded tar.gz first and then Installed it with ./configure,make,make install commands – Jatin Bodarya Nov 23 '12 at 04:32
  • Ok, I'll do the same and deliver my findings as a comment in a few hours. – hd1 Nov 23 '12 at 04:57
  • I haven't yet built it, because I have no idea how I can test SNMP on an Android tablet, but perusing the source, it looks like it logs to the option specified with the -L option. To log to a file, pass -Lf [filename] on start of the daemon and Bob's your uncle. – hd1 Nov 23 '12 at 05:07
  • -Lf does not provide snmp_log... it just provides logs of starting and running snmpd – Jatin Bodarya Nov 23 '12 at 05:19
0

In order to do debugging the following function need to be set

snmp_set_do_debugging(1);
anish
  • 6,884
  • 13
  • 74
  • 140