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.
Whenever you attempt to log in via a directly connected modem or alphanumeric terminal, ttymon goes to work, as follows.
As shown in Figure 49-1, the init program is the first process to be started at boot time. Consulting its administrative file (/etc/inittab), init starts other processes as they are needed. Listed among those processes is the SAC.
SAC, in turn, automatically starts up the port monitors designated in its administrative file (/etc/saf/_sactab). Figure 49-1 shows only a single ttymon port monitor.
After ttymon has been started, it monitors the serial port lines for service requests.
When someone attempts to log in via 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. ttymon 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, ttymon passes these parameters to the login program and transfers control to it.
When an instance of ttymon is invoked by SAC, ttymon starts to monitor its ports. For each port, ttymon 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 /etc/ttydefs.
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, ttymon tries the next speed and writes the prompt again.
If autobaud is enabled for a port, ttymon will try to determine the baud rate on the port automatically. Users must press Return before ttymon can recognize the baud rate and print the prompt.
When valid input is received, ttymon interprets the per-service configuration file for the port, creates a /etc/utmp entry if required, establishes the service environment, and invokes the service associated with the port.
After the service terminates, ttymon cleans up the /etc/utmp entry, if one exists, and returns the port to its initial state.
If a port is configured for bidirectional service, ttymon will:
Allow users to connect to a service
Allow uucico, cu, or ct to use the port for dialing out (if the port's free)
Wait to read a character before printing a prompt
Invoke the port's associated service--without sending the prompt message--when a connection is requested (if the connect-on-carrier flag is set)