admportmonitor(1M) DG/UX R4.11MU05 admportmonitor(1M)
NAME
admportmonitor - manage port monitors
SYNOPSIS
admportmonitor -o add -t type [ -c command ] [ -e | -d ] [ -r rst-
count ] [ -s | -p ] [ -x version ] [ -y comment ] [ -z
script ] pmtag
admportmonitor -o delete pmtag ...
admportmonitor -o disable pmtag ...
admportmonitor -o enable pmtag ...
admportmonitor -o modify [ -e | -d ] [ -r rst-count ] [ -s | -p ] [
-z script ] pmtag
admportmonitor -o start pmtag ...
admportmonitor -o stop pmtag ...
admportmonitor -o list [ -qv ] [ -t type | pmtag ... ]
DESCRIPTION
Beginning with DG/UX Release 5.4, the Service Access Facility
generalizes the procedures for service access so that login access on
a local system and network access to local services are managed in
essentially the same way.
admportmonitor manages port monitors under control of sac(1M) (the
Service Access Controller for the Service Access Facility). The
Service Access Controller is the overseer of the server machine.
sac is the Service Access Facility's controlling process and is
started by init(1M). Its function is to maintain the port monitors
on the system in the state specified by the system administrator.
These states include: STARTING, ENABLED, DISABLED, STOPPING,
NOTRUNNING, and FAILED. (A port monitor enters the FAILED state if
sac cannot start it after a specified number of tries.) A port
monitor, from sac's point of view, is simply a process with which it
communicates in a well-defined way.
sac is responsible for starting port monitors, attempting to restart
them whenever they fail, and passing state-change requests to them.
Each port monitor process managed by sac is identified by a unique,
alphanumeric name referred to as the port monitor tag (pmtag).
DG/UX provides two types of port monitors, ttymon(1M) and listen(1M),
which are described briefly below. Systems may also contain other
types of port monitors, including port monitors written expressly for
a user's application.
A ttymon port monitor manages local access to the login(1)
service--although it is not limited to the login service. It
performs the functions which were formerly handled by getty(1M) in
releases prior to DG/UX 5.4. Unlike getty, however, a single ttymon
port monitor can support multiple ports. A ttymon port monitor is
responsible for monitoring these ports and for invoking the service
associated with a given port (e.g. login) when it it receives a
connection request on that port. (The login service is the most
commonly invoked service for a port; however, a port may be
configured to invoke alternative services.)
A listen port monitor manages a TLI-based, connection-oriented
transport network. It is responsible for receiving incoming
connection requests, accepting them, and invoking the services that
have been requested.
Operations
add Add a new port monitor to the list of managed port monitors
in the sac administrative file (/etc/saf/_sactab). This
operation may also start and enable the new port monitor
based on the options specified.
delete Remove one or more port monitors from the set of port
monitors administered by sac. If a port monitor that is to
be removed is currently running, it will be stopped.
disable Disable one or more running port monitors. A disabled port
monitor continues to run but denies any service requests it
receives from the port(s) it is monitoring.
enable Enable one or more disabled port monitors.
modify Change the attributes of a port monitor.
start Start one or more stopped port monitors.
stop Stop one or more currently running port monitors. Stopping
a port monitor terminates its process.
list List information about one or more port monitors. If -t
type is given, information is listed about all port
monitors of that type. If a list of port monitors is
given, information is listed about each of the pmtags
listed; if pmtag is all, information is listed about all
port monitors in the sac administrative file.
Options
-c command
The command string which is to be executed to start the
port monitor. If -c is not specified and a ttymon or
listen port monitor is being added, command defaults to
/usr/lib/saf/ttymon or /usr/lib/saf/listen, respectively.
The -c option is required when adding port monitors of all
other types.
-e and -d These options are used to specify what the initial state of
the port monitor should be when it is started. If -e is
specified, the port monitor will start in the ENABLED
state. If -d is specified, the port monitor will start in
the DISABLED state. If neither of these options is
specified for the add operation, -e is implied.
-q "Quiet." Produce an unformatted listing (i.e. no headers,
fields delimited by colons).
-r rst-count
Restart count. Normally, sac (the Service Access
Controller) attempts to restart port monitors that
terminate unexpectedly. The restart count indicates the
number of times sac should attempt to restart the port
monitor before giving up and setting its state to FAILED.
The default rst-count is 0.
-s and -p These options are used to specify whether the port monitor
should be started. If -s is specified, the port monitor
will be started immediately when it is added via the add
operation and whenever sac is initially invoked by init at
system startup time. If -p is specified, the port monitor
will not be automatically started by sac; it must, instead,
be explicitly started by the system administrator. If
neither of these options is specified for the add
operation, -s is implied.
-t type Specifies the port monitor type (e.g. ttymon, listen).
-v "Verbose." Produce a formatted listing with headers and
aligned columns. This is the default output format.
-x version
Specifies the version number of the port monitor. This
version number may be given as
-x `pmspec -V`
where pmspec is the special administrative command for port
monitor pmtag. This special command is ttyadm(1M) for
ttymon and nlsadmin(1M) for listen. The version stamp of
the port monitor is known by the command and is returned
when pmspec is invoked with a -V option.
If a ttymon or listen port monitor is being added and -x is
not specified, version defaults to the version number
returned by ttyadm -V or nlsadmin -V, respectively. The -x
option is required when adding port monitors of all other
types.
-y comment
Include comment in the _sactab entry for port monitor
pmtag.
-z script Specifies the name of a configuration script to be run when
the port monitor is started. This configuration script can
be used to set the environment for the port monitor. See
doconfig(3N) for more information.
Output
The list operation reports the following port monitor information to
stdout: name, type, flags, restart count, state, invoking command
and comments. With the "verbose" (-v) format, information is
printed in aligned columns with column headers. With the "quiet"
format (-q), headers are suppressed and each port monitor entry is
printed on a separate line. Fields within each entry are delimited
by a colon and are in the following order:
Field Description
1 port monitor tag
2 port monitor type
3 flags (d = do not enable, x = do not start)
4 restart count
5 state (STARTING, ENABLED, DISABLED, STOPPING, NOTRUNNING,
FAILED)
6 command used to invoke the port monitor optionally followed
by "#" and a comment
FILES
/etc/saf/_sactab
sac administrative file
/etc/saf/pmtag/_config
Per-port monitor configuration file.
DIAGNOSTICS
Errors
admportmonitor uses sacadm(1M) to perform the requested operation for
the port monitor(s). It reports any error conditions returned by
sacadm.
Exit Codes
0 The operation was successful.
1 The operation was unsuccessful.
2 The operation failed due to access restrictions.
3 There was an error in the command line.
SEE ALSO
login(1), admportservice(1M), listen(1M), nlsadmin(1M), sac(1M),
sacadm(1M), ttyadm(1M), ttymon(1M), doconfig(3N),
appropriate_privilege(5).
cap_defaults(5).
Managing the DG/UX System.
NOTES
You must have appropriate privilege to perform all operations except
list. For systems supporting the DG/UX Capability Option,
appropriate privilege is defined as having one or more specific
capabilities enabled in the effective capability set of the user.
See cap_defaults(5) for the default capabilities for this command.
On systems without the DG/UX Capability Option, appropriate privilege
means that your process has an effective UID of root. See the
appropriate_privilege(5) man page for more information.
Licensed material--property of copyright holder(s)