This part provides instructions for managing terminals and modems. This part contains these chapters.
Provides overview information about terminals and modems. |
|
Provides step-by-step instructions for setting up terminals and modems. |
|
Chapter 49, Setting Up Terminals and Modems With the Service Access Facility (Tasks) |
Provides step-by-step instructions for using SAF commands to set up terminals and modems. |
This chapter provides the overview information for managing terminals and modems. This is a list of the overview information in this chapter.
For step-by-step instructions about how to set up terminals and modems with Admintool, see Chapter 48, Setting Up Terminals and Modems (Tasks).
For step-by-step instructions about how to set up terminals and modems with the SAF, see Chapter 49, Setting Up Terminals and Modems With the Service Access Facility (Tasks).
Terminals and modems provide both local and remote access to system and network resources. Setting up terminals and modem access is an important responsibility of a system administrator. This section explains some of the concepts behind modem and terminal management in the Solaris 2.x environment.
Your system's bit-mapped graphics display is not the same as an alphanumeric terminal, which connects to a serial port and displays only text. You don't have to perform any special steps to administer the graphics display.
Modems can be set up in three basic configurations:
Dial-out
Dial-in
Bidirectional
A modem connected to your home computer might be set up to provide dial - -out service, meaning you can access other computers from your own home, but nobody outside can gain access to your machine.
Dial-in service is just the opposite. It allows people to access a system from remote sites, but it does not permit calls to the outside world.
Bidirectional access, as the name implies, provides both dial-in and dial-out capabilities.
A port is a channel through which a device communicates with the operating system. From a hardware perspective, a port is a "receptacle" into which a terminal or modem cable may be plugged.
However, a port is not strictly a physical receptacle, but an entity with hardware (pins and connectors) and software (a device driver) components. A single physical receptacle often provides multiple ports, allowing connection of two or more devices.
Common types of ports include serial, parallel, small computer systems interface (SCSI), and Ethernet.
A serial port, using a standard communications protocol, transmits a byte of information bit-by-bit over a single line.
Devices that have been designed according to RS-232-C or RS-423 standards (this includes most modems, alphanumeric terminals, plotters, and some printers) can be plugged interchangeably (using standard cables) into serial ports of computers that have been similarly designed.
When many serial port devices must be connected to a single computer, it may be necessary to add an adapter board to the system. The adapter board, with its driver software, provides additional serial ports for connecting more devices than could otherwise be accommodated.
Modems and terminals gain access to computing resources via the serial port software. The serial port software must be set up to provide a particular "service" for the device attached to the port. For example, you can set up a serial port to provide bidirectional service for a modem.
The main mechanism for gaining access to a service is through a port monitor. A port monitor is a program that continuously monitors for requests to log in or access printers or files.
When a port monitor detects a request, it sets whatever parameters are required to establish communication between the operating system and the device requesting service. Then the port monitor transfers control to other processes that provide the services needed.
Table 47-1 describes the two types of port monitors included in the Solaris 2.x environment.
Table 47-1 Port Monitor Types
Port Monitor |
Description |
---|---|
Controls access to network services, handling remote print and file system requests. A common use of the listen port monitor is to listen for requests from the LP print service. For more information on the listen port monitor, see Chapter 49, Setting Up Terminals and Modems With the Service Access Facility (Tasks).The listen port monitor is not used when you set up modems and alphanumeric terminals. |
|
Provides access to the login services needed by modems and alphanumeric terminals. Solstice Serial Port Manager automatically sets up a ttymon port monitor to process login requests from these devices. Using Solstice Serial Port Manager to set up terminals and modems is described in Chapter 48, Setting Up Terminals and Modems (Tasks). |
You may be familiar with an older port monitor called getty(1M). The new ttymon is more powerful; a single ttymon can replace multiple occurrences of getty. Otherwise, these two programs serve the same function.
Table 47-2 lists the recommended tools for managing terminals and modems. Table 47-3 lists specific differences in functionality between the Service Access Facility (SAF) and the SolsticeTM Serial Port Manager.
Table 47-2 Recommended Tools For Managing Terminals and Modems
If You Want The Tool That Is... |
Then Use... |
To Start This Tool See... |
---|---|---|
The most comprehensive |
Service Access Facility (SAF) commands | |
The quickest setup |
Admintool graphical user interface (for local systems only) | |
|
Solstice AdminSuite's Serial Port Manager graphical user interface (for local and remote systems in a networked, name service environment) |
Table 47-3 Functionality Differences Between Solstice Serial Port Manager and Service Access Facility
If You Need To... |
Then Use... |
Comment |
---|---|---|
Inform users that a port is disabled |
Service Access Facility ttyadm -i |
ttyadmin -i specifies the inactive (disabled) response message. The message is sent to a terminal or modem when a user attempts to log in when the port is disabled. This functionality is not provided when a port is disabled using Solstice Serial Port Manager. |
Keep the modem connection when a user logs off a host |
Service Access Facility ttyadm -h |
ttyadm -h specifies that the system will not hang up on a modem before setting or resetting to the default or specified value. If ttyadm -h is not used, when the user logs out of a host, the host will hang up the modem. |
Require the user to type a character before the system displays a prompt |
Service Access Facility ttyadm -r |
ttyadm -r specifies that ttymon should require the user to type a character or press Return a specified number of times before the login prompt appears. When -r is not specified, pressing Return one or more times will print the prompt anyway. This option prevents a terminal server from issuing a welcome message that the Solaris host might misinterpret to be a user trying to log in. Without the -r option, the host and terminal server might begin looping and printing prompts to each other. |
Admintool sets up the serial port software to work with terminals and modems by calling the pmadm command with the appropriate information. It also provides:
Templates for common terminal and modem configurations
Multiple port setup, modification, or deletion
Quick visual status of each port
The SAF is the tool used for administering terminals, modems, and other network devices. In particular, SAF enables you to set up:
ttymon and listen port monitors (using the sacadm command)
ttymon port monitor services (using the pmadm and ttyadm commands)
listen port monitor services (using the pmadm and nlsadmin commands)
And troubleshoot tty devices
And troubleshoot incoming network requests for printing service
And troubleshoot the Service Access Controller (using the sacadm command)
The SAF is an open-systems solution that controls access to system and network resources through tty devices and local-area networks (LANs). SAF is not a program. It is a hierarchy of background processes and administrative commands.
This chapter provides step-by-step instructions for setting up terminals and modems using Admintool. This is a list of the step-by-step instructions in this chapter.
For overview information about terminals and modems, see Chapter 47, Managing Terminals and Modems (Overview).
When setting up serial port information, start Admintool, and select Serial Ports from the Browse menu. Select a serial port from the Serial Ports window and then choose Modify from the Edit menu to bring up the Modify Serial Port window. This window provides access to the port templates and provides information on the port in three levels of detail--Basic, More, and Expert.
The Modify Serial Port window appears in the Basic detail mode. To view More or Expert details, select the More or Expert option from the Detail menu.
The descriptions of each item in the Modify Serial window are listed in Table 48-1.
Table 48-1 Modify Serial Port Window Items
Detail |
Item |
Description |
---|---|---|
Basic |
Port |
Lists the port or ports you selected from Serial Ports main window. |
|
Service |
Specifies that the service for the port is turned on (enabled). |
|
Baud Rate |
Specifies the line speed used to communicate with the terminal. The line speed represents an entry in the/etc/ttydefs file. |
|
Terminal Type |
Shows the abbreviation for the type of terminal, for example, ansi or vt100. Similar abbreviations are found in /etc/termcap. This value is set in the $TERM environment variable. |
More |
Option: Initialize Only |
Specifies that the port software is initialized but not configured. |
|
Option: Bidirectional |
Specifies that the port line is used in both directions. |
|
Option: Software Carrier |
Specifies that the software carrier detection feature is used. If the option is not checked, the hardware carrier detection signal is used. |
|
Login Prompt |
Shows the prompt displayed to a user after a connection is made. |
|
Comment |
Shows the comment field for the service. |
|
Service Tag |
Lists the service tag associated with this port--typically an entry in the /dev/term directory. |
|
Port Monitor Tag |
Specifies the name of the port monitor to be used for this port. Note: The default monitor is typically correct. |
Expert |
Create utmp Entry |
Specifies that a utmp entry is created in the accounting files upon login. Note: This item must be selected if a login service is used. See the Service item. |
|
Connect on Carrier |
Specifies that a port's associated service is invoked immediately when a connect indication is received. |
|
Service |
Shows the program that is run upon connection. |
|
Streams Modules |
Shows the STREAMS modules that are pushed before the service is invoked. |
|
Timeout (secs) |
Specifies the number of seconds before a port is closed if the open process on the port succeeds and no input data is received. |
Table 48-2 describes the menu items (and their default values) when setting up a terminal using Serial Ports.
Table 48-2 Terminal - Hardwired Default Values
Detail |
Item |
Default Value |
---|---|---|
Basic |
Port |
-- |
|
Service |
Enabled |
|
Baud Rate |
9600 |
|
Terminal Type |
-- |
More |
Option: Initialize Only |
no |
|
Option: Bidirectional |
no |
|
Option: Software Carrier |
yes |
|
Login Prompt |
login: |
Comment |
Terminal - Hardwired |
|
|
Service Tag |
-- |
|
Port Monitor Tag |
zsmon |
Expert |
Create utmp Entry |
yes |
|
Connect on Carrier |
no |
|
Service |
/usr/bin/login |
|
Streams Modules |
ldterm,ttcompat |
|
Timeout (secs) |
Never |
Table 48-3 describes the three modem templates available when setting up a modem using Serial Ports.
Table 48-3 Modem Templates
Modem Configuration |
Description |
---|---|
Dial-In Only |
Users may dial in to the modem but cannot dial out. |
Dial-Out Only |
Users may dial out from the modem but cannot dial in. |
Bidirectional |
Users may either dial in or out from the modem. |
Table 48-4 describes the default values of each template.
Table 48-4 Modem Template Default Values
Detail |
Item |
Modem - Dial-In Only |
Modem - Dial-Out Only |
Modem - Bidirectional |
---|---|---|---|---|
Basic |
Port |
-- |
-- |
-- |
|
Service |
Enabled |
Enabled |
Enabled |
|
Baud Rate |
9600 |
9600 |
9600 |
|
Terminal Type |
-- |
-- |
-- |
More |
Option: Initialize Only |
yes |
no |
no |
|
Option: Bidirectional |
no |
no |
yes |
|
Option: Software Carrier |
no |
no |
no |
|
Login Prompt |
login: |
login: |
login: |
|
Comment |
Modem - Dial-In Only |
Modem - Dial-Out Only |
Modem - Bidirectional |
|
Service Tag |
-- |
-- |
-- |
|
Port Monitor Tag |
zsmon |
zsmon |
zsmon |
Expert |
Create utmp Entry |
yes |
yes |
yes |
|
Connect on Carrier |
no |
no |
no |
|
Service |
/usr/bin/login |
/usr/bin/login |
/usr/sbin/login |
|
Streams Modules |
ldterm,ttcompat |
ldterm,ttcompat |
ldterm,ttcompat |
|
Timeout (secs) |
Never |
Never |
Never |
Table 48-5 describes the default values for the Initialize Only template.
Table 48-5 Initialize Only - No Connection Default Values
Detail |
Item |
Default Value |
---|---|---|
Basic |
Port |
-- |
|
Service |
Enabled |
|
Baud Rate |
9600 |
|
Terminal Type |
-- |
More |
Option: Initialize Only |
yes |
|
Option: Bidirectional |
no |
|
Option: Software Carrier |
no |
|
Login Prompt |
login: |
|
Comment |
Initialize Only - No Connection |
|
Service Tag |
-- |
|
Port Monitor Tag |
zsmon |
Expert |
Create utmp Entry |
yes |
|
Connect on Carrier |
no |
|
Service | /usr/bin/login |
|
Streams Modules |
ldterm,ttcompat |
|
Timeout (secs) |
Never |
Verify that the following prerequisites are met. To use Admintool, you must:
Have a bit-mapped display monitor. The Admintool software can be used only on a system with a console that is a bit-mapped screen such as a standard display monitor that comes with a Sun workstation.
Be running an X Window System, such as the OpenWindowsTM environment.
Be a member of the sysadmin group (group 14).
If you want to perform administration tasks on a system with an ASCII terminal as the console, use Solaris commands instead.
The system being configured must be your local system. Use Solstice AdminSuite Serial Port Manager to configure serial ports on a remote system.
Start Admintool.
$ admintool & |
The Users main window is displayed.
Start Admintool, if it's not already running.
See "How to Start Admintool" for more information on starting Admintool.
Select Serial Ports from the Browse menu.
The Serial Ports menu is displayed.
Select the port or ports that will be used with a terminal.
Choose Modify from the Edit menu.
The Modify Serial Port window appears in the Basic Detail mode. To enter additional details, select either the More or Expert Detail modes.
Choose Terminal-Hardwired from the Use Template menu.
See Table 48-2 for a description of the Terminal-Hardware menu items.
Change values of template entries if desired.
Click on OK to configure the port.
Use the pmadm command to verify the terminal service has been added.
$ pmadm -l -s ttya |
Start Admintool, if it's not already running.
See "How to Start Admintool" for more information on starting Admintool.
Select Serial Ports from the Browse menu.
The Serial Ports menu is displayed.
Select the port or ports that will be used with a modem.
Choose Modify from the Edit menu.
The Modify Serial Port window appears in the Basic Detail mode. To enter additional details, select either the More or Expert Detail modes.
Choose the modem configuration template from the Use Template menu that meets or most closely matches your modem service.
See Table 48-3 for a description of each template.
See Table 48-4 for the default values of each template. If a UUCP service will be used to dial in to your modem on a Solaris 2.x system, see "How to Set Up a Modem for Use With UUCP" for the rest of the procedure.
Change values of template entries if desired.
Click on OK to configure the port.
Use the pmadm command to verify the modem service has been configured for use with UUCP.
$ pmadm -l -s ttyb |
UUCP sends information to a service using seven bits and even parity. Solaris 2.x modem configurations use eight bits and no parity for internationalization purposes. To set up your modem service to work with UUCP, follow these instructions.
Start Admintool, if it's not already running.
See "How to Start Admintool" for more information on starting Admintool.
Select Serial Ports from the Browse menu.
The Serial Ports menu is displayed.
Select the port or ports that will be used with a modem.
Choose Modify from the Edit menu.
The Modify Serial Port window appears in the Basic Detail mode. For additional details, select either the More or Expert Detail modes.
Select Other from the Baud Rate menu.
A window listing baud rates from the /etc/ttydefs file is displayed.
Enter a baud rate that provides seven bit, even parity service. Click on OK.
Change values of other template entries if desired.
Click on OK to configure the port.
Use the pmadm command to verify the modem service has been configured for use with UUCP.
$ pmadm -l -s ttya |
In this example, the 9600E baud rate was selected. This provides a service with a 9600 baud rate, seven bits, and even parity.
Start Admintool, if it's not already running.
See "How to Start Admintool" for more information on starting Admintool.
Select Serial Ports from the Browse menu.
The Serial Ports menu is displayed.
Select the port or ports that you want to initialize.
Choose Modify from the Edit menu.
The Modify Serial Port window appears in the Basic Detail mode. To enter additional details, select either the More or Expert Detail modes.
Choose Initialize Only - No Connection from the Use Template menu.
See Table 48-5 for a description of the Initialize Only - No Connection template.
Click on OK to initialize the port.
Use the pmadm command to verify the port has been disabled.
$ pmadm -l -s ttyb |
Start Admintool, if it's not already running.
See "How to Start Admintool" for more information on starting Admintool.
Select Serial Ports from the Browse menu.
The Serial Ports menu is displayed.
Select the port or ports that you want to disable.
Choose Modify from the Edit menu.
Click on the Service Enable button to disable the port service in the Modify window.
This button acts as a toggle switch to enable or disable a port service.
Click on OK to disable the port.
Use the pmadm command to verify the port service has been disabled.
$ pmadm -l -s ttya |
Start Admintool, if it's not already running.
See "How to Start Admintool" for more information on starting Admintool.
Select the port or ports that has a service you want to delete.
Choose Delete from the Edit menu.
You are asked if you really want to delete the service for the specified port or ports. You may cancel the delete operation or continue with it.
Use the pmadm command to verify the port service has been deleted.
$ pmadm -l -s ttya |
If users are unable to log in over serial port lines after you have added a terminal or modem and set up the proper services, consider the following possible causes of failure.
Begin by checking with the user.
Malfunctions in terminals and modem use are typically reported by a user who has failed to log in or dial in. For this reason, it is best to begin troubleshooting by checking for a problem on the desktop.
Some common reasons for login failure include:
Login ID or password is incorrect.
Terminal is waiting for X-ON flow control key (Control-q).
Serial cable is loose or unplugged.
Terminal configuration is incorrect.
Terminal is shut off or otherwise has no power.
Check the terminal.
Continue to troubleshoot by checking the configuration of the terminal or modem. Determine the proper ttylabel for communicating with the terminal or modem. Verify that the terminal or modem settings match those of the ttylabel.
Check the terminal server.
If the terminal checks out, continue to search for the source of the problem on the terminal or modem server. Use the pmadm command to verify that a port monitor has been configured to service the terminal or modem and that it has the correct ttylabel associated with it.
$ pmadm -l -t ttymon |
Examine /etc/ttydefs and double check the label definition against the terminal configuration. Use sacadm to check the port monitor's status. Use pmadm to check the service associated with the port the terminal uses.
Check the serial connection.
If the Service Access Controller is starting the TTY port monitor and pmadm reports that the service for the terminal's port is enabled, and if the terminal's configuration matches the port monitor's, then continue to search for the problem by checking the serial connection. A serial connection comprises serial ports, cables, and terminals. Test each of these parts by using it with two other parts that are known to be reliable.
Test all of the following:
Serial ports
Modems
Cables
Connectors
Do not use Admintool or Solstice AdminSuite Serial Port Manager to modify serial port settings if the serial port is being used as a console. The correct procedure for changing console settings is by modifying the following line in the /etc/inittab file:
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 |
This chapter explains in detail what a system or network administrator needs to know about the Service Access Facility (SAF) in the Solaris 2.x environment.
If you want to see examples of specific SAF commands, skip the first section, "Using the Service Access Facility", and use the following list to find the instructions you need.
For overview information about terminals and modems, see Chapter 47, Managing Terminals and Modems (Overview).
The SAF is the tool used for administering terminals, modems, and other network devices. The top-level SAF program is the Service Access Controller (SAC). The SAC controls port monitors which you administer through the sacadm command. Each port monitor can manage one or more ports.
You administer the services associated with ports through the pmadm command. While services provided through SAC may differ from network to network, SAC and the administrative programs sacadm and pmadm are network independent.
Table 49-1 illustrates the SAF control hierarchy. The sacadm command is used to administer the SAC which controls the ttymon and listen port monitors.
The services of ttymon and listen are in turn controlled by pmadm. One instance of ttymon can service multiple ports and one instance of listen can provide multiple services on a network interface.
Table 49-1 SAF Control Hierarchy
Function |
Program |
Description |
---|---|---|
Overall Administration |
sacadm |
Command for adding and removing port monitors |
Service Access Controller |
sac |
SAF's master program |
Port Monitors |
ttymon listen |
Monitors serial port login requests Monitors requests for network services |
Port Monitor Service Administrator |
pmadm |
Command for controlling port monitors services |
Services |
logins; remote procedure calls; other |
Services to which SAF provides access |
Console Administration |
console login |
The console is automatically set up via an entry in the /etc/inittab file using ttymon-express mode. Do not use the pmadm or sacadm to manage the console directly. See "ttymon and the Console Port" for more information. |
The sacadm command is the top level of the SAF. The sacadm command primarily is used to add and remove port monitors such as ttymon and listen. Other sacadm functions include listing the current status of port monitors and administering port monitor configuration scripts.
The Service Access Controller program (SAC) oversees all port monitors. A system automatically starts SAC upon entering multiuser mode.
When SAC is invoked, it first looks for, and interprets, each system's configuration script, by which SAC customizes its environment. The modifications made to the SAC environment are inherited by all the "children" of the SAC. This inherited environment may be modified by the children.
After it has interpreted the per-system configuration script, the SAC program reads its administrative file and starts the specified port monitors. For each port monitor, SAC runs a copy of itself (SAC forks a child process). Each child then interprets its per-port monitor configuration script, if such a script exists.
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 using the command found in the SAC administrative file.
The following steps summarize what happens when SAC is first started:
The SAC program is spawned by init at run level two.
The SAC program reads /etc/saf/_safconfig, the per-system configuration script.
The SAC program reads /etc/saf/_sactab, the SAC administrative file.
The SAC program forks a child process for each port monitor it starts.
Each port monitor reads /etc/saf/pmtag/_config, the per-port monitor configuration script.
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)
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.
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.
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. |
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.
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.
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.
Use the sacadm command to add, list, remove, kill, start, enable, disable, enable, and remove a ttymon port monitor.
You must be superuser to perform the following procedures.
To add a ttymon port monitor, type:
# sacadm -a -p mbmon -t ttymon -c /usr/lib/saf/ttymon -v `ttyadm -V` -y "TTY Ports a & b" |
-a |
The add port monitor flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
-t |
Specifies the port monitor type as ttymon |
-c |
Defines the command string used to start the port monitor |
-v |
Specifies the version number of the port monitor |
-y |
Defines a comment to describe this instance of the port monitor |
To see the status of a ttymon port monitor, type:
# sacadm -l -p mbmon |
-l |
The list port monitor status flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
# sacadm -l -p mbmon PMTAG PMTYPE FLGS RCNT STATUS COMMAND mbmon ttymon - 0 STARTING /usr/lib/saf/ttymon #TTY Ports a & b |
PMTAG mbmon |
Identifies the port monitor name, mbmon. |
PMTYPE ttymon |
Identifies the port monitor type, ttymon. |
FLGS - |
Indicates whether the following two flags are set: d, do not enable the new port monitor, or x, do not start the new port monitor. There are no flags set in this example. |
RCNT 0 |
Indicates the return count value. A return count of 0 indicates that the port monitor is not to be restarted if it fails. |
STATUS STARTING |
Indicates the current status of the port monitor. |
COMMAND /usr/lib/saf ... |
Identifies the command used to start the port monitor. |
#TTY Ports a & b |
Identifies any comment used to describe the port monitor. |
To kill a ttymon port monitor, type:
# sacadm -k -p mbmon |
-k |
The kill port monitor status flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
To start a killed ttymon port monitor, type:
# sacadm -s -p mbmon |
-s |
The start port monitor status flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
Disabling a port monitor prevents new services from starting, without affecting existing services.
To disable a ttymon port monitor, type:
# sacadm -d -p mbmon |
-d |
The disable port monitor status flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
Enabling a ttymon port monitor allows it to service new requests.
To enable a ttymon port monitor, type:
# sacadm -e -p mbmon |
-e |
The enable port monitor status flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
To remove a ttymon port monitor, type:
# sacadm -r -p mbmon |
-r |
The remove port monitor status flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
Removing a port monitor deletes all the configuration files associated with it. Port monitor configuration files cannot be updated or changed using sacadm. To reconfigure a port monitor, remove it and add a new one.
Use pmadm to add services, list the services of one or more ports associated with a port monitor, and enable or disable a service.
You must be superuser to perform the following procedures.
To add a standard terminal service to the mbmon port monitor, type:
# pmadm -a -p mbmon -s a -i root -v `ttyadm -V` -m "`ttyadm -i 'Terminal disabled' -l contty -m ldterm,ttcompat -S y -d /dev/term/a -s /usr/bin/login`" |
In this example, the input wraps to the next line. Do not put a Return or line feed after contty.
-a |
The add port monitor status flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
-s |
Specifies the svctag a as the port monitor service tag |
-i |
Specifies the identity to be assigned to svctag when it runs |
-v |
Specifies the version number of the port monitor |
-m |
Specifies the ttymon-specific configuration data formatted by ttyadm |
The above pmadm command contains an embedded ttyadm command. The options in this embedded command are as follows:
-b |
The bidirectional port flag |
-i |
Specifies the inactive (disabled) response message |
-l |
Specifies which TTY label in /etc/ttydefs() to use |
-m |
Specifies the STREAMS modules to push before invoking this service |
-d |
Specifies the full path name to the device to use for the TTY port |
-s |
Specifies the full path name of the service to invoke when a connection request is received; if arguments are required, enclose the command and its arguments in quotation marks (") |
Use the pmadm command as shown to list the status of a TTY port, or all the ports associated with a port monitor.
To list one service of a port monitor, type:
# pmadm -l -p mbmon -s a |
-l |
Lists service information |
-p |
Specifies the pmtag mbmon as the port monitor tag |
-s |
Specifies the svctag a as the port monitor service tag |
To list all services of all port monitors, type:
# pmadm -l |
-l |
Lists service information |
To list all services of a port monitor, type:
# pmadm -l -p mbmon |
-l |
Lists service information |
-p |
Specifies the pmtag mbmon as the port monitor tag |
# pmadm -l -p mbmon PMTAG PMTYPE SVCTAG FLAGS ID <PMSPECIFIC> mbmon ttymon a - root /dev/term/a - - /usr/bin/login - contty ldterm,ttcompat login: Terminal disabled - y # |
mbmon |
Identifies the port monitor name, mbmon, set by using the pmadm -p command. |
ttymon |
Identifies the port monitor type, ttymon. |
a |
Indicates the service tag value set by using the pmadm -s command. |
- |
Identifies whether the following flags are set by using the pmadm -f command: x, which means do not enable the service; u, which means create a utmp entry for the service. No flags are set in this example. |
root |
Identifies the ID assigned to the service when its started. This value is set by using the pmadm -i command. |
<PMSPECIFIC> Information |
|
/dev/term/a |
Indicates the TTY port pathname set by using the ttyadm -d command. |
- |
Indicates whether the following flags are set by using the ttadm -c -b -h -I -r command: c, sets the connect on carrier flag for the port b, sets the port as bidirectional, allowing both incoming and outgoing traffic h, supresses an automatic hangup immediately after an incoming call is received I, initializes the port r, forces ttymon to wait until it receives a character from the port before it prints the login: message. |
- |
Indicates a value set by using the ttyadm -r option. This option determines when ttymon displays a prompt after receiving data from a port. If count is 0, ttymon will wait until it receives any character. If count is greater than 0, ttymon will wait until count new lines have been received. No value is set in this example. |
/usr/bin/login |
Identifies the full pathname of the service to be invoked when a connected is received. This value is set by using ttyadm -s command. |
- |
Identifies the ttyadm -t command's (timeout) value. This option specifies that ttymon should close a port if the open on the port succeeds, and no input data is received in timeout seconds. There is no timeout value in this example. |
contty |
Identifies the TTY label in the /etc/ttydefs file. This value is set by using the ttyadm -l command. |
ldterm,ttcompat |
Identifies the STREAMS modules to be pushed. These modules are set by using the ttyadmin -m command. |
login: Terminal disabled |
Identifies an inactive message to be displayed when the port is disabled. This message is set by using the ttyadm -i command. |
tvi925 |
Identifies the terminal type, if set, by using the ttyadm -Tcommand. The terminal type is tvi925 in this example . |
y |
Identifies the software carrier value set by using the ttyadm -S command; n will turn software carrier off, y will turn software carrier on. Software carrier is turned on in this example. |
# |
Identifies any comment specified with the pmadm -y command. (There is no comment in this example). |
To enable a disabled port monitor service, type:
# pmadm -e -p mbmon -s a |
-e |
The enable flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
-s |
Specifies the svctag a as the port monitor service tag |
To disable a port monitor service, type:
# pmadm -d -p mbmon -s a |
-d |
The disable flag |
-p |
Specifies the pmtag mbmon as the port monitor tag |
-s |
Specifies the svctag a as the port monitor service tag |
Use the sacadm command to add, list, kill, start, enable, disable, or remove a listen port monitor.
You must be superuser to perform the following procedures.
To add a listen port monitor, type:
# sacadm -a -p tcp -t listen -c /usr/lib/saf/listen -v `nlsadmin -V` -y "le0 ethernet" |
-a |
The add port monitor flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
-t |
Specifies the port monitor type as listen |
-c |
Defines the command string used to start the port monitor |
-v |
Specifies the version number of the port monitor |
-y |
Defines a comment to describe this instance of the port monitor |
To list the status of a listen port monitor, type:
# sacadm -l -p tcp |
-l |
The list port monitor status flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
To kill a listen port monitor, type:
# sacadm -k -p tcp |
-k |
The kill port monitor flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
To start a listen port monitor, type:
# sacadm -s -p tcp |
-s |
The start port monitor flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
To enable a listen port monitor, type:
# sacadm -e -p tcp |
-e |
The enable port monitor flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
To disable a listen port monitor, type:
# sacadm -d -p tcp |
-e |
The disable port monitor flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
To remove a listen port monitor, type:
# sacadm -r -p tcp |
-r |
The remove port monitor flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
Use the pmadm command to add, enable, disable, and list the services associated with a listen port monitor.
You must be superuser to perform the following procedures.
To add a listen port monitor service, type:
# pmadm -a -p tcp -s lp -i root -v `nlsadmin -V` -m "`nlsadmin -o /var/spool/lp/fifos/listenS5`" |
In this example, a listen service is added for print requests from remote SunOS 5.x machines. This service does not listen for requests from SunOS 4.x machines.
In this example, the input wraps to the next line. Do not put a Return or line feed after the -o.
-a |
The add port monitor service flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
-s |
Specifies the svctag lp as the port monitor service tag |
-i |
Specifies the identify to be assigned to svctag when it run |
-v |
Specifies the version number of the port monitor |
-m |
Specifies the listen-specific configuration data formatted by nlsadmin |
The above pmadm command contains an embedded nlsadmin command. In that embedded command -o specifies the full path name of a first-in first-out (FIFO) or named STREAM through which a standing server will receive the connection.
To list the services associated with a listen port monitor, type:
# pmadm -l -p tcp |
-l |
The list port monitor service flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
To enable a listen port monitor service, type:
# pmadm -e -p tcp -s lp |
-e |
The enable flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
-s |
Specifies the svctag lp as the port monitor service tag |
To disable a listen port monitor service, type:
# pmadm -d -p tcp -s lp |
-d |
The disable flag |
-p |
Specifies the pmtag tcp as the port monitor tag |
-s |
Specifies the svctag lp as the port monitor service tag |
Use the following tips to remedy listen port monitor difficulties.
Begin with the network.
The network listener is suspect when users report that they cannot print to a network printer. Begin by issuing the /usr/sbin/ping command from the print server to the client and back to determine if the network is up.
Check the listen port monitor.
Use sacadm to check that the listener is starting. Use pmadm to check that the print service is configured correctly and that the service is enabled.
Check the print server's configuration.
See Chapter 72, Troubleshooting Printing Problems, for more information.
SAF uses configuration files which can be modified by using the sacadm and pmadm commands. You should not need to edit them manually.
File Name |
Description |
---|---|
/etc/saf/_sysconfig |
Per-system configuration script |
/etc/saf/_sactab |
SAC's administrative file; contains configuration data for the port monitors that the SAC controls |
/etc/saf/pmtag |
Home directory for port monitor pmtag |
/etc/saf/pmtag/_config |
Per-port monitor configuration script for port monitor pmtag if it exists |
/etc/saf/pmtag/_pmtab |
Port monitor pmtag's administrative file; contains port monitor-specific configuration data for the services pmtag provides |
/etc/saf/pmtag/svctag |
Per-service configuration script for service svctag |
/var/saf/log |
SAC's log file |
/var/saf/pmtag |
Directory for files created by pmtag, for example, log files |
The /etc/saf/_sactab looks like this:
# VERSION=1 zsmon:ttymon::0:/usr/lib/saf/ttymon # tcp:listen::999:/usr/lib/saf/listen tcp # |
# VERSION=1 |
Indicates the Service Access Facility version number. |
zsmon tcp |
Is the name of the port monitor. |
ttymon listen |
Is the type of port monitor. |
:: |
Indicates whether the following two flags are set: d, do not enable the port monitor x, do not start the port monitor. No flags are set in this example. |
0 999 |
Indicates the return code value. A return count of 0 indicates that the port monitor is not be restarted if it fails. |
/usr/lib/saf/ttymon /usr/lib/saf/listen |
Indicates the port monitor pathname |
The /etc/saf/pmtab/_pmtab file, such as /etc/saf/zsmon/_pmtab, looks like this:
# VERSION=1 ttya:u:root:reserved:reserved:reserved:/dev/term/a:I::/usr/bin/login::9600:ldterm, ttcompat:ttya login\: ::tvi925:y:# |
# VERSION=1 |
Indicates the Service Access Facility version number. |
ttya |
Indicates the service tag. |
x,u |
Identifies whether the following flags are set: x, which means do not enable the service u, which means create a utmp entry for the service |
root |
Indicates the identity assigned to the service tag. |
reserved |
This field is reserved. |
reserved |
This field is reserved. |
reserved |
This field is reserved. |
/dev/term/a |
Indicates the TTY port pathname. |
/usr/bin/login |
Identifies the full pathname of the service to be invoked when a connection is received. |
:c,b,h,I,r: |
Indicates whether the following flags are set c, sets the connect on carrier flag for the port b, sets the port as bidirectional, allowing both incoming and outgoing traffic h, supresses an automatic hangup immediately after an incoming call is received I, initializes the port r, forces ttymon to wait until it receives a character fromt he port before it prints the login: message. |
9600 |
Identifies the TTY label defined in /etc/ttydefs file |
ldterm,ttcompat |
Identifies the STREAMS modules to be pushed |
ttya login\: |
Identifies the prompt to be displayed |
:y/n: |
|
message |
Identifies any inactive (disabled) response message |
tvi925 |
Identifies the terminal type. |
y |
Indicates whether software carrier is set (y/n). |
The sacadm command controls the states of services. The possible states are shown below.
State |
Notes |
---|---|
Enabled |
Default state - When the port monitor is added, the service operates. |
Disabled |
Default state - When the port monitor is removed, the service stops. |
To determine the state of any particular service, use the following:
# pmadm -l -p portmon_name -s svctag |
The sacadm command controls the states of ttymon and listen port monitors. The possible states are shown below.
State |
Notes |
---|---|
Started |
Default state - When the port monitor is added, it is automatically started. |
Enabled |
Default state - When the port monitor is added, it is automatically ready to accept requests for service. |
Stopped |
Default state - When the port monitor is removed, it is automatically stopped. |
Disabled |
Default state - When the port monitor is removed, it automatically continues existing services and refuses to add new services. |
Starting |
Intermediate state - The port monitor is in the process of starting. |
Stopping |
Intermediate state - The port monitor has been manually terminated, but it has not completed its shutdown procedure. It is on the way to becoming stopped. |
Notrunning |
Inactive state - The port monitor has been killed. All ports previously monitored are inaccessible. An external user cannot tell whether a port is disabled or notrunning. |
Failed |
Inactive state - The port monitor is unable to start and remain running. |
To determine the state of any particular port monitor, use the following:
# sacadm -l -p portmon_name |
Ports may be enabled or disabled depending on the state of the port monitor that controls them.
State |
Notes |
|
---|---|---|
Serial (ttymon) Port States |
||
|
Enabled |
The ttymon port monitor sends a prompt message to the port and provides login service to it. |
|
Disabled |
Default state of all ports if ttymon is killed or disabled. If you specify this state, ttymon will send out the disabled message when it receives a connection request. |
Network (listen) Port States |
||
|
Enabled |
The listen port monitor scans the network for service requests and invokes services in response to those requests. |
|
Disabled |
If the listen port monitor is killed or disabled, the ports it controls are automatically disabled. If you specify this state, listen will send out the Disabled message when it receives a connection request. |