<chapter id="modsafapp-84569"><title>Managing Serial
Ports With the Service Access Facility (Tasks)</title><highlights><para>This chapter describes how to manage serial port services using the
Service Access Facility (SAF). </para><para>Also included in this chapter is information on how to perform console
administration with the Service Management Facility (SMF).</para><note><para>The SAF and SMF are two different tools in the Solaris OS. Starting
with the Solaris 10 release, <command>ttymon</command> invocations on the
system console are now managed by SMF. The SAF tool is still used to administer
terminals, modems, and other network devices.</para>
</note><itemizedlist><para>This is a list of the overview information in this chapter.</para><listitem><para><olink targetptr="modsafapp-20081" remap="internal">Using the Service Access
Facility</olink></para>
</listitem><listitem><para><olink targetptr="modsafapp-33566" remap="internal">Overall SAF Administration
(sacadm)</olink></para>
</listitem><listitem><para><olink targetptr="modsafapp-10269" remap="internal">Port Monitor Service Administration
(pmadm)</olink></para>
</listitem><listitem><para><olink targetptr="modsafapp-7" remap="internal">TTY Monitor and Network Listener
Port Monitors</olink></para>
</listitem>
</itemizedlist><itemizedlist><para>For information on the step-by-step procedures that are associated with
managing serial ports , see the following:</para><listitem><para><olink targetptr="emrab" remap="internal">Managing Serial Ports (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="eoqln" remap="internal">Administering ttymon services (Task
Map)</olink></para>
</listitem>
</itemizedlist><para>For reference information about the SAF, see <olink targetptr="modsafapp-92630" remap="internal">Service Access Facility Administration (Reference)</olink>.</para>
</highlights><sect1 id="emrab"><title>Managing Serial Ports (Task Map)</title><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="33*"/><colspec colwidth="33*"/><colspec colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Perform console administration.</para>
</entry><entry><para> You might need to perform the following console administration tasks: </para><itemizedlist><listitem><para>Set the <command>ttymon</command> console terminal type.</para><para>Starting with the Solaris 10 release, you must use the <command>svccfg</command> command
to specify the <command>ttymon</command> console terminal type.</para>
</listitem><listitem><para>Set the <command>ttymon</command> console terminal baud rate
speed.</para>
</listitem>
</itemizedlist>
</entry><entry><para></para><para><olink targetptr="fdzue" remap="internal">How to Set the ttymon Console Terminal Type</olink></para><para></para><para><olink targetptr="fxcgt" remap="internal">How to Set the Baud Rate Speed on the ttymon
Console Terminal</olink></para>
</entry>
</row><row><entry><para>Add a <literal>ttymon</literal> port monitor.</para>
</entry><entry><para>Use the <command>sacadm</command> command to add a <literal>ttymon</literal> port
monitor.</para>
</entry><entry><para><olink targetptr="modsafapp-10" remap="internal">How to Add a ttymon Port Monitor</olink></para>
</entry>
</row><row><entry><para>View a <literal>ttymon</literal> port monitor status.</para>
</entry><entry><para>Use the <command>sacadm</command> command to view <literal>ttymon</literal> port
monitor status.</para>
</entry><entry colsep="0" rowsep="1"><para><olink targetptr="modsafapp-11" remap="internal">How to View ttymon Port Monitor Status</olink></para>
</entry>
</row><row><entry><para>Stop a <literal>ttymon</literal> port monitor.</para>
</entry><entry><para>Use the <command>sacadm</command> command to stop a <literal>ttymon</literal> port
monitor.</para>
</entry><entry colsep="0" rowsep="1"><para><olink targetptr="modsafapp-12" remap="internal">How to Stop a ttymon Port Monitor</olink></para>
</entry>
</row><row><entry><para>Start a <literal>ttymon</literal> port monitor.</para>
</entry><entry><para>Use the <command>sacadm</command> command to start a <literal>ttymon</literal> port
monitor.</para>
</entry><entry><para><olink targetptr="modsafapp-13" remap="internal">How to Start a ttymon Port Monitor</olink></para>
</entry>
</row><row><entry><para>Disable a <literal>ttymon</literal> port monitor.</para>
</entry><entry><para>Use the <command>sacadm</command> command to disable a <literal>ttymon</literal> port
monitor.</para>
</entry><entry><para><olink targetptr="modsafapp-14" remap="internal">How to Disable a ttymon Port Monitor</olink></para>
</entry>
</row><row><entry><para>Enable a <literal>ttymon</literal>port monitor.</para>
</entry><entry><para>Use the <command>sacadm</command> command to enable a <literal>ttymon</literal> port
monitor.</para>
</entry><entry><para><olink targetptr="modsafapp-15" remap="internal">How to Enable a ttymon Port Monitor</olink></para>
</entry>
</row><row><entry><para>Remove a <literal>ttymon</literal> port monitor.</para>
</entry><entry><para>Use the <command>sacadm</command> command to remove a <literal>ttymon</literal> port
monitor.</para>
</entry><entry><para><olink targetptr="modsafapp-16" remap="internal">How to Remove a ttymon Port Monitor</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="modsafapp-20081"><title>Using the Service Access Facility</title><para>You can set up terminals and modems with the Solaris Management Console's
Serial Ports tool  or the SAF commands.</para><para>The SAF is a tool that is used to administer
terminals, modems, and other network devices. The top-level SAF program is
the Service Access Controller (SAC). The SAC controls port monitors that you
administer through the <command>sacadm</command> command. Each port monitor
can manage one or more ports.   </para><para>You administer the services associated with ports through the <command>pmadm</command> command. While services provided through the SAC can differ from
network to network, the SAC and its administrative commands, <command>sacadm</command> and <command>pmadm</command>, are network independent.</para><para>The following table describes the SAF control hierarchy. The <command>sacadm</command> command is used to administer the SAC, which controls the <command>ttymon</command> and <command>listen</command> port monitors. </para><para>The services
of <command>ttymon</command> and <command>listen</command> are in turn controlled
by the <command>pmadm</command> command. One instance of <command>ttymon</command> can
service multiple ports. One instance of <command>listen</command> can provide
multiple services on a network interface. </para><table frame="topbot" id="modsafapp-35017"><title>SAF Control Hierarchy</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="column1" colwidth="108*"/><colspec colname="column2" colwidth="72*"/><colspec colname="column3" colwidth="180*"/><thead><row rowsep="1"><entry><para>Function</para>
</entry><entry><para>Program</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para>Overall administration</para>
</entry><entry><para><command>sacadm</command></para>
</entry><entry><para>Command for adding and removing port monitors</para>
</entry>
</row><row><entry><para>Service Access Controller</para>
</entry><entry><para><command>sac</command></para>
</entry><entry><para>SAF's master program</para>
</entry>
</row><row><entry><para>Port monitors</para>
</entry><entry><para><command>ttymon</command> </para><para><command>listen</command></para>
</entry><entry><para>Monitors serial port login requests</para><para>Monitors requests for network services</para>
</entry>
</row><row><entry><para>Port monitor service administrator</para>
</entry><entry><para><command>pmadm</command></para>
</entry><entry><para>Command for controlling port monitors services</para>
</entry>
</row><row><entry><para>Services</para>
</entry><entry><para>logins, remote procedure calls</para>
</entry><entry><para>Services to which the SAF provides access</para>
</entry>
</row><row><entry><para>Console administration</para>
</entry><entry><para>console login</para>
</entry><entry><para>Console services are managed by the SMF service, <literal>svc:/system/console-login:default</literal>. This service invokes the <command>ttymon</command> port monitor.
Do not use the <command>pmadm</command> or the <command>sacadm</command> command
to manage the console. For more information, see <olink targetptr="modsafapp-38" remap="internal">ttymon and the Console Port</olink>, <olink targetptr="fdzue" remap="internal">How to Set the
ttymon Console Terminal Type</olink>, and <olink targetptr="fxcgt" remap="internal">How to
Set the Baud Rate Speed on the ttymon Console Terminal</olink>.</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="modsafapp-33566"><title>Overall SAF Administration (<command>sacadm</command>)</title><para>The <command>sacadm</command> command
is the top level of the SAF. The <command>sacadm</command> command primarily
is used to add and remove port monitors such as <command>ttymon</command> and <command>listen</command>. Other <command>sacadm</command> functions include listing
the current status of port monitors and administering port monitor configuration
scripts. </para><sect2 id="modsafapp-1"><title>Service Access Controller (SAC Program)</title><para>The Service Access Controller program (SAC) oversees all port
monitors. A system automatically starts the SAC upon entering multiuser mode.</para><para>When the SAC program is invoked, it first looks for, and interprets,
each system's configuration script. You can use the configuration script to
customize the SAC program environment. This script is empty by default. The
modifications made to the SAC environment are inherited by all the &ldquo;children&rdquo;
of the SAC. This inherited environment might be modified by the children.</para><para>After the SAC program has interpreted the per-system configuration script,
the SAC program reads its administrative file and starts the specified port
monitors. For each port monitor, the SAC program runs a copy of itself, forking
a child process. Each child process then interprets its per-port monitor configuration
script, if such a script exists.</para><para>Any modifications to the environment specified in the per-port monitor
configuration script affect the port monitor and will be inherited by all
its children. Finally, the child process runs the port monitor program by
using the command found in the SAC program administrative file.</para>
</sect2><sect2 id="modsafapp-2"><title>SAC Initialization Process</title><para>The following steps summarize what happens when SAC is first started: </para><orderedlist><listitem><para>The SAC program is started by the SMF service, <literal>svc:/system/sac:default</literal>.</para>
</listitem><listitem><para>The SAC program reads <filename>/etc/saf/_sysconfig</filename>,
the per-system configuration script.</para>
</listitem><listitem><para>The SAC program reads <filename>/etc/saf/_sactab</filename>,
the SAC administrative file.</para>
</listitem><listitem><para>The SAC program forks a child process for each port monitor
it starts.</para>
</listitem><listitem><para>Each port monitor reads <filename>/etc/saf/pmtag/_config</filename>,
the per-port monitor configuration script.</para>
</listitem>
</orderedlist>
</sect2>
</sect1><sect1 id="modsafapp-10269"><title>Port Monitor Service Administration (<command>pmadm</command>)</title><para>The <command>pmadm</command> command
enables you to administer port monitors' services. In particular, you use
the <command>pmadm</command> command to add or remove a service and to enable
or disable a service. You can also install or replace per-service configuration
scripts, or print information about a service. </para><para>Each instance of a service must be uniquely identified by a port monitor
and a port. When you use the <command>pmadm</command> command to administer
a service, you specify a particular port monitor with the <replaceable>pmtag</replaceable> argument,
and a particular port with the <replaceable>svctag</replaceable> argument.</para><para>For each port monitor type, the SAF requires a specialized command to
format port monitor-specific configuration data. This data is used by the <command>pmadm</command> command. For <command>ttymon</command> and <command>listen</command> type
port monitors, these specialized commands are <command>ttyadm</command> and <command>nlsadmin</command>, respectively.</para><sect2 id="modsafapp-3"><title><command>ttymon</command> Port Monitor</title><para>Whenever you attempt to log in by using a directly connected modem or
alphanumeric terminal, <command>ttymon</command> goes to work. First, the
SAC process is started by SMF. Then, the SAC automatically starts the port
monitors that are designated in its administrative file, <filename>/etc/saf/_sactab</filename>. After the <command>ttymon</command> port monitor has been started,
it monitors the serial port lines for service requests.</para><para>When someone
attempts to log in by using an alphanumeric terminal or a modem, the serial
port driver passes the activity to the operating system. The <literal>ttymon</literal> port
monitor notes the serial port activity, and attempts to establish a communications
link. The <command>ttymon</command> port monitor determines which data transfer
rate, line discipline, and handshaking protocol are required to communicate
with the device.  </para><para>After the proper parameters for communication with the modem or terminal
are established, the <literal>ttymon</literal> port monitor passes these parameters
to the login program and transfers control to it.</para>
</sect2><sect2 id="modsafapp-5"><title>Port Initialization Process</title><para>When an instance of the <literal>ttymon</literal> port monitor is invoked
by the SAC, <command>ttymon</command> starts to monitor its ports. For each
port, the <literal>ttymon</literal> port monitor first initializes the line
disciplines, if they are specified, and the speed and terminal settings. The
values used for initialization are taken from the appropriate entry in the <filename>/etc/ttydefs</filename> file.</para><para>The <literal>ttymon</literal> port monitor then writes the prompt and
waits for user input. If the user indicates that the speed is inappropriate
by pressing the Break key, the <literal>ttymon</literal> port monitor tries
the next speed and writes the prompt again.</para><para>If <emphasis>autobaud</emphasis> is enabled for a port, the <literal>ttymon</literal> port monitor tries to determine the baud rate on the port automatically.
Users must press Return before the <literal>ttymon</literal> port monitor
can recognize the baud rate and print the prompt.</para><itemizedlist><para>When valid input is received, the <literal>ttymon</literal> port monitor
does the following tasks:</para><listitem><para>Interprets the per-service configuration file for the port</para>
</listitem><listitem><para>Creates an <filename>/etc/utmpx</filename> entry, if required</para>
</listitem><listitem><para>Establishes the service environment</para>
</listitem><listitem><para>Invokes the service associated with the port</para>
</listitem>
</itemizedlist><para>After the service terminates, the <literal>ttymon</literal> port
monitor cleans up the <filename>/etc/utmpx</filename> entry, if this entry
exists, and returns the port to its initial state.  </para>
</sect2><sect2 id="modsafapp-6"><title>Bidirectional Service</title><itemizedlist><para>If a port is configured for bidirectional service, the <literal>ttymon</literal> port
monitor does the following:</para><listitem><para>Allows users to connect to a service</para>
</listitem><listitem><para>Allows the <command>uucico</command>, <command>cu</command>,
or <command>ct</command> commands to use the port for dialing out, if the
port is free</para>
</listitem><listitem><para>Waits to read a character before printing a prompt</para>
</listitem><listitem><para>Invokes the port's associated service, without sending the
prompt message, when a connection is requested, if the connect-on-carrier
flag  is set</para>
</listitem>
</itemizedlist>
</sect2>
</sect1><sect1 id="modsafapp-7"><title>TTY Monitor and Network Listener Port Monitors</title><para>Though the SAF provides a generic means for administering any future
or third-party port monitors, only two port monitors are implemented in the Solaris Operating System: <literal>ttymon</literal> and <literal>listen</literal>.</para><sect2 id="modsafapp-8"><title>TTY Port Monitor (<literal>ttymon</literal>)</title><itemizedlist><para>The <literal>ttymon</literal> port monitor is STREAMS-based and does
the following:</para><listitem><para>Monitors ports</para>
</listitem><listitem><para>Sets terminal modes, baud rates, and line disciplines</para>
</listitem><listitem><para>Invokes the login process</para>
</listitem>
</itemizedlist><para>The <literal>ttymon</literal> port monitor provides Solaris users the
same services that the <command>getty</command> port monitor did under previous
versions of SunOS 4.1 software.</para><para>The <literal>ttymon</literal> port monitor runs under the SAC program
and is configured with the <command>sacadm</command> command. Each instance
of <literal>ttymon</literal> can monitor multiple ports. These ports are specified
in the port monitor's administrative file. The administrative file is configured
by using the <command>pmadm</command> and <command>ttyadm</command> commands.</para>
</sect2><sect2 id="modsafapp-38"><title><literal>ttymon</literal> and the Console
Port</title><para>Console services are not managed by the Service Access Controller (SAC),
nor by any explicit <command>ttymon</command> administration file. <command>ttymon</command> invocations are managed by SMF. As a result, you can no longer
invoke <command>ttymon</command> by adding an entry to the <filename>/etc/inittab</filename> file. A property group with the type, <literal>application</literal>,
and the name <command>ttymon</command>, has been added to the SMF service, <literal>svc:/system/console-login:default</literal>. The properties within this property
group are used by the method script, <command>/lib/svc/method/console-login</command>.
This script uses the property values as arguments to the <command>ttymon</command> invocation.
Usually, if the values are empty, or if the values are not defined for any
of the properties, then the value is not used for <command>ttymon</command>.
However, if the <command>ttymon</command> device value is empty, or not set,
then <filename>/dev/console</filename> is used as the default to enable <command>ttymon</command> to run.</para><para>The following properties are available under the SMF service, <literal>svc:/system/console-login:default</literal>:</para><variablelist><varlistentry><term><literal>ttymon/nohangup</literal></term><listitem><para>Specifies the <literal>nohangup</literal> property. If set
to <literal>true</literal>, do not force a line hang up by setting the line
speed to zero before setting the default or specified speed.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ttymon/prompt</literal></term><listitem><para>Specifies the prompt string for the console port.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ttymon/terminal_type</literal></term><listitem><para>Specifies the default terminal type for the console.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ttymon/device</literal></term><listitem><para>Specifies the console device.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ttymon/label</literal></term><listitem><para>Specifies the TTY label in the <filename>/etc/ttydefs</filename> line.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2><sect2 id="modsafapp-10122"><title><literal>ttymon</literal>-Specific Administrative
Command (<command>ttyadm</command>)</title><para>The <command>ttymon</command> administrative file is updated by the <command>sacadm</command> and <command>pmadm</command> commands, as well as by the <command>ttyadm</command> command. The <command>ttyadm</command> command formats <command>ttymon</command>-specific information and writes it to standard output, providing
a means for presenting formatted <literal>ttymon</literal>-specific data to
the <command>sacadm</command> and <command>pmadm</command> commands. </para><para>Thus, the <command>ttyadm</command> command does not administer <literal>ttymon</literal> directly. The <command>ttyadm</command> command complements the
generic administrative commands, <command>sacadm</command> and <command>pmadm</command>.
For more information, see the <olink targetdoc="refman" targetptr="ttyadm-1m" remap="external"><citerefentry><refentrytitle>ttyadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</sect2><sect2 id="modsafapp-9"><title>Network Listener Service (<command>listen</command>)</title><itemizedlist><para>The <command>listen</command> port monitor runs under the SAC and does
the following:</para><listitem><para>Monitors the network for service requests</para>
</listitem><listitem><para>Accepts requests when they arrive</para>
</listitem><listitem><para>Invokes servers in response to those service requests</para>
</listitem>
</itemizedlist><para>The <command>listen</command> port monitor is configured by using the <command>sacadm</command> command. Each instance of <command>listen</command> can provide
multiple services. These services are specified in the port monitor's administrative
file. This administrative file is configured by using the <command>pmadm</command> and <command>nlsadmin</command> commands.</para><para>The network listener process can be used with any connection-oriented
transport provider that conforms to the Transport Layer Interface (TLI) specification.
In the Solaris Operating System, <command>listen</command> port monitors can provide additional
network services not provided by the <command>inetd</command> service.</para>
</sect2><sect2 id="modsafapp-93595"><title>Special <command>listen</command>-Specific
Administrative Command (<command>nlsadmin</command>)</title><para>The <command>listen</command> port monitor's administrative file is
updated by the <command>sacadm</command> and <command>pmadm</command> commands,
as well as by the <command>nlsadmin</command> command. The <command>nlsadmin</command> command
formats <command>listen</command>-specific information and writes it to standard
output, providing a means of presenting formatted <command>listen</command>-specific
data to the <command>sacadm</command> and <command>pmadm</command> commands.</para><para>Thus, the <command>nlsadmin</command> command does not administer <command>listen</command> directly. The command complements the generic administrative
commands, <command>sacadm</command> and <command>pmadm</command>. </para><para>Each network, configured separately, can have at least one instance
of the network listener process associated with it. The <command>nlsadmin</command> command
controls the operational states of <command>listen</command> port monitors.</para><para>The <command>nlsadmin</command> command can establish a <command>listen</command> port
monitor for a given network, configure the specific attributes of that port
monitor, and <replaceable>start</replaceable> and <replaceable>kill</replaceable> the
monitor. The <command>nlsadmin</command> command can also report on the <command>listen</command> port monitors on a machine.</para><para>For more information, see the <olink targetdoc="refman" targetptr="nlsadmin-1m" remap="external"><citerefentry><refentrytitle>nlsadmin</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</sect2>
</sect1><sect1 id="modsafapp-81679"><title>Administering <literal>ttymon</literal> Port
Monitors</title><para>Console administration for <command>ttymon</command> is now managed
by SMF. Use the <command>svccfg</command> command to set <command>ttymon</command> system
console properties. Continue to use the SAF command, <command>sacadm</command>,
to add, list, remove, kill, start, enable, disable, enable, and remove <literal>ttymon</literal> port monitors.</para><task id="fdzue"><title>How to Set the <command>ttymon</command> Console Terminal
Type</title><tasksummary><para>This procedure shows how to change the console terminal type by using
the <command>svccfg</command> command.</para>
</tasksummary><procedure>&rolestep.sgm;<step><para>Run the <command>svccfg</command> command to set the property
for the service instance that you want to change.</para><screen># <userinput>svccfg -s console-login setprop ttymon/terminal_type = "xterm"</userinput></screen><para>where &ldquo;<literal>xterm</literal>&rdquo; is an example of a terminal
type that you might want to use.</para>
</step><step><para>(Optional) Restart the service instance.</para><screen># <userinput>svcadm restart svc:/system/console-login:default</userinput></screen><caution><para>If you choose to restart the service instance immediately,
you are logged out of the console. If you do not restart the service instance
immediately, the property changes apply at the next login prompt on the console.</para>
</caution>
</step>
</procedure>
</task><task id="fxcgt"><title>How to Set the Baud Rate Speed on the <command>ttymon</command> Console
Terminal</title><tasksummary><para>This procedure shows how to set the baud rate speed on the <command>ttymon</command> console
terminal. Support for console speeds on x86 based systems are dependent on
the specific platform. </para><itemizedlist><para>The following are supported console speeds for SPARC based systems:</para><listitem><para><literal>9600 bps</literal></para>
</listitem><listitem><para><literal>19200 bps</literal></para>
</listitem><listitem><para><literal>38400 bps</literal></para>
</listitem>
</itemizedlist>
</tasksummary><procedure>&rolestep.sgm;<step><para>Use the <command>eeprom</command> command to set a baud rate speed
that is appropriate for your system type.</para><screen># <userinput>eeprom ttya-mode=<replaceable>baud-rate</replaceable>,8,n,1,-</userinput></screen><para>For example, to change the baud rate on an x86 based system's console
to <literal>38400</literal>, type:</para><screen># <userinput>eeprom ttya-mode=38400,8,n,1,-</userinput></screen>
</step><step><para>Change the console line in the <filename>/etc/ttydefs</filename> file
as follows.</para><screen>console <replaceable>baud-rate</replaceable> hupcl opost onlcr:<replaceable>baud-rate</replaceable>::console</screen>
</step><step><para>Make the following additional changes for your system type.</para><para>Note that these changes are platform-dependent.</para><itemizedlist><listitem><para><emphasis role="strong">On SPARC based systems:</emphasis> Change
the baud rate speed in the <filename>/kernel/drv/options.conf</filename> file.</para><para>Use the following command to change the baud rate to <literal>9600</literal>.</para><screen width="100"># <userinput>9600             :bd:
ttymodes="2502:1805:bd:8a3b:3:1c:7f:15:4:0:0:0:11:13:1a:19:12:f:17:16";</userinput></screen><para>Use the following command to change the baud rate speed to <literal>19200</literal>.</para><screen width="100"># <userinput>19200            :be:
ttymodes="2502:1805:be:8a3b:3:1c:7f:15:4:0:0:0:11:13:1a:19:12:f:17:16";</userinput></screen><para>Use the following command to change the baud rate speed to <literal>38400</literal>.</para><screen width="100"># <userinput>38400            :bf:
ttymodes="2502:1805:bf:8a3b:3:1c:7f:15:4:0:0:0:11:13:1a:19:12:f:17:16";</userinput></screen>
</listitem><listitem><para><emphasis role="strong">On x86 based systems:</emphasis> Change
the console speed if the BIOS serial redirection is enabled. The method that
you use to change the console speed is platform-dependent.</para>
</listitem>
</itemizedlist>
</step>
</procedure>
</task><task id="modsafapp-10"><title>How to Add a <literal>ttymon</literal> Port
Monitor</title><procedure>&rolestep.sgm;<step id="modsafapp-step-42"><para>Add
a <literal>ttymon</literal> port monitor.</para><screen># <userinput>sacadm -a -p mbmon -t ttymon -c /usr/lib/saf/ttymon -v `ttyadm</userinput>
<userinput>-V` -y "TTY Ports a &amp; b"</userinput></screen><variablelist><varlistentry><term><option>a</option></term><listitem><para>Specifies the <emphasis>add</emphasis> port monitor option.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry><varlistentry><term><option>t</option></term><listitem><para>Specifies the port monitor <replaceable>type</replaceable> as <literal>ttymon</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><option>c</option></term><listitem><para>Defines the <replaceable>command</replaceable> string used
to start the port monitor.</para>
</listitem>
</varlistentry><varlistentry><term><option>v</option></term><listitem><para>Specifies the <replaceable>version</replaceable> number of
the port monitor.</para>
</listitem>
</varlistentry><varlistentry><term><option>y</option></term><listitem><para>Defines a comment to describe this instance of the port monitor.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task><task id="modsafapp-11"><title>How to View <literal>ttymon</literal> Port
Monitor Status</title><procedure>&rolestep.sgm;<step id="modsafapp-step-44"><para>View the status of a <literal>ttymon</literal> port
monitor.</para><screen># <userinput>sacadm -l -p mbmon</userinput></screen><variablelist><varlistentry><term><option>l</option></term><listitem><para>Specifies the <emphasis>list</emphasis> port monitor status
flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="emjfo"><title>Viewing <literal>ttymon</literal> Port Monitor Status</title><para>This example shows how to view a port monitor named, <literal>mbmon</literal>.</para><screen># <userinput>sacadm -l -p mbmon</userinput>
PMTAG  PMTYPE  FLGS RCNT STATUS    COMMAND
mbmon  ttymon  -    0    STARTING  /usr/lib/saf/ttymon #TTY Ports a &amp; b</screen><variablelist><varlistentry><term><literal>PMTAG</literal></term><listitem><para>Identifies the port monitor name, <literal>mbmon</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><literal>PMTYPE</literal></term><listitem><para>Identifies the port monitor type, <literal>ttymon</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><literal>FLGS</literal></term><listitem><para>Indicates whether the following flags are set:</para><itemizedlist><listitem><para>d &mdash; Do not enable the new port monitor.</para>
</listitem><listitem><para>x &mdash; Do not start the new port monitor.</para>
</listitem><listitem><para>dash (-) &mdash; No flags are set.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><literal>RCNT</literal></term><listitem><para>Indicates the return count value. A return count of <literal>0</literal> indicates
that the port monitor is not to be restarted if it fails.</para>
</listitem>
</varlistentry><varlistentry><term><literal>STATUS</literal></term><listitem><para>Indicates the current status of the port monitor.</para>
</listitem>
</varlistentry><varlistentry><term><literal>COMMAND</literal></term><listitem><para>Identifies the command used to start the port monitor.</para>
</listitem>
</varlistentry><varlistentry><term><literal>#TTY Ports a &amp; b</literal></term><listitem><para>Identifies any comment used to describe the port monitor.</para>
</listitem>
</varlistentry>
</variablelist>
</example>
</task><task id="modsafapp-12"><title>How to Stop a <literal>ttymon</literal> Port
Monitor</title><procedure>&rolestep.sgm;<step id="modsafapp-step-46"><para>Stop a <literal>ttymon</literal> port monitor.</para><screen># <userinput>sacadm -k -p mbmon</userinput></screen><variablelist><varlistentry><term><option>k</option></term><listitem><para>Specifies the <emphasis>kill</emphasis> port monitor status
flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task><task id="modsafapp-13"><title>How to Start a <literal>ttymon</literal> Port
Monitor</title><procedure>&rolestep.sgm;<step id="modsafapp-step-48"><para>Start a killed <literal>ttymon</literal> port monitor.</para><screen># <userinput>sacadm -s -p mbmon</userinput></screen><variablelist><varlistentry><term><option>s</option></term><listitem><para>Specifies the <emphasis>start</emphasis> port monitor status
flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task><task id="modsafapp-14"><title>How to Disable a <literal>ttymon</literal> Port
Monitor</title><tasksummary><para>Disabling a port monitor prevents new services from starting, without
affecting existing services.</para>
</tasksummary><procedure>&rolestep.sgm;<step id="modsafapp-step-50"><para>Disable a <literal>ttymon</literal> port
monitor.</para><screen># <userinput>sacadm -d -p mbmon</userinput></screen><variablelist><varlistentry><term><option>d</option></term><listitem><para>Specifies the <emphasis>disable</emphasis> port monitor status
flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task><task id="modsafapp-15"><title>How to Enable a <literal>ttymon</literal> Port
Monitor</title><tasksummary><para>Enabling a <literal>ttymon</literal> port monitor allows it to service
new requests. </para>
</tasksummary><procedure>&rolestep.sgm;<step id="modsafapp-step-52"><para>Enable a <literal>ttymon</literal> port
monitor.</para><screen># <userinput>sacadm -e -p mbmon</userinput></screen><variablelist><varlistentry><term><option>e</option></term><listitem><para>Specifies the <emphasis>enable</emphasis> port monitor status
flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task><task id="modsafapp-16"><title>How to Remove a <literal>ttymon</literal> Port
Monitor</title><tasksummary><para>Removing a port monitor deletes all the configuration files associated
with it.</para><note><para>Port monitor configuration files cannot be updated or changed
by using the <command>sacadm</command> command. To reconfigure a port monitor, <emphasis>remove</emphasis> it and then <emphasis>add</emphasis> a new one.</para>
</note>
</tasksummary><procedure>&rolestep.sgm;<step id="modsafapp-step-54"><para>Remove a <literal>ttymon</literal> port
monitor.</para><screen># <userinput>sacadm -r -p mbmon</userinput></screen><variablelist><varlistentry><term><option>r</option></term><listitem><para>Specifies the <emphasis>remove</emphasis> port monitor status
flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task>
</sect1><sect1 id="eoqln"><title>Administering <literal>ttymon</literal> services
(Task Map)</title><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="33*"/><colspec colwidth="33*"/><colspec colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Add a <literal>ttymon</literal> service.</para>
</entry><entry><para>Use the <command>pmadm</command> command to add a service.</para>
</entry><entry><para><olink targetptr="modsafapp-17" remap="internal">How to Add a Service</olink></para>
</entry>
</row><row><entry><para>View the Status of a TTY Port Service.</para>
</entry><entry><para>Use the <command>pmadm</command>command to view the status of a TTY
port.</para>
</entry><entry><para><olink targetptr="modsafapp-18" remap="internal">How to View the Status of a TTY Port
Service</olink></para>
</entry>
</row><row><entry><para>Enable a port monitor service.</para>
</entry><entry><para>Use the <command>pmadm</command> command with the <option>e</option> option
to enable a port monitor.</para>
</entry><entry><para><olink targetptr="modsafapp-22" remap="internal">How to Enable a Port Monitor Service</olink></para>
</entry>
</row><row><entry><para>Disable a port monitor service.</para>
</entry><entry><para>Use the <command>pmadm</command> command with the <option>d</option> option
to disable a port monitor.</para>
</entry><entry><para><olink targetptr="modsafapp-23" remap="internal">How to Disable a Port Monitor Service</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="modsafapp-15412"><title>Administering <literal>ttymon</literal> Services</title><para>Use the <command>pmadm</command> command to add services, list the services
of one or more ports associated with a port monitor, and enable or disable
a service. </para><task id="modsafapp-17"><title>How to Add a Service</title><procedure>&rolestep.sgm;<step id="modsafapp-step-56"><para>Add a
standard terminal service to the <literal>mbmon</literal> port monitor.</para><screen># <userinput>pmadm -a -p mbmon -s a -i root -v `ttyadm -V` -m "`ttyadm -i 'Terminal</userinput>
 <userinput>disabled' -l contty -m ldterm,ttcompat -S y -d /dev/term/a</userinput> 
<userinput>-s /usr/bin/login`"</userinput></screen><note><para>In this example, the input wraps automatically to the next line.
Do not use a Return key or line feed.</para>
</note><variablelist><varlistentry><term><option>a</option></term><listitem><para>Specifies the <emphasis>add</emphasis> port monitor status
flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry><varlistentry><term><option>s</option></term><listitem><para>Specifies the <replaceable>svctag</replaceable> <literal>a</literal> as
the port monitor <replaceable>service</replaceable> tag.</para>
</listitem>
</varlistentry><varlistentry><term><option>i</option></term><listitem><para>Specifies the <replaceable>identity</replaceable> to be assigned
to <replaceable>svctag</replaceable> when the service runs.</para>
</listitem>
</varlistentry><varlistentry><term><option>v</option></term><listitem><para>Specifies the <replaceable>version</replaceable> number of
the port monitor.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option></term><listitem><para>Specifies the <literal>ttymon</literal>-specific configuration
data formatted by <command>ttyadm</command>.</para>
</listitem>
</varlistentry>
</variablelist><para>The preceding <command>pmadm</command> command contains an embedded <command>ttyadm</command> command. The options in this embedded command are as follows:</para><variablelist><varlistentry><term><option>b</option></term><listitem><para>Specifies the <emphasis>bidirectional</emphasis> port flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>i</option></term><listitem><para>Specifies the <replaceable>inactive</replaceable> (disabled)
response message.</para>
</listitem>
</varlistentry><varlistentry><term><option>l</option></term><listitem><para>Specifies which TTY <replaceable>label</replaceable> in the <filename>/etc/ttydefs</filename> file to use.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option></term><listitem><para>Specifies the STREAMS <replaceable>modules</replaceable> to
push before invoking this service.</para>
</listitem>
</varlistentry><varlistentry><term><option>d</option></term><listitem><para>Specifies the full path name to the <replaceable>device</replaceable> to
use for the TTY port.</para>
</listitem>
</varlistentry><varlistentry><term><option>s</option></term><listitem><para>Specifies the full path name of the <replaceable>service</replaceable> to
invoke when a connection request is received. If arguments are required, enclose
the command and its arguments in quotation marks (&ldquo;).</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task><task id="modsafapp-18"><title>How to View the Status of a TTY Port Service</title><tasksummary><para>Use the <command>pmadm</command> command as shown in this procedure
to list the status of a TTY port or all the ports that are associated with
a port monitor.</para>
</tasksummary><procedure>&rolestep.sgm;<step id="modsafapp-step-58"><para>List
one service of a port monitor.</para><screen># <userinput>pmadm -l -p mbmon -s a</userinput></screen><variablelist><varlistentry><term><option>l</option></term><listitem><para>Lists service information on the system.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry><varlistentry><term><option>s</option></term><listitem><para>Specifies the <replaceable>svctag</replaceable> <literal>a</literal> as
the port monitor <replaceable>service</replaceable> tag.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="emjff"><title>Viewing the Status of a TTY Port Monitor Service</title><para>This example lists all services of a port monitor.</para><screen># <userinput>pmadm -l -p mbmon</userinput>
PMTAG  PMTYPE  SVCTAG FLAGS ID    &lt;PMSPECIFIC> 
mbmon  ttymon  a      -     root  /dev/term/a - - /usr/bin/login - contty
ldterm,ttcompat login:  Terminal disabled tvi925 y  #</screen><variablelist><varlistentry><term><literal>PMTAG</literal></term><listitem><para>Identifies the port monitor name, <literal>mbmon</literal>,
that is set by using the <command>pmadm -p</command> command.</para>
</listitem>
</varlistentry><varlistentry><term><literal>PMTYPE</literal></term><listitem><para>Identifies the port monitor type, <literal>ttymon</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><literal>SVCTAG</literal></term><listitem><para>Indicates the service tag value that is set by using the <command>pmadm -s</command> command.</para>
</listitem>
</varlistentry><varlistentry><term><literal>FLAGS</literal></term><listitem><para>Identifies whether the following flags are set by using the <command>pmadm -f</command> command.</para><itemizedlist><listitem><para>x &mdash; Do not enable the service.</para>
</listitem><listitem><para>u &mdash; Create a <filename>utmpx</filename> entry for the
service.</para>
</listitem><listitem><para>dash (-) &mdash; No flags are set.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><literal>ID</literal></term><listitem><para>Indicates the identity assigned to the service when it is
started. This value is set by using the <command>pmadm -i</command> command.</para>
</listitem>
</varlistentry><varlistentry><term><literal>&lt;PMSPECIFIC></literal></term><listitem><para><replaceable>Information</replaceable></para>
</listitem>
</varlistentry><varlistentry><term><literal>/dev/term/a</literal></term><listitem><para>Indicates the TTY port path name that is set by using the <command>ttyadm -d</command> command.</para>
</listitem>
</varlistentry><varlistentry><term><literal>-</literal></term><listitem><para>Indicates whether the following flags are set by using the <command>ttyadm -c -b -h -I -r</command> command.</para><itemizedlist><listitem><para><literal>c</literal> &mdash; Sets the connect on carrier flag
for the port.</para>
</listitem><listitem><para><literal>b</literal> &mdash; Sets the port as bidirectional,
allowing both incoming and outgoing traffic.</para>
</listitem><listitem><para><literal>h</literal> &mdash; Suppresses an automatic hangup
immediately after an incoming call is received.</para>
</listitem><listitem><para><literal>I</literal> &mdash; Initializes the port.</para>
</listitem><listitem><para><literal>r</literal>&mdash; Forces <literal>ttymon</literal> to
wait until it receives a character from the port before it prints the <literal>login:</literal> message.</para>
</listitem><listitem><para>dash (-) &mdash; No flags are set.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><literal>-</literal></term><listitem><para>Indicates a value that is set by using the <command>ttyadm
-r <replaceable>count</replaceable></command> option. This option determines
when <literal>ttymon</literal> displays a prompt after receiving data from
a port. If <replaceable>count</replaceable> is 0, <literal>ttymon</literal> waits
until it receives any character. If <replaceable>count</replaceable> is greater
 than 0, <literal>ttymon</literal> waits until <replaceable>count</replaceable> new
lines have been received. No value is set in this example.</para>
</listitem>
</varlistentry><varlistentry><term><literal>/usr/bin/login</literal></term><listitem><para>Identifies the full path name of the service to be invoked
when a connection is received. This value is set by using the <command>ttyadm
-s</command> command.</para>
</listitem>
</varlistentry><varlistentry><term><literal>-</literal></term><listitem><para>Identifies the <command>ttyadm -t</command> command's time-out
value. This option specifies that <literal>ttymon</literal> should close a
port if the open on the port succeeds, and no input data is received in <replaceable>timeout</replaceable> seconds. There is no time-out value in this example.</para>
</listitem>
</varlistentry><varlistentry><term><literal>contty</literal></term><listitem><para>Identifies the TTY label in the <filename>/etc/ttydefs</filename> file.
This value is set by using the <command>ttyadm -l</command> command.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ldterm,ttcompat</literal></term><listitem><para>Identifies the STREAMS modules to be pushed. These modules
are set by using the <command>ttyadmin -m</command> command.</para>
</listitem>
</varlistentry><varlistentry><term><literal>login: Terminal disabled</literal></term><listitem><para>Identifies an inactive message to be displayed when the port
is disabled. This message is set by using the <command>ttyadm -i</command> command.</para>
</listitem>
</varlistentry><varlistentry><term><literal>tvi925</literal></term><listitem><para>Identifies the terminal type, if set, by using the <command>ttyadm
-T</command> command. The terminal type is <literal>tvi925</literal> in this
example.</para>
</listitem>
</varlistentry><varlistentry><term><literal>y</literal></term><listitem><para>Identifies the software carrier value that is set by using
the <command>ttyadm -S</command> command. <command>n</command> turns the software
carrier off. <command>y</command> turns the software carrier on. The software
carrier is turned on in this example.</para>
</listitem>
</varlistentry><varlistentry><term><literal>#</literal></term><listitem><para>Identifies any comment specified with the <command>pmadm -y</command> command.
There is no comment in this example.</para>
</listitem>
</varlistentry>
</variablelist>
</example>
</task><task id="modsafapp-22"><title>How to Enable a Port Monitor Service</title><procedure>&rolestep.sgm;<step id="modsafapp-step-60"><para>Enable
a disabled port monitor service.</para><screen># <userinput>pmadm -e -p mbmon -s a</userinput></screen><variablelist><varlistentry><term><option>e</option></term><listitem><para>Specifies the <emphasis>enable</emphasis> flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry><varlistentry><term><option>s</option></term><listitem><para>Specifies the <replaceable>svctag</replaceable> <literal>a</literal> as
the port monitor <replaceable>service</replaceable> tag.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task><task id="modsafapp-23"><title>How to Disable a Port Monitor Service</title><procedure>&rolestep.sgm;<step id="modsafapp-step-62"><para>Disable
a port monitor service.</para><screen># <userinput>pmadm -d -p mbmon -s a</userinput></screen><variablelist><varlistentry><term><option>d</option></term><listitem><para>Specifies the <emphasis>disable</emphasis> flag.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies the <replaceable>pmtag</replaceable> <literal>mbmon</literal> as
the port monitor tag.</para>
</listitem>
</varlistentry><varlistentry><term><option>s</option></term><listitem><para>Specifies the <replaceable>svctag</replaceable> <literal>a</literal> as
the port monitor <replaceable>service</replaceable> tag.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task>
</sect1><sect1 id="modsafapp-92630"><title>Service Access Facility Administration
(Reference)</title><para>This chapter includes reference information for administration of the
Service Access Facility.</para><sect2 id="modsafapp-65913"><title>Files Associated With the SAF</title><para>The SAF uses configuration files that can be modified by using the <command>sacadm</command> and <command>pmadm</command> commands. You should not need
to manually edit the configuration files.</para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="180*"/><colspec colname="column2" colwidth="179*"/><thead><row rowsep="1"><entry><para>File Name</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para><filename>/etc/saf/_sysconfig</filename></para>
</entry><entry><para>Per-system configuration script.</para>
</entry>
</row><row><entry><para><filename>/etc/saf/_sactab</filename></para>
</entry><entry><para>The SAC's administrative file that contains configuration data for the
port monitors that the SAC controls</para>
</entry>
</row><row><entry><para><filename>/etc/saf/</filename><replaceable>pmtag</replaceable></para>
</entry><entry><para>Home directory for port monitor <replaceable>pmtag</replaceable></para>
</entry>
</row><row><entry><para><filename>/etc/saf/</filename><replaceable>pmtag</replaceable><filename>/_config</filename></para>
</entry><entry><para>Per-port monitor configuration script for port monitor <replaceable>pmtag</replaceable> if
it exists</para>
</entry>
</row><row><entry><para><filename>/etc/saf/</filename><replaceable>pmtag</replaceable><filename>/</filename><replaceable>_pmtab</replaceable></para>
</entry><entry><para>Port monitor <replaceable>pmtag</replaceable>'s administrative file
that contains port monitor-specific configuration data for the services <replaceable>pmtag</replaceable> provides</para>
</entry>
</row><row><entry><para><filename>/etc/saf/</filename><replaceable>pmtag</replaceable><filename>/</filename><replaceable>svctag</replaceable></para>
</entry><entry><para>Per-service configuration script for service <replaceable>svctag</replaceable></para>
</entry>
</row><row><entry><para><filename>/var/saf/log</filename></para>
</entry><entry><para>The SAC's log file</para>
</entry>
</row><row><entry><para><filename>/var/saf/</filename><replaceable>pmtag</replaceable></para>
</entry><entry><para>Directory for files created by <replaceable>pmtag</replaceable>, for
example,  log files</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2><sect2 id="modsafapp-39"><title><filename>/etc/saf/_sactab</filename> File</title><para>The information in the <filename>/etc/saf/_sactab</filename> file is
as follows:</para><screen># VERSION=1
zsmon:ttymon::0:/usr/lib/saf/ttymon
#</screen><variablelist><varlistentry><term><literal># VERSION=1</literal></term><listitem><para>Indicates the Service Access Facility version number.</para>
</listitem>
</varlistentry><varlistentry><term><literal>zsmon</literal></term><listitem><para>Is the name of the port monitor.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ttymon</literal></term><listitem><para>Is the type of port monitor.</para>
</listitem>
</varlistentry><varlistentry><term><literal>::</literal></term><listitem><para>Indicates whether the following two flags are set:</para><itemizedlist><listitem><para>d &mdash; Do not enable the port monitor.</para>
</listitem><listitem><para>x &mdash; Do not start the port monitor. No flags are set
in this example.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><literal>0</literal></term><listitem><para>Indicates the return code value. A return count of <literal>0</literal> indicates
that the port monitor is not be restarted if the port monitor fails.</para>
</listitem>
</varlistentry><varlistentry><term><literal>/usr/lib/saf/ttymon</literal></term><listitem><para>Indicates the port monitor path name.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2><sect2 id="modsafapp-40"><title><filename>/etc/saf/</filename><replaceable>pmtab/_pmtab</replaceable> File</title><para>The <filename>/etc/saf/</filename><replaceable>pmtab/_pmtab</replaceable> file,
such as <filename>/etc/saf/zsmon/_pmtab</filename>, is similar to the following:</para><screen># VERSION=1
ttya:u:root:reserved:reserved:reserved:/dev/term/a:I::/usr/bin/login::9600:
ldterm,ttcompat:ttya login\: ::tvi925:y:# </screen><variablelist><varlistentry><term><literal># VERSION=1</literal></term><listitem><para>Indicates the Service Access Facility version number.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ttya</literal></term><listitem><para>Indicates the service tag.</para>
</listitem>
</varlistentry><varlistentry><term><literal>x,u</literal></term><listitem><para>Identifies whether the following flags are set:</para><itemizedlist><listitem><para>x &mdash; Do not enable the service.</para>
</listitem><listitem><para>u &mdash; Create a <filename>utmpx</filename> entry for the
service.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><literal>root</literal></term><listitem><para>Indicates the identity assigned to the service tag.</para>
</listitem>
</varlistentry><varlistentry><term><literal>reserved</literal></term><listitem><para>This field is reserved for future use.</para>
</listitem>
</varlistentry><varlistentry><term><literal>reserved</literal></term><listitem><para>This field is reserved for future use.</para>
</listitem>
</varlistentry><varlistentry><term><literal>reserved</literal></term><listitem><para>This field is reserved for future use.</para>
</listitem>
</varlistentry><varlistentry><term><literal>/dev/term/a</literal></term><listitem><para>Indicates the TTY port path name.</para>
</listitem>
</varlistentry><varlistentry><term><literal>/usr/bin/login</literal></term><listitem><para>Identifies the full path name of the service to be invoked
when a connection is received.</para>
</listitem>
</varlistentry><varlistentry><term><literal>:c,b,h,I,r:</literal></term><listitem><para>Indicates whether the following flags are set:</para><para><literal>c</literal> &mdash; Sets the connect on carrier flag for the
port.</para><para><literal>b</literal> &mdash; Sets the port as bidirectional, allowing
both incoming and outgoing traffic.</para><para><literal>h</literal> &mdash; Suppresses an automatic hangup immediately
after an incoming call is received.</para><para><literal>I</literal> &mdash; Initializes the port.</para><para><literal>r</literal> &mdash; Forces <literal>ttymon</literal> to wait
until it receives a character from the port before <command>ttymon</command> prints
the <literal>login:</literal> message.</para>
</listitem>
</varlistentry><varlistentry><term><literal>9600</literal></term><listitem><para>Identifies the TTY label defined in the <filename>/etc/ttydefs</filename> file.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ldterm,ttcompat</literal></term><listitem><para>Identifies the STREAMS modules to be pushed.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ttya login\:</literal></term><listitem><para>Identifies the prompt to be displayed.</para>
</listitem>
</varlistentry><varlistentry><term><literal>:y/n:</literal></term><listitem><para>Indicates yes or no response.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>message</replaceable></term><listitem><para>Identifies any inactive (disabled) response message.</para>
</listitem>
</varlistentry><varlistentry><term><literal>tvi925</literal></term><listitem><para>Identifies the terminal type.</para>
</listitem>
</varlistentry><varlistentry><term><literal>y</literal></term><listitem><para>Indicates whether the software carrier is set (<literal>y</literal>/<literal>n</literal>).</para>
</listitem>
</varlistentry>
</variablelist>
</sect2><sect2 id="modsafapp-66874"><title>Service States</title><para>The <command>sacadm</command> command controls the states of services.
The following table describes the possible states of services. </para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="1"><colspec colname="column1" colwidth="87*"/><colspec colname="column2" colwidth="270*"/><thead><row><entry><para>State</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row rowsep="0"><entry><para>Enabled</para>
</entry><entry><para><emphasis>Default state</emphasis> &ndash; When the port monitor is
added, the service operates.</para>
</entry>
</row><row><entry><para>Disabled</para>
</entry><entry><para><emphasis>Default state</emphasis> &ndash; When the port monitor is
removed, the service stops.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>To determine the state of any particular service, use the following:</para><screen># <userinput>pmadm -l -p</userinput> <replaceable>portmon-name</replaceable> <userinput>-s</userinput><replaceable>svctag</replaceable></screen>
</sect2><sect2 id="modsafapp-98584"><title>Port Monitor States</title><para>The <command>sacadm</command> command
controls the states of the <literal>ttymon</literal> and <literal>listen</literal> port
monitors. The following table describes the possible port monitor states. </para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="87*"/><colspec colname="column2" colwidth="272*"/><thead><row rowsep="1"><entry><para>State</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>Started</literal></para>
</entry><entry><para><emphasis>Default state</emphasis> &ndash; When the port monitor is
added, it is automatically started.</para>
</entry>
</row><row><entry><para><literal>Enabled</literal></para>
</entry><entry><para><emphasis>Default state</emphasis> &ndash; When the port monitor is
added, it is automatically ready to accept requests for service.</para>
</entry>
</row><row><entry><para><literal>Stopped</literal></para>
</entry><entry><para><emphasis>Default state</emphasis> &ndash; When the port monitor is
removed, it is automatically stopped.</para>
</entry>
</row><row><entry><para><literal>Disabled</literal></para>
</entry><entry><para><emphasis>Default state</emphasis> &ndash; When the port monitor is
removed, it automatically continues existing services and refuses to add new
services.</para>
</entry>
</row><row><entry><para><literal>Starting</literal></para>
</entry><entry><para><emphasis>Intermediate state</emphasis> &ndash; The port monitor is
in the process of starting.</para>
</entry>
</row><row><entry><para><literal>Stopping</literal></para>
</entry><entry><para><emphasis>Intermediate state</emphasis> &ndash; The port monitor has
been manually terminated, but it has not completed its shutdown procedure.
The port monitor is on the way to becoming stopped.</para>
</entry>
</row><row><entry><para><literal>Notrunning</literal></para>
</entry><entry><para><emphasis>Inactive state</emphasis> &ndash; The port monitor has been
killed. All ports previously monitored are inaccessible. An external user
cannot tell whether a port is <literal>disabled</literal> or <literal>notrunning</literal>.</para>
</entry>
</row><row><entry><para><literal>Failed</literal></para>
</entry><entry><para><emphasis>Inactive state</emphasis> &ndash; The port monitor is unable
to start and remain running.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>To determine the state of any particular port monitor, use the following
command:</para><screen># <userinput>sacadm -l -p</userinput> <replaceable>portmon-name</replaceable></screen>
</sect2><sect2 id="modsafapp-35"><title>Port States</title><para>Ports can be enabled or disabled depending
on the state of the port monitor that controls the ports. </para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="110.20*"/><colspec colname="column2" colwidth="248.80*"/><thead><row rowsep="1"><entry><para>State</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry namest="column1" nameend="column2"><para>Serial (<literal>ttymon</literal>) port states</para>
</entry>
</row><row><entry><para><literal>Enabled</literal></para>
</entry><entry><para>The <literal>ttymon</literal> port monitor sends a prompt message to
the port and provides login service to it.</para>
</entry>
</row><row><entry><para><literal>Disabled</literal></para>
</entry><entry><para>Default state of all ports if <literal>ttymon</literal> is killed or
disabled. If you specify this state, <literal>ttymon</literal> sends out the <literal>disabled</literal> message when it receives a connection request.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2>
</sect1>
</chapter>