Re: snmptrapd -A append not working

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 27/11/2007, Ben Carbery <[email protected]> wrote:
>  The man page indicates -A should cause traps to be appended to the
>  file, but adding this option cause the service to fail.
>
>  e.g.
>  OPTIONS="-c /etc/snmp/snmptrapd.conf -LAf /var/snmp/snmptrapd.log
>      -p /var/run/snmptrapd.pid"

No - that won't work.
-A is an option in its own right - it's not a sub-option of the -L flag.

>  or
>  OPTIONS="-c /etc/snmp/snmptrapd.conf -Lf /var/snmp/snmptrapd.log -A
>     -p  /var/run/snmptrapd.pid"

Hmmm.... I would have expected that to work....

>  The -H output seems to omit append as a supported option.

-H just lists the snmptrapd.conf directives.
It doesn't list the command-line options.  Use '-h' for that.



>  Is it the case that this option is no longer supported?

No.  It *is* supported, but you're discovered a problem
with the implementation.

The -A option sets an internal flag to control whether
log files should be truncated or appended to.
The -Lf option looks at this flag when it's opening the
specified log file, and acts accordingly.

But it works using the value of this internal flag at
the time that the -Lf option is parsed - which in this
case is *before* the -A option is processed.

Try
>  OPTIONS="-c /etc/snmp/snmptrapd.conf -A  -Lf /var/snmp/snmptrapd.log
>     -p  /var/run/snmptrapd.pid"

I'll update the documentation to mention this.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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.