[Pkg-net-snmp-devel] snmpd option syntax changed

Mathieu Parent math.parent at gmail.com
Mon Oct 13 09:45:06 UTC 2008


reopen 486875 =
thanks

Hi,

2008/10/11 Thomas Viehmann <tv at beamnet.de>:
> Hi Matthieu,
>
> as per the help output of snmpd and snmpcmd(1) (referenced by snmpd(8))
> the logging command line options snmpd have indeed changed.
> This might be inconvenient, but I fail to see how this is a bug in the
> common sense of the word.

I know that the logging command line have changed but the way I want
corresponds to the current (5.4.1~dfsg-9) snmpcmd man page:

<<<<<<<<<=
LOGGING OPTIONS
       The  mechanism  and destination to use for logging of warning and error
       messages can be controlled by passing  various  parameters  to  the  -L
       flag.

       -Le    Log messages to the standard error stream.

       -Lf FILE
              Log messages to the specified file.

       -Lo    Log messages to the standard output stream.

       -Ls FACILITY
              Log  messages  via syslog, using the specified facility ('d' for
              LOG_DAEMON, 'u' for LOG_USER, or '0'-'7' for LOG_LOCAL0  through
              LOG_LOCAL7).


       There  are  also  "upper case" versions of each of these options, which
       allow the corresponding logging mechanism to be restricted  to  certain
       priorities of message.  Using standard error logging as an example:

       -LE pri
              will log messages of priority 'pri' and above to standard error.

       -LE p1-p2
              will log messages with priority between 'p1'  and  'p2'  (inclu-
              sive) to standard error.

       For  -LF  and  -LS  the priority specification comes before the file or
       facility token.  The priorities recognised are:

              0 or !  for LOG_EMERG,
              1 or a for LOG_ALERT,
              2 or c for LOG_CRIT,
              3 or e for LOG_ERR,
              4 or w for LOG_WARNING,
              5 or n for LOG_NOTICE,
              6 or i for LOG_INFO, and
              7 or d for LOG_DEBUG.

       Normal output is (or will be!) logged at a priority level of LOG_NOTICE
=>>>>>>>>>>

As I understand, "snmpd -LS 0-4 d" is wellformed and mean: log via
syslog under facility LOG_DAEMON restricted to priorities LOG_EMERG to
LOG_WARNING.


> Kind regards
>
> T.
>
> P.S.: When reopening, please CC the bug so everyone sees your explanation.
> --
> Thomas Viehmann, http://thomas.viehmann.net/
>

Mathieu Parent



More information about the Pkg-net-snmp-devel mailing list