Hi Niels,
            Right, I'm sorry, the blanks were wrong and those log were old.
After emptied the log file, it was never written again.

I made some tests and discovered that the problem was when the agent starts
using snmpd daemon. So, I started the agent directly with the binary,
passing to it the following parameters:

# /usr/local/sbin/snmpd -Lsd -Lf /var/log/snmpd.log -p /var/run/snmpd.pid

Doing it in this way, the logs were generated correctly.

Then, I started the agent again, but this time using the parameters that
you told me (-Dexample_scalar_int and -Dall):

# /usr/local/sbin/snmpd -Lsd -Dall -Lf /var/log/snmpd.log -p
/var/run/snmpd.pid

# /usr/local/sbin/snmpd -Lsd -Dexample_scalar_int -Lf /var/log/snmpd.log -p
/var/run/snmpd.pid

Now I can read the debug mesages from the log file!

Thanks
Regards,
Juan I. Bussoli.


2013/6/27 Niels Baggesen <n...@users.sourceforge.net>

> Den 27-06-2013 18:34, Juan Bússoli skrev:
>
>  After making these changes, the SET operation it works (which writes in
>> a text file), so then I added also the GET operation (which read in the
>> same text file) and it works too! :)
>>
>
> good
>
>
>  As for adding some debug output, I do not know where I can find the
>> records.
>> For example, I understand that the next block of code writes debug
>> messages:
>>
>> DEBUGMSGTL (("example_scalar_int"
>>                  "Initalizing int scalar example. Default value =% ld \
>> n",
>>                  example1));
>>
>> Also, I run the agent through the snmpd daemon, which runs the binary
>> with the following parameters:
>>
>> SNMPDOPTS = '-Lsd-Lf / var / log / snmpd.log-p / var / run / snmpd.pid'
>>
>> start-stop-daemon - quiet - start - oknodo - exec / usr / local / sbin /
>> snmpd \
>> - $ SNMPDOPTS
>>
>
> Is it your mail program that mishandles blanks? This does not look like
> anything that would ever work ...
>
>
>  I have checked the log file and this is what i get:
>>
>> $ cat /var/log/snmpd.log
>> getaddrinfo: start Name or service not known
>> Error opening specified endpoint "start"
>> Server Exiting with code 1
>>
>
> This shows that snmpd never started. How did you manage to give snmpd that
> "start" parameter?
>
> Anyway, if you want to see the debug output, you need to give a -D
> parameter, either -Dall which will give an enormous amount from any dbug
> statement, or -Dexample_scalar_int to just get your example.
>
>
>  Considering all this, could you help me find where logs are being saved?
>> I'm running the agent correctly?
>>
>
> Something surely was wrong as the agent tried to listen on the "start"
> address
>
> /Niels
>
> --
> Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
> The purpose of computing is insight, not numbers   ---   R W Hamming
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to