Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Command line arguments

&pagelevel(4)&pagelevel

Configuration directives from configuration files (relative to the given binary) could be passed via command line too. For this specify it like this:

--CONF_DIRECTIVE="VALUE1[ VALUE2...]"

Example:

snmpd --rwcommunity="public "

There are also command line arguments, which are binary specific and can be retrieved via calling the binary with --help directive. Some of them could not be configured via configuration files. Next table will explore some important options, which could be used by master, agents and SNMP tools.

Option

Description

General options

-m MIBLIST

use MIBLIST instead of the default MIB list

-M DIRLIST

use DIRLIST as the list of locations to look for MIBs

-d

Dump (in hexadecimal) the raw SNMP packets sent and received.

-D[TOKEN[,...]]

Turn on debugging output for the given TOKEN(s). For specific available tokens,
please refer to section “Debug options”.

-H

Display a list of configuration file directives understood by the command and then
exit.

-f

do not fork from the shell

-p FILE

store process id in FILE

-L

Logging options

-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,'0'-'7' for LOG_LOCAL0 - LOG_LOCAL7)

-LE pri

Log messages of priority 'pri' and above to standard error.

-LS pri

similar as previous, but logging to syslog

-LE p1-p2

Log messages with priority between ‘p1’ and 'p2' (inclusive) to standard error.

-LS p1-p2

similar as previous, but logging to syslog

Daemons specific options

-c FILE[,...]

read FILE(s) as configuration file(s)

-C

do not read the default configuration files

-x ADDRESS

use ADDRESS as AgentX address

-X

run as an AgentX master

snmpd specific options

-a

log addresses

-q

print information in a more parsable format

snmptrapd options

-a

ignore authentication failure traps

-n

use numeric addresses instead of attempting hostname lookups (no DNS)

-t

Prevent traps from being logged to syslog

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

Priority levels

Means

0 or !

LOG_EMERG

1 or a

LOG_ALERT

2 or c

LOG_CRIT

3 or e

LOG_ERR

4 or w

LOG_WARNING

5 or n

LOG_NOTICE

6 or i

LOG_INFO

7 or d

LOG_DEBUG

By default, output is logged to the syslog at a priority level of LOG_INFO.