This chapter describes how to manage printing, and the differences in print commands, in the Solaris 7 environment. It also describes serial port management (which enables terminal and modem connections) through Admintool or the Service Access Facility (SAF).
This section describes how to set up and administer printers after you install Solaris 7 software. This chapter also describes the changes to printer commands that have taken place between the SunOS release 4 and the Solaris 7 release environments.
The SunOS release 5.7 LP print service replaces the SunOS release 4 printing facilities, which were provided by the lpd daemon and lpr, lpq, lprm, and lpc commands. Admintool enables youto set up and administer printers through a graphical user interface. You can also use a command-line interface for the LP print service to administer SunOS release 5.7 printers. For detailed information about Admintool and the command-line interface to the LP service, see System Administration Guide, Volume II.
The services provided by the /etc/printcap file in the SunOS release 4 software are handled in the Solaris 7 operating environment by the terminfo database and by the files in the /etc/lp directory.
You can still use many SunOS release 4 print commands if the system is running the SunOS/BSD Source Compatibility Package. Compatibility mode uses SunOS release 4 command names as an interface to underlying Solaris 7 LP print services and does not actually run them the way a SunOS release 4 system would. When a user types SunOS release 4 commands to set up printing or to print files from a Solaris 7 system, the commands create message files that are handled by the SunOS release 5.7 LP print service scheduler.
Solaris 7 printing provides additional capabilities not available in SunOS release 4 systems. These capabilities enable you to control forms, print wheels, and interface programs, and to set up network print services.
As discussed in a previous section, you can continue to use SunOS release 4 print commands if you have the SunOS/BSD Source Compatibility Package. Table 11-1 shows the basic user print command equivalents.
Table 11-1 User Print Command Equivalents
SunOS release 4 |
SunOS release 5.7 |
Function |
---|---|---|
|
Print a file to the default printer |
|
lpr -P printer filename |
lp -d printer file |
Print a file to a specific printer |
Look at a list of the files waiting to print on the default printer |
||
lpstat -d |
Determine which is the default printer |
|
Check /etc/printcap
|
lpstat -a |
Determine which printers are available |
|
|
Cancel a print job on the default printer |
This section describes differences between printer setup and administration on SunOS release 4 and Solaris 7 systems. All the underlying system services described are available only in the Solaris 7 operating environment. The SunOS release 4 counterparts are not available even in compatibility mode.
You must use the System V printer administration commands lpadmin(1M) and lpsystem(1M) , the terminfo database, and the configuration files in the /etc/lp directory. See System Administration Guide, Volume II for details.
Table 11-2 shows the command equivalents for setting up printing.
Table 11-2 Printer Administration, Setup, and File Equivalents
SunOS release 4 |
SunOS release 5.7 |
Function |
---|---|---|
Control line printer functions |
||
/etc/lp/printers/printername/* |
File that defines printer functions |
|
|
Directory where printing system stores spool and lock files |
|
Not available |
Move print queues between printers |
|
lpc down |
Stop queueing to a printer |
In the SunOS release 4 software, you need the following command to send a troff file to the default printer.
% troff filename |
In the Solaris 7 operating environment, you must specify that you want the file printed by piping (|) the output to the lp command. Table 11-3 shows the SunOS release 5.7 troff commands.
Table 11-3 SunOS release 5.7 troff Commands
SunOS release 5.7 Command |
Function |
---|---|
troff file | /usr/lib/lp/postscript/dpost|lp |
Sends to default printer that supports troff jobs |
troff file| /usr/lib/lp/postscript/dpost|lp -d printer |
Sends to a particular printer |
troff file | lp-Ttroff |
This section describes serial port management (which enables terminal and modem connections) through Admintool or the Service Access Facility (SAF).
System Administration Guide, Volume II describes the details of Solaris 7 setup and installation procedures for serial devices.
Admintool enables you to set up and modify serial port software for terminals and modems.
Admintool provides:
Templates for common terminal and modem configurations
Multiple port setup, modification, or deletion
Quick visual status of each port
This tool provides the capabilities of the Service Access Facility's pmadm command.
Using SAF, you can manage access to all services in a similar way, whether they are on the network or attached only to local systems. SAF uses Service Access Control (SAC) commands to set up and manage services. It provides uniform access to system services, such as:
Adding, removing, and modifying terminal line settings
Adding, enabling, disabling, or removing a port monitor
Printing information from administrative database files
Using and administering port monitors
Adding, enabling, disabling, and removing listen(1M) port monitors
In previous versions of SunOS operating systems, the method for controlling devices depended both on the device providing the access and on the location of that device. Managing user access involved editing many device files.
SAF helps isolate the system administrator from these device dependencies and provides a common interface for managing a range of services, including the ability to:
Log in (either locally or remotely)
Access files across the network
SAF's common interface consists primarily of two commands: sacadm and pmadm. The sacadm command controls daemons called port monitors. The pmadm command controls the services associated with the port monitors.
SAF's common interface helps control services called port monitors. A port monitor is a program that continuously monitors for requests to log in or requests to access printers or files.
Once 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 (for example, the login program) that provide the services needed.
There are two types of port monitors included in the Solaris 7 operating environment: ttymon and listen. The listen port monitor controls access to network services and handles remote print and file system requests. The ttymon port monitor provides access to the login services needed by modems and alphanumeric terminals.
SAF's common interface consists primarily of two commands: sacadm and pmadm. The sacadm command controls the port monitors. The pmadm command controls the services associated with the port monitors.
The sacadm command enables you to add and remove port monitors. You can also use the sacadm command to list the status of a port monitor, and to administer configuration scripts for customizing port monitors.
Using the pmadm command, you can add or remove a service, and enable or disable a service. You can, for example, disable all remote logins with one pmadm command. You can also install or replace per-service configuration scripts, or display information about a service.
Using only the sacadm and pmadm commands, a system administrator has complete control over access to resources. However, these two commands are only the interface to the SAF suite of programs and processes that make the integrated management environment possible. The functions and associated programs are:
Overall administration - sacadm
Port monitor service administrator - pmadm
Service Access Control - sac
Port monitors - ttymon and listen
Services - logins, remote procedures
The service access control, sac, is the most important program in the SAF suite. It is launched by the init program when a machine is first started. In turn, sac starts all the port monitors listed in its administrative file.
For more information on the SAF in general, or on the different ways to use the sacadm and pmadm commands, see System Administration Guide, Volume II.