System Administration Guide: Advanced Administration

Port Monitor Service Administrator: pmadm Command

The pmadm command enables you to administer port monitors' services. In particular, you use the pmadm 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.

Each instance of a service must be uniquely identified by a port monitor and a port. When you use the pmadm command to administer a service, you specify a particular port monitor via the pmtag argument, and a particular port via the svctag argument.

For each port monitor type, the SAF requires a specialized command to format port monitor-specific configuration data. This data is used by the pmadm command. For ttymon and listen type port monitors, these specialized commands are ttyadm and nlsadmin, respectively.

A Port Monitor at Work: ttymon

Whenever you attempt to log in by using a directly connected modem or alphanumeric terminal, ttymon goes to work, as follows.

As shown in the following figure, the init process is the first process to be started at boot time. Consulting its administrative file (/etc/inittab), the init process starts other processes as they are needed. Listed among those processes is the SAC.

SAC, in turn, automatically starts the port monitors designated in its administrative file (/etc/saf/_sactab). The following figure shows only a single ttymon port monitor.

After the ttymon port monitor has been started, it monitors the serial port lines for service requests.

Figure 12–1 How ttymon Helps Process a Login Request

Graphic

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 ttymon port monitor notes the serial port activity, and attempts to establish a communications link. The ttymon port monitor determines what data transfer rate, line discipline, and handshaking protocol are required to communicate with the device.

Having established the proper parameters for communication with the modem or terminal, the ttymon port monitor passes these parameters to the login program and transfers control to it.

Port Initialization Process

When an instance of the ttymon port monitor is invoked by SAC, ttymon starts to monitor its ports. For each port, the ttymon 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 /etc/ttydefs file.

The ttymon 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 ttymon port monitor tries the next speed and writes the prompt again.

If autobaud is enabled for a port, the ttymon port monitor tries to determine the baud rate on the port automatically. Users must press Return before the ttymon port monitor can recognize the baud rate and print the prompt.

When valid input is received, the ttymon port monitor interprets the per-service configuration file for the port, creates an /etc/utmpx entry if required, establishes the service environment, and invokes the service associated with the port.

After the service terminates, the ttymon port monitor cleans up the /etc/utmpx entry, if one exists, and returns the port to its initial state.

Bidirectional Service

If a port is configured for bidirectional service, the ttymon port monitor will: