@node ntpsnmpd Invocation
@section Invoking ntpsnmpd
@pindex ntpsnmpd
@cindex NTP SNMP MIB agent
@ignore
#
# EDIT THIS FILE WITH CAUTION  (invoke-ntpsnmpd.texi)
#
# It has been AutoGen-ed  May 25, 2024 at 12:04:39 AM by AutoGen 5.18.16
# From the definitions    ntpsnmpd-opts.def
# and the template file   agtexi-cmd.tpl
@end ignore



@code{ntpsnmpd}
is an SNMP MIB agent designed to interface with
@code{ntpd(1ntpdmdoc)}.

This section was generated by @strong{AutoGen},
using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpsnmpd} program.
This software is released under the NTP license, <http://ntp.org/license>.

@menu
* ntpsnmpd usage::                  ntpsnmpd help/usage (@option{--help})
* ntpsnmpd agentxsocket::           agentxsocket option
* ntpsnmpd config::                 presetting/configuring ntpsnmpd
* ntpsnmpd exit status::            exit status
* ntpsnmpd Usage::                  Usage
* ntpsnmpd Notes::                  Notes
* ntpsnmpd Authors::                Authors
@end menu

@node ntpsnmpd usage
@subsection ntpsnmpd help/usage (@option{--help})
@cindex ntpsnmpd help

This is the automatically generated usage text for ntpsnmpd.

The text printed is the same whether selected with the @code{help} option
(@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
the usage text by passing it through a pager program.
@code{more-help} is disabled on platforms without a working
@code{fork(2)} function.  The @code{PAGER} environment variable is
used to select the program, defaulting to @file{more}.  Both will exit
with a status code of 0.

@exampleindent 0
@example
ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p18
Usage:  ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
  Flg Arg Option-Name    Description
   -n no  nofork         Do not fork
   -p no  syslog         Log to syslog()
      Str agentxsocket   The socket address ntpsnmpd uses to connect to net-snmpd
      opt version        output version information and exit
   -? no  help           display extended usage information and exit
   -! no  more-help      extended usage information passed thru pager
   -> opt save-opts      save the option state to a config file
   -< Str load-opts      load options from a config file
                                - disabled as '--no-load-opts'
                                - may appear multiple times

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.


The following option preset mechanisms are supported:
 - reading file $HOME/.ntprc
 - reading file ./.ntprc
 - examining environment variables named NTPSNMPD_*

Please send bug reports to:  <https://bugs.ntp.org, bugs@@ntp.org>
@end example
@exampleindent 4

@node ntpsnmpd agentxsocket
@subsection agentxsocket option
@cindex ntpsnmpd-agentxsocket

This is the ``the socket address ntpsnmpd uses to connect to net-snmpd'' option.
This option takes a string argument.
[<transport-specifier>:]<transport-address>
The default "agent X socket" is the Unix Domain socket
@file{unix:/var/agentx/master}.
Another common alternative is @file{tcp:localhost:705}.


@node ntpsnmpd config
@subsection presetting/configuring ntpsnmpd

Any option that is not marked as @i{not presettable} may be preset by
loading values from configuration ("rc" or "ini") files, and values from environment variables named @code{NTPSNMPD} and @code{NTPSNMPD_<OPTION_NAME>}.  @code{<OPTION_NAME>} must be one of
the options listed above in upper case and segmented with underscores.
The @code{NTPSNMPD} variable will be tokenized and parsed like
the command line.  The remaining variables are tested for existence and their
values are treated like option arguments.


@noindent
@code{libopts} will search in 2 places for configuration files:
@itemize @bullet
@item
$HOME
@item
$PWD
@end itemize
The environment variables @code{HOME}, and @code{PWD}
are expanded and replaced when @file{ntpsnmpd} runs.
For any of these that are plain files, they are simply processed.
For any that are directories, then a file named @file{.ntprc} is searched for
within that directory and processed.

Configuration files may be in a wide variety of formats.
The basic format is an option name followed by a value (argument) on the
same line.  Values may be separated from the option name with a colon,
equal sign or simply white space.  Values may be continued across multiple
lines by escaping the newline with a backslash.

Multiple programs may also share the same initialization file.
Common options are collected at the top, followed by program specific
segments.  The segments are separated by lines like:
@example
[NTPSNMPD]
@end example
@noindent
or by
@example
<?program ntpsnmpd>
@end example
@noindent
Do not mix these styles within one configuration file.

Compound values and carefully constructed string values may also be
specified using XML syntax:
@example
<option-name>
   <sub-opt>...&lt;...&gt;...</sub-opt>
</option-name>
@end example
@noindent
yielding an @code{option-name.sub-opt} string value of
@example
"...<...>..."
@end example
@code{AutoOpts} does not track suboptions.  You simply note that it is a
hierarchicly valued option.  @code{AutoOpts} does provide a means for searching
the associated name/value pair list (see: optionFindValue).

The command line options relating to configuration and/or usage help are:

@subsubheading version (-)

Print the program version to standard out, optionally with licensing
information, then exit 0.  The optional argument specifies how much licensing
detail to provide.  The default is to print just the version.  The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:

@table @samp
@item version
Only print the version.  This is the default.
@item copyright
Name the copyright usage licensing terms.
@item verbose
Print the full copyright usage licensing terms.
@end table

@node ntpsnmpd exit status
@subsection ntpsnmpd exit status

One of the following exit values will be returned:
@table @samp
@item 0 (EXIT_SUCCESS)
Successful program execution.
@item 1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
@item 66 (EX_NOINPUT)
A specified configuration file could not be loaded.
@item 70 (EX_SOFTWARE)
libopts had an internal operational error.  Please report
it to autogen-users@@lists.sourceforge.net.  Thank you.
@end table
@node ntpsnmpd Usage
@subsection ntpsnmpd Usage
@node ntpsnmpd Notes
@subsection ntpsnmpd Notes
@node ntpsnmpd Authors
@subsection ntpsnmpd Authors
