System Administration Guide

Port Monitors: TTY Monitor and Network Listener

Though SAF provides a generic means for administering any future or third-party port monitors, only two are implemented in the Solaris 2.x environment--ttymon and listen.

TTY Port Monitor: ttymon

The ttymon port monitor is STREAMS-based. It monitors ports; sets terminal modes, baud rates, and line disciplines; and invokes the login process. (It provides Solaris 2.x users the same services that getty did under previous versions of Solaris software.)

The ttymon port monitor runs under the SAC program. It is configured using the sacadm command. Each instance of ttymon can monitor multiple ports. These ports are specified in the port monitor's administrative file. The administrative file is configured using the pmadm and ttyadm commands.

ttymon and the Console Port

Console services are not managed by the Service Access Controller nor any explicit ttymon administration file. An entry in the /etc/inittab file is used to manage the console port using ttymon in express mode, which is a special ttymon mode that is invoked directly by a command that requires login service.

The default console entry in the /etc/inittab file looks like this:


co:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` console login: "
 -T terminal_type -d /dev/console -l console -m ldterm,ttcompat

co:234:respawn:

co identifies the entry as the console; 234 identifies the run levels for the action, respawn, which means the console entry should be restarted if it fails or doesn't exist at run levels 2, 3, and 4.

/usr/lib/saf/ttymon -g -h

The -g option is used so the correct baud rate and terminal setting can be set on a port and connect to a login service without being preconfigured by the SAC. The -h option forces a line hangup by setting the line speed to zero before setting the default or specified speed.

-p "`uname -n` console login:

Identifies the prompt string for the console port. 

-tterminal_type

Identifes the terminal type of the console. 

-d /dev/console -l console -m ldterm,ttcompat

The -d option identifies the console device; the -l option identifies the ttylabel in the /etc/ttydefs file; and the -m option identifies the STREAMS modules to be pushed.

Special ttymon-Specific Administrative Command: ttyadm

The ttymon administrative file is updated by sacadm and pmadm, as well as by the ttyadm command. The ttyadm command formats ttymon-specific information and writes it to the standard output, providing a means for presenting formatted ttymon-specific data to the sacadm and pmadm commands.

Thus, ttyadm does not administer ttymon directly; rather, it complements the generic administrative commands, sacadm and pmadm. See ttyadm(1M) for more details.

Network Listener Service: listen

The listen port monitor runs under SAC. It monitors the network for service requests, accepts requests when they arrive, and invokes servers in response to those service requests.

The listen port monitor is configured using the sacadm command. Each instance of listen can provide multiple services. These services are specified in the port monitor's administrative file. This administrative file is configured using the pmadm and nlsadmin commands.

The network listener process may be used with any connection-oriented transport provider that conforms to the Transport Layer Interface (TLI) specification. In the Solaris 2.x environment, listen port monitors provide additional network services not provided by inetd, such as print service.

Special listen-Specific Administrative Command: nlsadmin

The listen port monitor's administrative file is updated by sacadm and pmadm, as well as by the nlsadmin command. The nlsadmin command formats listen-specific information and writes it to the standard output, providing a means of presenting formatted listen-specific data to the sacadm and pmadm commands.

Thus, nlsadmin does not administer listen directly; rather, it complements the generic administrative commands, sacadm and pmadm. See nlsadmin(1M) for more details.

Each network has at least one instance of the network listener process associated with it. Each network is configured separately. The nlsadmin command controls the operational states of listen port monitors.

The nlsadmin command can establish a listen port monitor for a given network, configure the specific attributes of that port monitor, and start and kill the monitor. The nlsadmin command can also report on the listen port monitors on a machine. See nlsadmin(1M) for a detailed description.