Sun System Admin
Sun System Admin
Volume II
Copyright 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, Californie 94303-4900 Etats-Unis. Tous droits réservés.
Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, la
distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque
moyen que ce soit, sans l’autorisation préalable et écrite de Sun et de ses bailleurs de licence, s’il y en a. Le logiciel détenu par des tiers, et
qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun.
Des parties de ce produit pourront être dérivées du système Berkeley BSD licenciés par l’Université de Californie. UNIX est une marque
déposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company, Ltd.
Sun, Sun Microsystems, le logo Sun, SunSoft, SunDocs, SunExpress, Solstice, Solstice AdminSuite, Solstice DiskSuite, Solaris Solve, Java,
JavaStation, DeskSet, OpenWindows et Solaris sont des marques de fabrique ou des marques déposées, ou marques de service, de Sun
Microsystems, Inc. aux Etats-Unis et dans d’autres pays. Toutes les marques SPARC sont utilisées sous licence et sont des marques de
fabrique ou des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d’autres pays. Les produits portant les marques
SPARC sont basés sur une architecture développée par Sun Microsystems, [Link], LaserWriter, Epson, NEC, Adobe
L’interface d’utilisation graphique OPEN LOOK et SunTM a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés.
Sun reconnaît les efforts de pionniers de Xerox pour la recherche et le développement du concept des interfaces d’utilisation visuelle ou
graphique pour l’industrie de l’informatique. Sun détient une licence non exclusive de Xerox sur l’interface d’utilisation graphique Xerox,
cette licence couvrant également les licenciés de Sun qui mettent en place l’interface d’utilisation graphique OPEN LOOK et qui en outre
se conforment aux licences écrites de Sun.
CETTE PUBLICATION EST FOURNIE “EN L’ETAT” ET AUCUNE GARANTIE, EXPRESSE OU IMPLICITE, N’EST ACCORDEE, Y
COMPRIS DES GARANTIES CONCERNANT LA VALEUR MARCHANDE, L’APTITUDE DE LA PUBLICATION A REPONDRE A UNE
UTILISATION PARTICULIERE, OU LE FAIT QU’ELLE NE SOIT PAS CONTREFAISANTE DE PRODUIT DE TIERS. CE DENI DE
GARANTIE NE S’APPLIQUERAIT PAS, DANS LA MESURE OU IL SERAIT TENU JURIDIQUEMENT NUL ET NON AVENU.
Please
Recycle
Contents
Administering Printers 9
Print Clients 11
Contents iii
Printer Configuration Resources 12
Spooling Space 20
Disk Space 20
Memory 21
Swap Space 21
Hard Disk 21
H How to Convert Printer Information For a System Running the SunOS 5.5.1
Release or Compatible Versions 32
H How to Convert Printer Information For a System Running the SunOS 4.1
Release 32
Setting Up Printing 33
Starting Admintool 35
Contents v
H How to Check the Status of Printers 63
Contents vii
H How to Delete a Form 108
How the lpsched Daemon Tracks the Status of Print Requests 163
Contents ix
H How to Log Out From a Remote System (exit) 182
H How to Copy Files Between a Local and a Remote System (rcp) 193
Terminals 202
Modems 202
Ports 202
Services 203
Admintool 205
11. Setting Up Terminals and Modems With the Service Access Facility
(Tasks) 223
Contents xi
H How to Start a ttymon Port Monitor 233
Contents xiii
Changing File Ownership 269
Contents xv
Benefits of Using PAM 319
H How to Prevent Unauthorized Access from Remote Systems with PAM 329
Contents xvii
H How to Set a System’s Date and Time Manually 373
H How to Display Information About Blocks, Files, and Disk Space 381
H How to Display the User Allocation of Local UFS File System 388
Contents xix
H How to Limit crontab Access to Specified Users 423
Contents xxi
About Monitoring Performance 477
Contents xxiii
H How to Send Packets to Hosts on the Network 535
Contents xxv
What to Do If a File System Fills Up 587
The tmpfs File System Is Full Because the System Ran Out of
Memory 588
The root (/) File System Fills Up After You Back Up a File System 588
Check to Make Sure You Have the Right Current Directory 589
Index 663
Contents xxvii
xxviii System Administration Guide, Volume II ♦ October 1998
About This Book
Note - The term "x86" refers to the Intel 8086 family of microprocessor chips,
including the Pentium and Pentium Pro processors and compatible microprocessor
chips made by AMD and Cynix. In this document the term "x86" refers to the overall
platform architecture, whereas "Intel Platform Edition" appears in the product name.
The following table describes the system administration topics covered in System
Administration Guide, Volume I and System Administration Guide, Volume II.
Most of the overview information about a topic is usually described in the beginning
chapters of each part, and the other chapters provide step-by-step instructions on
system administration tasks that you need to perform. Each set of steps is usually
followed by a way to verify that the task was successfully performed and an
example of how to perform the task.
You can click on any cross reference, represented by underlined text, to quickly
access referenced information in the AnswerBook2 collections. To return to the
previous display, click on Back.
For a list of documents and how to order them, see the catalog section of the
SunExpressSM Internet site at [Link]
xxxi
SPARC and x86 Information
This book provides system administration information for both SPARC and x86
systems. Unless otherwise noted, information throughout this book applies to both
types of systems. Table P–1 summarizes the differences between the SPARC and x86
system administration tasks.
System operation before kernel 4 A programmable read-only 4 The basic input/output system
is loaded memory (PROM) chip with a (BIOS) runs diagnostics and
monitor program runs displays device information.
diagnostics and displays device A Solaris Device Configuration
information. Assistant boot diskette with the
4 It is also used to program default Multiple Device Boot (MDB)
boot parameters and test the program is used to boot from
devices connected to the system. non-default boot partitions, the
network, or CD-ROM.
Booting the system 4 Commands and options at the 4 Commands and options at the
PROM level are used to boot the MDB, primary, and secondary
system. boot subsystems level are used to
boot the system.
Boot programs 4 bootblk, the primary boot 4 mboot, the master boot record,
program, loads ufsboot. loads pboot.
4 ufsboot, the secondary boot
program loads the kernel. pboot, the Solaris partition boot
program, loads bootblk.
4 bootblk, the primary boot
program, loads ufsboot.
ufsboot, the secondary boot
program, loads the kernel.
System shutdown 4 The shutdown and init 4 The shutdown and init
commands can be used without commands are used but require
additional operation intervention. operator intervention at the type
any key to continue prompt.
Disk slices and partitions 4 A disk may have a maximum of 4 A disk may have a maximum of
eight slices, numbered 0-7. four fdisk partitions.
4 The Solaris fdisk partition may 4 The Solaris fdisk partition may
contain up to ten slices, contain up to ten slices,
numbered 0-9, but only 0-7 can numbered 0-9, but only 0-7 can
be used to store user data. be used to store user data.
Diskette drives 4 Desktop systems usually contain 4 Systems may contain two
one 3.5-inch diskette drive. diskette drives: a 3.5-inch and a
5.25 inch drive.
AaBbCc123 Book titles, new words or terms, Read Chapter 6 in User’s Guide.
or words to be emphasized These are called class options.
You must be root to do this.
xxxiii
Shell Prompts in Command Examples
The following table shows the default system prompt and superuser (root) prompt
for the Bourne shell and Korn shell.
Shell Prompt
General Conventions
Be aware of the following conventions used in this book.
4 When following steps or using examples, be sure to type double-quotes ("), left
single-quotes (‘), and right single-quotes (’) exactly as shown.
4 The key referred to as Return is labeled Enter on some keyboards.
4 It is assumed that the root path includes the /sbin, /usr/sbin, /usr/bin, and
/etc directories, so the steps in this book show the commands in these directories
without absolute path names. Steps that use commands in other, less common,
directories show the absolute path in the example.
4 The examples in this book are for a basic SunOS 5.7 software installation without
the Binary Compatibility Package installed and without /usr/ucb in the path.
This part provides instructions for managing printing services in the Solaris
environment. This part contains these chapters.
This chapter provides information about managing printers, print clients, and the LP
print service. This is a list of the overview information in this chapter.
4 “The Solaris Print Software” on page 3
4 “Printing in the Solaris Operating Environment” on page 6
4 “The LP Print Service” on page 8
4 “Using the Print Client Software” on page 10
For step-by-step instructions on print management tasks, see:
4 Chapter 3
4 Chapter 4
4 Chapter 5
4 Chapter 6
3
The Solaris print software limitations include:
4 No support for print servers defined as s5 (the System V print protocol) in
previous Solaris releases.
4 No print filtering on print clients.
See Chapter 3 or the Solstice AdminSuite 2.3 Administration Guide for more
information about setting up a network printer.
Manage Print
Graphical User Set Up Print Clients and Using NIS or
Component Interface? Clients? Servers? NIS+?
Note - If you do not use Solstice Printer Manager to set up and manage printing,
you will have to use some combination of the other components to completely
manage printing in the Solaris environment.
You must run Admintool on the system to which you have attached the printer,
because Admintool does not enable you to make changes to a remote system. When
setting up a printer, Admintool makes the appropriate changes in the system’s
/etc/[Link] and /etc/lp directory as required. You can use Admintool
to set up a system as a print server or print client only if it is running the SunOS 5.6
or 5.7 releases. Setting up SunOS 4.1 print servers and clients is fully described in the
SunOS 4.0 and compatible versions documentation.
Most of your needs for setting up printing services should be met by Admintool.
However, if you have special needs, such as writing scripts, you may want to use the
LP print service commands (which underlie Admintool) directly. The setup process
with commands is described in “How to Add Access on the Print Client using LP
Commands” on page 43.
Administering Printers
After you set up print servers and print clients, there are a number of administration
tasks you may need to perform frequently:
4 Deleting a printer and remote printer access
4 Checking the status of printers
4 Restarting the print scheduler
See Chapter 4 for step-by-step instructions on how to perform the printer
administration tasks.
➊ ➋ ➌ ➍ ➎
Print Client Print Request Print Client Print Server Printer Printed
Command Output
Processing
Print Clients
This section of the overview focuses on the print client, a system that can send print
requests to a print server, and print commands, which enable the print client to
initiate print requests.
Figure 1–2 highlights the part of the print process in which the user submits a print
request from a print client.
➊ ➋ ➌ ➍ ➎
Print Client Print Request Print Client Print Server Printer Printed
Command Output
Processing
Figure 1–2 The User Submits a Print Request from a Print Client
➊ ➋
Print Command Checks:
Print Client
Print Request
User’s
.printers File for
Printer Alias
Print Client’s
/etc/[Link] File
% lp -d neptune filename
4 POSIX style, which is the print command and option followed by server:printer,
as shown in the following example.
➊ ➋ ➌ ➍ ➎
Prin Client Print Request Print Client Print Server Printer Printed
Command Output
Processing
Figure 1–5 The Print Server Sends a Print Request to the Printer
The goal of setting up printers on a network is to give users access to one or more
printers. This section provides information about distributing printers across your
network to gain the best efficiency and about planning for printer setup.
4 “Distributing Printers on the Network” on page 17
4 “Assigning Print Servers and Print Clients” on page 18
4 “Print Server Requirements and Recommendations” on page 20
For step-by-step instructions on print management tasks, see:
4 Chapter 3
4 Chapter 4
4 Chapter 5
4 Chapter 6
17
Figure 2–1 shows an example of how you can have a centralized print configuration
and still connect printers to users’ systems.
Printers connected to
a print server
Figure 2–1 How to Distribute Printers on a Network
Figure 2–2 shows example print configurations on a network with systems running
the SunOS 5.7 and compatible versions and SunOS 4.1 operating systems.
Spooling Space
Spooling space is the amount of disk space that is used to store and process requests in
the print queue. Spooling space is the single most important factor to consider when
deciding which systems to designate as print servers. When users submit files for
printing, the files are stored in the /var/spool/lp directory until they have been
printed. The size of the /var directory depends on the size of the disk and how the
disk is partitioned. Spooling space may be allocated in the /var directory on the
print server hard disk, or mounted from a file server and accessed over the network.
Note - If /var is not created as a separate file system, the /var directory uses space
in the root (/) file system, which is likely to be insufficient.
Disk Space
When evaluating systems as possible print servers, consider their available disk
space. A large spool directory can consume 600 Mbytes of disk space. Look at the
size and division of disk space on systems that can be designated as print servers.
Also, carefully evaluate the printing needs and use patterns of print client systems. If
users in a small group typically print only short email messages— simple ASCII files
without sophisticated formatting requirements—a print server with 20 to 25 Mbytes
of disk space allocated to /var is probably sufficient. If, however, many print client
users are printing large documents or bit-mapped or raster images, they will likely
fill up the spooling space quite frequently. When users cannot queue their jobs for
printing, work flow is interrupted. Requests for more spooling space may force you to
either add disk space for spooling or designate a different system as the print server.
If the print server has a /var directory that resides in a small partition, and if a large
amount of disk space is available elsewhere, you can use that space as spooling
space by mounting it on the /var directory on the print server. See “Mounting and
Unmounting File Systems (Tasks)” in System Administration Guide, Volume I for
information about mounting file systems and editing the vfstab file.
Swap Space
The swap space allocation on the print server should be sufficient to handle LP print
service requirements. See “Configuring Additional Swap Space (Tasks)” in System
Administration Guide, Volume I for information about how to increase swap space.
Hard Disk
For optimal performance, the print server should have a hard disk and a local /var
directory. You should mount spooling space for a print server on a local hard disk. If
a print server has its own hard disk and a local /var directory, printing is much
faster, and you can more accurately predict the time needed to process print requests.
Printing banner pages Yes, but with less functionality than the
lpadmin command
Limiting user access to a printer Yes, but with less functionality than the
lpadmin command
Printer class No
Fault recovery No
Printer Name
When adding a printer to a system, you specify a printer name for the printer. A
printer name must be:
4 Unique among all printers within the bounds of an administrative domain
4 A maximum of 14 alphanumeric characters, which may include dashes and
underscores
Printer Description
You can assign a description to a printer by using the lpadmin -D command or
Admintool. The printer’s description should contain information to help users
identify the printer. You might include the room number where the printer is located,
the type of printer, the manufacturer, or the name of the person to call if there are
printing problems.
Users can look at a printer description by using the following command:
$ lpstat -D -p printer-name
Printer Port
When you install a printer or later change its setup, you can specify the device, or
the printer port, to which the printer is connected, by using Admintool or the
lpadmin -p printer-name -v device-name command.
Most systems have two serial ports and a parallel port. Unless you add ports, you
cannot connect more than two serial printers and a parallel printer to one system.
With Admintool, you can select either /dev/term/a or /dev/term/b, or choose
Other and specify any port name that the print server recognizes. These options
give you as much flexibility as the lpadmin command.
The LP print service initializes the printer port using the settings from the standard
printer interface program. See “Managing Print Filters” on page 100 for more
information about printer interface programs. If you have a parallel printer or a
serial printer for which the default settings do not work, see “Adjusting Printer Port
Characteristics” on page 121 for information about customizing the port settings.
Printer Type
The printer type is a generic name for a type of printer. It identifies the terminfo
database entry that contains various control sequences for the printer. By convention,
printer type is usually derived from the manufacturer’s
TM
model name. For example,
the printer type name for the DECwriter printer is decwriter. However, the
common printer type PS does not follow this convention. PS is used as the printer
type for many models of PostScript printers, such as LaserWriter®I and LaserWriterII
printers.
You can specify the printer type by using the lpadmin -T command or Admintool.
With Admintool, you can specify the printer type only when you are installing a
printer. If you want to change the type of an existing printer, you must delete the
printer and reinstall it by using Admintool, otherwise change the printer type by
using the lpadmin command.
Admintool lets you select a printer type from a menu or choose Other and specify
any printer type in the terminfo database. This provides you as much capability as
the lpadmin command.
$ pwd
/usr/share/lib/terminfo
$ ls
1 4 7 A M a d g j m p s u x
(continued)
2 5 8 B P b e h k n q t v y
3 6 9 H S c f i l o r ti w z
$
Each subdirectory contains compiled database entries for terminals or printers. The
entries are organized by the first letter of the printer or terminal type. For example, if
you have an Epson® printer, look in /usr/share/lib/terminfo/e to find your
particular model of Epson printer.
$ cd /usr/share/lib/terminfo/e
$ ls
emots ep2500+high ep48 ergo4000 exidy2500
env230 ep2500+low epson250 esprit
envision230 ep40 epson2500-80 ethernet
ep2500+basic ep4000 epson2500-h ex3000
ep2500+color ep4080 epson2500-hi8 exidy
$
The entries for Epson printers are included in the preceding example.
$ cd /usr/share/lib/terminfo/n
$ ls
ncr7900 ncr7901 netty-Tabs newhpkeyboard
ncr7900-na nec netty-vi nuc
ncr7900i net network nucterm
ncr7900i-na netronics netx
ncr7900iv netty newhp
$
The entry in this directory for NEC is included in the preceding example.
Both PostScript and simple,postscript PostScript files and ASCII files do not
ASCII require filtering.
Choose the file content type that best matches the printer’s capabilities. PostScript
(which means filtering is not needed for PostScript files) is the default choice in
Admintool and is probably correct most of the time.
Note - Sun Microsystems does not supply filtering software for the printers listed in
Table 2–3, among others. However, you can use unsupported printers if you supply
filtering or if the printer can directly print the file content type. If you have questions
about any printer for which Sun Microsystems does not supply filters, contact the
printer manufacturer.
Daisy daisy
Datagraphix datagraphix
DECwriter decwriter
Diablo diablo
diablo-m8
epson2500-80
epson2500-hi
epson2500-hi80
If you want to set up a printer that is not in the terminfo database, see “How to
Add a terminfo Entry for an Unsupported Printer” on page 127.
This chapter explains how to set up a printer and make it accessible to systems on
the network. You can perform most printer setup tasks by using Admintool. This is a
list of the step-by-step instructions in this chapter.
4 “How to Convert Printer Information For a System Running the SunOS 5.5.1
Release or Compatible Versions” on page 32
4 “How to Convert Printer Information For a System Running the SunOS 4.1
Release” on page 32
4 “How to Start Admintool” on page 35
4 “How to Add a Local Printer Using Admintool” on page 36
4 “How to Add Printer Access on the Print Client Using Admintool” on page 42
4 “How to Add Access on the Print Client using LP Commands” on page 43
4 “How to Add Domain-Wide Access to a Printer using NIS” on page 44
4 “How to Add Domain-Wide Access to a Printer using NIS+” on page 45
4 “How to Use the /etc/[Link] File to Load NIS” on page 46
4 “How to Use the /etc/[Link] File to Load NIS+” on page 47
4 “How to Add a Network Printer Using Printer Vendor Supplied Tools” on page 53
4 “How To Add A Network Printer Using LP Commands” on page 54
For overview information about printers, see Chapter 1.
29
Updating Print Clients to Access
Existing Printers
This section explains how to convert the printer configuration information from
systems running the SunOS 5.5.1 release and compatible versions at your site and
copy this information to print clients so they can access existing printers.
Note - If you have only a few existing printers, it may be easier to add access to the
printers by using Solstice Printer Manager or Admintool rather than convert the
printer configuration information and distribute it to print clients. See Table 3–2
information on adding access to printers.
Convert Existing Printer Convert Printer Configuration Information For “How to Convert Printer
Configuration Information Systems Running the SunOS 5.5.1 Release and Information For a System
Compatible Versions Running the SunOS 5.5.1
Release or Compatible
If your site uses SunOS 5.5.1 release and
Versions” on page 32
compatible versions, convert the printer
configuration information in the /etc/lp/
printers directory to the /etc/
[Link] configuration file. This is
usually a one-time task.
Caution - If you are using the NIS or NIS+ name service to configure printer
information, do not use a /etc/[Link] file on your print clients. A print
client uses the /etc/[Link] file first to locate a printer; however, the
/etc/[Link] file may conflict with the printer information in the NIS or
NIS+ maps and cause unexpected results. To avoid this problem, remove the
/etc/[Link] file on print clients when you want them to use NIS or NIS+
for printer information.
# /usr/lib/print/conv_lp
# /usr/lib/print/conv_lpd
3. Add Access to Existing Copy a Master /etc/[Link] File to Clients “Enabling Print Clients to
Printers
Access Existing Printers” on
If you don’t use a name service, copy the
page 46
printer configuration information in the
converted system’s /etc/[Link]
file to other print clients.
4. Set Up a .printers File Optional. Using a $HOME/.printers file “Setting Up a .printers File”
enables users to establish their own custom on page 47
printer aliases.
5. Add a Network Printer Using Printer Vendor Supplied Tools “How to Add a Network
Printer Using Printer Vendor
After physically connecting the printer to the
Supplied Tools” on page 53
network, use vendor-supplied software to
configure the network printer.
6. Turn Off Banner Pages Optional. You can turn off banner pages so “How to Turn Off Banner
they are never printed. Pages” on page 70
7. Set Up Fault Alerts Optional. You can set up more specific fault “How to Set Fault Alerts for a
alerts for the printer than Admintool Printer” on page 72
provides.
8. Set Up Fault Recovery Optional. Admintool does not enable you to “How to Set Printer Fault
set up how a printer should recover after it Recovery” on page 75
faults.
9. Limit Access to the Printer Optional. Admintool enables you to set up an “How to Limit User Access to a
allow list, but if you want to limit a few Printer” on page 77
users’ access to the printer, you may want to
set up a deny list.
Starting Admintool
How to Start Admintool
1. Verify that the following prerequisites are met. To use the Admintool software,
you must have:
4 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.
4 Running an X Window System, such as the OpenWindows environment.
4 Membership in the sysadmin group (group 14).
$ admintool &
A printer can be added using either Admintool or the LP print service commands.
The following describes how to use each of these.
# pkginfo package_instance
2. Connect the printer to the printer server and turn on the power to the printer.
3. Start Admintool on the printer server where you connected the printer.
See the procedure on “How to Start Admintool” on page 35 for detailed
information.
6. Click on OK.
The printer is displayed in the Admintool Printers window.
7. Exit Admintool.
Click on button in upper-left corner; select quit.
# pkginfo package_instance
2. Connect the printer to the printer server and turn on the power to the printer.
Consult the printer vendor’s installation documentation for information about the
hardware switches and cabling requirements.
# chown lp /dev/term/device
# chmod 600 /dev/term/device
4. Define the printer name, the device, the printer type and content type by using
the lpadmin(1M) command.
a. Define the printer name and the port device the printer will use.
# lpfilter -l -f all
b. If you have determined that filter installation is needed, use the lpfilter
command to install the filters.
# cd /etc/lp/fd
# for filter in *.fd;do
> name=‘basename $filter .fd‘
> lpfilter -f $name -F $filter
> done
(continued)
6. Allow the printer to accept printer requests and enable the printer to print the
requests.
# accept printer-name
# enable printer-name
# lpstat -p printer-name
4. Click on OK.
The printer is displayed in the Admintool Printers window.
5. Exit Admintool.
Click on button in upper-left corner; select quit.
# lpstat -p printer-name
2. Create a [Link] file by using the lpset command for each printer.
2. (Optional) If FNS has not been initialized, create the root organization context
and its subcontents for the NIS+ root domain.
2. Copy the system’s /etc/[Link] file to the NIS master server’s /etc
directory.
See the Federated Naming Service Programming Guide if you need information
about entering this command.
2. Start the file editor you want to use to create a .printers file in the user’s
home directory.
3. (Optional) Set up the _default alias to make a specific printer your default
printer, using an entry similar to the one shown in the following example.
# _default printer_name
4. (Optional) Set up the _all alias to define the printers affected when you
cancel a print request or check the status of printers, using an entry similar to
the one shown in the next example.
or
lpadmin -p printer_name -o protocol=tcp
If the protocol selected is the BSD print protocol, you may further select the order of
sending the control file to the printer. Some printers expect the control file, then the
data file; others the reverse. See the printer vendor documentation for this
information. The default is to send the control file first.
The command to select the ordering is:
lpadmin -p printer_name -o bsdctrl=first
or
lpadmin -p printer_name -o bsdctrl=last
printer_node-name[:port_designation]
The timeout value does not impact the success or failure of the print process. It is a
seed value which the software uses as the initial timeout count; on repeated failures,
this count is increased. A message is sent to the spooler when repeated attempts to
connect to the printer fail. This alerts the user that intervention may be required.
This could be anything from the printer being turned off, to out of paper. Should
these messages be produced too often, for example when the printer is warming up,
increasing the timeout value will eliminate spurious messages.
The system administrator can experiment to find the optimal timeout value. The
command to set the timeout is:
lpadmin -p printer_name -o timeout=n
The default device for the network printer is /dev/null. This is sufficient when
there is only one queue for the printer. Should more queues be required, set the
device to a file. This enables the print system to restrict access to the printer across
queues. The following commands create a device file and configure it as the network
printer device.
# touch /var/tmp/devtreedown
# chmod 600 /var/tmp/devtreedown
# lpadmin -p treedown -v /var/tmp/devtreedown
2. Follow the printer vendor instructions to add the network printer to a SunOS
5.7 system that has an SVR4 LP print spooler.
Use the printer vendor instructions to configure the network printer. These will
be specific to the vendor and printer.
1. Connect the printer to the network and turn on the power to the printer.
Consult the printer vendor’s installation documentation for information about the
hardware switches and cabling requirements. Get an IP address and select a name
for the printer node. This is equivalent to adding any node to the network.
3. Define the printer name, the device, the printer type and content type by using
the lpadmin(1M) command.
a. Define the printer name and the port device the printer will use.
The interface script that is supplied with the SunSoft network printer support
software is /usr/lib/lp/model/netstandard.
d. Specify the file content types of the printer and the printer type.
# cd /etc/lp/fd
# for filter in *.fd;do
> name=‘basename $filter .fd‘
> lpfilter -f $name -F $filter
> done
5. Enable the printer to accept printer requests and to print the requests.
# lpstat -p printer-name
The commands in this example must be executed on the print server. The following
information is used in the example and may change depending on your situation:
(continued)
16
# lpadmin -p luna1 -I postscript -T PS
# cd /etc/lp/fd
17
# for filter in *.fd;do
> name=‘basename $filter .fd‘
> lpfilter -f $name -F $filter
> done
18
# accept luna1 destination "luna1" now accepting requests
# enable luna1 printer "luna1" now enabled
19
# lpadmin -p luna1 -D "Room 1954 ps"
20
# lpstat -p luna1
printer luna1 is idle. enabled since Jun 16 10:25 1998.
available.
16. Specifies the file content types to which the printer can print directly, and the printer type.
17. Adds print filters to the print server.
18. Accepts print requests for the printer and enables the printer.
19. Adds a description for the printer.
20. Verifies that the printer is ready.
This chapter provides the procedures to administer printers. This is a list of the
step-by-step instructions in this chapter.
4 “How to Delete a Printer and Remote Printer Access” on page 60
4 “How to Check the Status of Printers” on page 63
4 “How to Stop the Print Scheduler” on page 65
4 “How to Restart the Print Scheduler” on page 66
4 “How to Add a Printer Description” on page 66
4 “How to Set a System’s Default Printer” on page 68
4 “How to Make Banner Pages Optional” on page 69
4 “How to Turn Off Banner Pages” on page 70
4 “How to Define a Class of Printers” on page 71
4 “How to Set Fault Alerts for a Printer” on page 72
4 “How to Set Printer Fault Recovery” on page 75
4 “How to Limit User Access to a Printer” on page 77
4 “How to Check the Status of Print Requests” on page 79
4 “How to Accept or Reject Print Requests for a Printer” on page 81
4 “How to Enable or Disable a Printer” on page 84
4 “How to Cancel a Print Request” on page 85
4 “How to Cancel a Print Request From a Specific User” on page 86
4 “How to Move Print Requests to Another Printer” on page 88
4 “How to Change the Priority of a Print Request” on page 89
For overview information about printing and the LP print service, see Chapter 1.
59
Managing Printers and the Print
Scheduler
This section provides instructions for day-to-day tasks you perform to manage
printers and the print scheduler.
Information for the specified printer is deleted from the print client’s
/etc/lp/printers directory.
3. If the print client does not use another printer on the same print server, delete
information about the print server from the print client.
The print server is deleted from the print client’s /etc/lp/Systems file.
4. Repeat Step 2 on page 60 through Step 3 on page 61 on each print client that
has access to the printer.
This step prevents any new requests from entering the printer’s queue while you
are in the process of removing the printer. See “How to Accept or Reject Print
Requests for a Printer” on page 81 for a detailed description.
8. Move any print requests that are still in the queue to another printer.
See “How to Move Print Requests to Another Printer” on page 88 for a detailed
description on how to move print requests to another printer.
Configuration information for the printer is deleted from the print server’s
/etc/lp/printers directory.
10. Delete information about the print clients that were using the printer you just
deleted, unless they are still using another printer on the print server.
print-client Name of the print client you want to delete from the print server.
You can specify multiple print clients in this command. Use a space
or a comma to separate print client names. If you use spaces, enclose
the list of print clients in quotes.
The specified print clients are deleted from the print server’s /etc/lp/Systems
file.
You should receive an error indicating that the printer does not exist in the
output of the above command.
b. Check the printer information has been deleted on the print server.
$ lpstat -d
system default destination: luna
In the following example, the command requests the status of the printer luna.
$ lpstat -p luna
printer luna is idle. enabled since Jun 16 10:09 1998. available.
$ lpstat -p luna -l
printer luna is idle. enabled since Jun 16 10:11 1998.
available.
Content types: any
Printer types: unknown
Description: Printer by server room.
Users allowed:
(all)
Forms allowed:
(none)
Banner not required
Character sets:
(none)
Default pitch:
Default page size:
# lpstat -r
If the print scheduler is not running, the message scheduler is not running
is displayed.
# /usr/lib/lp/lpshut
# lpstat -r
If the print scheduler is not running, the message scheduler is not running
is displayed.
# /usr/lib/lp/lpsched
-p printer-name Name of the printer for which you are adding a description.
$ lpstat -p printer-name -l
# lpadmin -d [printer-name]
$ lpstat -d
# lpadmin -d luna
# lpstat -d
system default destination: luna
-p printer-name Name of the printer for which you are making banner pages
optional.
If you want to force a banner page to print with every print request, specify the
−o banner option.
The banner page setting is entered in the print server’s
/etc/lp/printers/printer-name/configuration file.
3. Verify the output from the following command contains the line
Banner not required.
$ lpstat -p printer-name -l
# cd /etc/lp/interfaces
3. Edit the file that has the name of the printer for which you want to turn off
banner pages.
nobanner="yes"
Change the nobanner variable to no if you want to turn banner pages on again.
The banner page setting is entered in the print server’s
/etc/lp/printers/printer-name/configuration file.
5. Submit a print request to the printer to make sure a banner page does not print.
Class names, like printer names, must be unique and may contain a maximum of 14
alphanumeric characters and underscores.
You are not obligated to define printer classes. You should add them only if you
determine that using printer classes would benefit users on the network.
The specified printer is added to the end of the list in the class in the print
server’s /etc/lp/classes/printer-class file. If the printer class does not exist, it
is created.
$ lpstat -c printer-class
’write [user-name]’ Send the alert message to the root or lp console window
on the print server, or to the console window of the
specified user-name, which is a name of a user. The
specified user must be logged in to the print server to get
the alert message.
’command’ Run the command file for each alert. The environment
variables and current directory are saved and restored
when the file is executed.
quiet Stop alerts until the fault is fixed. Use this when you
(root or specified user) receive repeated alerts.
none Do not send any alerts. This is the default if you don’t
specify fault alerts for a printer.
-A alert Specifies what kind of alert will occur when the printer faults.
See Table 4–2 for detailed information about the valid values
for alert. Some valid values are mail, write, and quiet.
-W minutes Specifies how often (in minutes) the fault alert will occur. If
you don’t specify this option, the alert is sent once.
3. Check the information following the On fault heading from the output of the
following command.
$ lpstat -p printer-name -l
In the following example, the command sets up the printer venus to send fault
alerts to the console window, with reminders every 10 minutes.
In the following example, the command stops fault alerts for the printer mercury.
In the following example, the command stops fault alerts until the printer venus has
been fixed.
wait After a fault recovery, printing stops until you enable the
printer. After you enable the printer (enable command),
printing starts at the top of the page where printing
stopped. This recovery option requires a print filter.
2. Set up fault recovery for the printer with the lpadmin(1M) command.
3. Check the information following the After fault heading in the output of
the following command.
$ lpstat -p printer-name -l
Do not create allow and deny lists, or if you All users may access the printer.
leave both lists empty
Specify all in the allow list All users may access the printer.
Specify all in the deny list All users, except root and lp (on the server),
are denied access to the printer.
Make any entry in the allow list The deny list is ignored. Only those users
who are listed can access the printer.
Create a deny list, but you do not create an Users who are listed in the deny list are
allow list or you leave the allow list empty denied access to the printer.
Because the print server is actually controlling access to the printer, allow and deny
lists can only be created on the print server itself. If you create allow and deny lists,
the print server will exclusively control user access to printers.
Table 4–4 lists the values you can add to an allow or deny list to limit user access to
a printer.
-p printer-name Name of the printer to which the allow or deny user access
list applies.
-u allow:user-list User names to be added to the allow user access list. You can
specify multiple user names with this command. Use a space
or a comma to separate names. If you use spaces, enclose the
list of names in quotes.
-u deny:user-list User names to be added to the deny user access list. You can
specify multiple user names with this command. Use a space
or a comma to separate names. If you use spaces, enclose the
list of names in quotes.
The specified users are added to the allow or deny user access list for the printer
in one of the following files on the print server:
/etc/lp/printers/printer-name/[Link]
/etc/lp/printers/printer-name/[Link]
$ lpstat -p printer-name -l
In the next example, the command denies the users nathan and george access to
the printer asteroid.
When a user submits a print request from a print client, the print request is added to
a queue on the print server before it is sent to the printer. While a print request is in
the queue, you can cancel or gain status information on the request from a client
system. To move, hold, resume, or change the priorities of print requests you must
login to the print server. These actions can help you keep printing services operating
smoothly.
The LP commands enable you to perform all print request management tasks.
Admintool enables you to perform some print request management tasks when you
Table 4–6 lists the values for changing the priority of a print request with the lp -H
command.
2. Check the status of printers and print requests by using the lpstat command.
When used to check the status of print requests, the lpstat command displays
one line for each print request. From left to right, the line shows the request ID,
the user, the output size in bytes, the date and time of the request, and
information about the request, such as “being filtered.”
$ lpstat
luna-1 fred 1261 Mar 12 17:34
In the following example, the command shows that the user paul currently has no
print requests in queue.
$ lpstat -u paul
In the following example, the command shows that there are two print requests on
the printer moon.
You must enable the printer whenever it has been disabled, which may happen
when a printer fault occurs. When you enable a printer, it prints requests from the
print queue until the queue is empty, even if the print service rejects additional
requests for the print queue.
Figure 4–1 shows the point at which processing of print requests is interrupted when
a printer is disabled.
enable
disable
2. Stop accepting print requests for the printer by using the reject(1M)
command.
printer-name Name of the printer that will stop accepting print requests.
The queued requests will continue printing as long as the printer is enabled. For
instructions on disabling a printer so it stops printing, see “How to Enable or
Disable a Printer” on page 84.
3. Start accepting print requests for the printer by using the accept(1M)
command.
# accept printer-name
4. Check the status of the printer to see whether it is accepting or rejecting print
requests by using the lpstat command.
$ lpstat -p printer-name
In the following example, the command sets the printer luna to accept print requests.
# accept luna
destination "luna" now accepting requests
Command Function
accept Accept print requests that are sent to the print queue.
reject Reject print requests that are sent to the print queue.
accept
reject
Figure 4–2 What Happens When a Print Queue Accepts or Rejects Requests
2. Stop printing print requests on the printer by using the disable command.
disable Cancels the current job, then disables the printer. The current
job is saved to reprint when the printer is enabled.
Cancels the current job, then disables the printer. The current
−c
job is not printed later.
printer-name Name of the printer that will stop printing print requests.
Note - You cannot enable or disable classes of printers. Only individual printers
can be enabled or disabled.
3. Start printing print requests on the printer by using the enable command.
# enable printer-name
$ lpstat -p printer-name
# enable luna
printer "luna" enabled
2. Determine the request IDs of the print requests to cancel by using the lpstat
command.
See “How to Check the Status of Print Requests” on page 79 for more details.
printer-name Specifies the printer for which you want to cancel the
currently printing print request.
You can specify multiple printer names with this command.
Use a space or a comma to separate printer names. If you use
spaces, enclose the list of printer names in quotes.
$ lpstat -o printer-name
In the following example, the command cancels the print request that is currently
printing on the printer luna.
# cancel luna
request "luna-9" cancelled
2. Cancel a print request from a specific user with the cancel command.
printer-name Specifies the printer for which you want to cancel the
specified user’s print requests.
In the following example, the command cancels all the print requests submitted by
the user george on all printers.
# cancel -u george
request "asteroid-3" cancelled
request "luna-8" cancelled
2. (Optional) Check the request IDs of the print requests on the original printer.
# lpstat -o printer-name1
# lpstat -p printer-name2
4. Move all the print requests from the original printer to the destination printer.
printer-name1 Name of the printer from which all print requests will be
moved.
printer-name2 Name of the printer to which all print requests will be moved.
If some requests cannot be printed on the destination printer, they are left in the
original printer’s queue. By using request IDs, you can also move specific print
requests to another printer with the lpmove command.
# accept printer-name1
$ lpq -P printer-name1
Make sure all specified print requests were moved to the destination printer’s
queue by using the following command.
$ lpq -P printer-name2
4 Putting any print request on hold if it has not finished printing. Putting a request
on hold stops it, if it is currently printing, and keeps it from printing until you
resume printing it. Other print requests go ahead of the on-hold request.
4 Moving any print request to the head of the queue, where it will be the next job
eligible for printing. If you want a job to start printing immediately, you can
interrupt the job that is currently printing by putting it on hold.
4 Changing the priority of a job still waiting to be printed, moving it in the queue so
it is ahead of lower priority requests and behind requests at the same level or at a
higher priority.
2. Determine the request IDs of the print requests whose priority you want to
change by using the lpstat command.
See “How to Check the Status of Print Requests” on page 79 for more information.
# lp -i request-id -H change-priority
You can also use the lp -q command to change the priority level of a specified
print request. You can change the priority level from 0, the highest priority, to 39,
the lowest priority.
# lp -i asteroid-79 -q 1
91
Managing Character Sets
Printers differ in the method they use to print text in various font styles. For
example, PostScript printers treat text as graphics. These printers can generate text in
different fonts, and place the text in any position, size, or orientation on the page.
Other types of printers support a more limited number of font styles and sizes, using
either print wheels, font cartridges, or preprogrammed selectable character sets.
Usually, only one of these printing methods applies to a given printer type.
Print wheels and font cartridges, from the perspective of the LP print service, are
similar, because someone must intervene and mount the hardware on the printer,
when needed. Character sets that require you to physically mount a wheel or
cartridge are referred to as hardware character sets. Character sets that do not require
hardware mounting, that come preprogrammed with the printer, and can be selected
by a print request, are referred to as software character sets.
When you set up a non-PostScript printer, you need to tell the LP print service which
print wheels or selectable character sets are available to users. When users submit
print requests, the lp -S command enables them to specify a print wheel or
selectable character set to use for the print job. Users do not have to know which
type of character set applies; they just refer to the font style by the name you have
defined. For example, you may have defined a print wheel as gothic. To request the
gothic print wheel, the user would enter lp -S gothic.
The csn option is an abbreviation for character set number. The number starts with 0,
which is always the default character set number after the printer is initialized. You
can repeat the command, using −1, −2, −3, and so on in place of the −0, to display
the names of the other character sets. For each selectable character set, a terminfo
name (for example, usascii, english, finnish, and so forth) is returned.
In general, the terminfo character set names should closely match the character set
names used in the manufacturer’s documentation for the printer. Because
manufacturers do not all use the same character set names, the terminfo character
set names may differ from one printer type to the next.
Note - If you do not specify the selectable character sets that can be used with a
printer, the LP print service assumes that the printer can accept any character set
name (such as cs0, cs1, or cs2) or the terminfo name known for the printer.
Users can use the lpstat -p -l command to display the names of the selectable
character sets that you have defined for each printer on a print server.
Note - Character sets for PostScript printers are not listed when you use the
lpstat -p -l command because the PostScript fonts are controlled by PostScript
filters, not by entries in the terminfo database. See “Managing Fonts” on page 115
for information about how to administer PostScript fonts.
2. Define a print wheel or font cartridge that can be used with the printer.
-p printer-name Name of the printer for which you are defining a print wheel
or font cartridge.
The print wheel or font cartridge definition is added in the print server’s
/etc/lp/printers/printer-name/configuration file.
4. Define the same print wheel or font cartridge for the print client.
In this command, the variables are the same as those in Step 2 on page 94.
The print wheel or font cartridge definition is added in the print client’s
/etc/lp/printers/printer-name/configuration file.
5. Repeat Step 3 on page 94 and Step 4 on page 94 for each print client that may
need to use the print wheel or font cartridge.
$ lpstat -p printer-name -l
2. Unmount the print wheel or font cartridge that is in the printer by using the
lpadmin command.
The current print wheel or font cartridge is deleted from the print server’s
/etc/lp/printers/printer-name/configuration file.
5. Mount the new print wheel or font cartridge by using the lpadmin command.
6. Check the information under the Print wheels or Character set heading
in the output of the following command. You should see the name of the print
wheel or character set and the notation (mounted)
$ lpstat -p printer-name -l
-A alert Specifies what kind of alert will occur when a print wheel or
font cartridge is requested. See Table 4–2 for detailed
information about the valid values for alert. Some valid
values are mail, write, and quiet.
If you specify mail or write, a predefined alert message
says to mount the specified print wheel or font cartridge and
includes the names of one or more printers that have been set
up to use such a print wheel or cartridge.
-Q requests Specifies the number of print requests that require the print
wheel or font cartridge that must be in the queue before an
alert occurs. If you don’t specify this option, only one print
request in the queue triggers an alert.
-W minutes Specifies how often (in minutes) the alert will occur. If you
don’t specify this option, the alert is sent only once.
3. Verify that the alert has been added for the print wheel or font cartridge by
checking the output of the following command.
Otherwise, if you have set a low number of print requests to trigger the alert,
submit enough print requests to meet the minimum requirement and make sure
you receive an alert to mount the print wheel or font cartridge.
In the following example, the command sets email alerts to occur every minute for
the finnish font cartridge when there are five print requests for finnish in the
print queue.
In the following example, the command sets console-window alerts to occur every 10
minutes for the elite print wheel when there are five print requests for elite in
the print queue.
In the following example, the command sets no alerts to occur for the elite print
wheel.
2. Display the names of the selectable character sets for the specified printer type
by using the tput(1) command.
-S select-charset Selectable character set name for which to set an alias. The
name can be found in Step 2 on page 98.
Alias for the specified selectable character set. This alias can
alias
be used in addition to the selectable character set name.
You can set up more than one alias with this command. Use
commas or spaces to separate the aliases. If you use spaces,
enclose the list of aliases in quotes.
In this command, the variables are the same as those in Step 3 on page 98.
The alias is added in the print client’s
/etc/lp/printers/printer-name/configuration file.
6. Repeat Step 4 on page 99 and Step 5 on page 99 for each print client that may
need to use the alias.
7. Verify that the selectable character set alias is listed in the output of the
following command on the print server and print clients.
$ lpstat -p printer-name -l
Otherwise, submit a print request that uses the alias for the selectable character
set and check for output.
You use the lpfilter(1M) command to manage the list of available filters. System
information about filters is stored in the /etc/lp/[Link] file. The
lpfilter command gets the information about filters to write to the table from filter
descriptor files. The filter descriptor files supplied (PostScript only) are located in the
/etc/lp/fd directory. The actual filter programs are located under /usr/lib/lp.
The LP print service imposes no fixed limit on the number of print filters you can
define. You may remove filters that are no longer used to avoid extra processing by
the LP print service. (LP examines all filters to find one that works for a specific print
request.) If in doubt, do not remove a filter.
As you add, change, or delete filters, you may overwrite or remove some of the
original filters provided by the LP print service. You can restore the original set of
filters, if necessary, and remove any filters you have added.
SunOS 5.7 system software provides a default set of PostScript filters, which
Admintool automatically adds to a print server. Some of the TranScript filters used
with SunOS 4.1 have SunOS 5.7 equivalents, but others do not. Table 5–1 lists the
default PostScript filters and identifies the TranScript filters, where applicable.
2. Add a print filter that is based on a print filter definition by using the
lpfilter command.
3. Verify that the print filter was added by checking for information about the
print filter in the output of the following command.
# lpfilter -f filter-name -l
# lpfilter -f filter-name -x
The print filter is deleted from the print server’s /etc/lp/[Link] file.
3. Verify that filter was deleted by using the following command. You should
receive an error indicating that no filter by the specified name exists.
# lpfilter -f filter-name -l
# lpfilter -f daisytroff -x
# lpfilter -f filter-name -l
In the following example, the command requests information for the postdaisy
print filter, and the information that is displayed in response.
# lpfilter -f postdaisy -l
Input types: daisy
Output types: postscript
Printer types: any
Printers: any
Filter type: slow
Command: /usr/lib/lp/postscript/postdaisy
Options: PAGES * = -o*
Options: COPIES * = -c*
Options: MODES group = -n2
Options: MODES group\=\([2-9]\) = -n\1
Options: MODES portrait = -pp
Options: MODES landscape = -pl
Options: MODES x\=\(\-*[\.0-9]*\) = -x\1
Options: MODES y\=\(\-*[\.0-9]*\) = -y\1
Options: MODES magnify\=\([\.0-9]*\) = -m\1
In the following example, the command displays all the print filters that have been
added to the system, and the information that is displayed in response.
(continued)
(Filter "postreverse")
Filter type: slow
Managing Forms
A form is a sheet of paper on which information is printed in a predetermined
format. Unlike plain paper stock, forms usually have text or graphics preprinted on
them. Common examples of forms are company letterhead, invoices, blank checks,
receipts, and labels.
The term form has two meanings: the physical medium (the paper) and the software
that defines a form to the LP print service.
The LP print service allows you to control the use of forms. This section provides
information about adding, changing, removing, mounting, and controlling access to
forms.
To change a form, you must re-add the form with a different definition.
The LP print service imposes no limit on the number of forms you can define.
However, you should delete forms that are no longer appropriate. Obsolete forms
may result in unnecessary processing by the print service.
Tracking Forms
The LP print service helps you track which forms are mounted on each printer and
notifies you when it cannot find a description it needs to print a form. You are
responsible for creating form descriptions and mounting and unmounting form
paper in each printer, either as part of setting up a printer or in response to alerts
from the LP print service.
Users can specify the form on which they want a job to print. As root, you can
mount a specific form, then tell the LP print service that the form is available and on
which printer it is mounted. Users can submit print requests specifying a particular
form. When the LP print service receives the request, it sends an alert message to
root requesting that you mount the form.
Checking Forms
When you have defined a form for the LP print service, you can check it with either
of two commands, depending on the type of information you want to check.
2. Add a form that is based on a form definition by using the lpforms command.
3. Verify that the form was added by checking for a listing of information about
the form in the output of the following command.
# lpforms -f form-name -l
Note - Before the form can be used, one or more printers must be given access to the
form. See “How to Limit Printer Access to a Form” on page 114.
# lpforms -f form-name -x
3. Verify that form was deleted by using the following command. You should
receive an error indicating that a form by the specified name does not exist.
# lpforms -f form-name -l
Example—Deleting a Form
In the following example, the command deletes the medical form.
# lpforms -f medical -x
# reject printer-name
New print requests (which may not require the form) are not allowed to enter the
printer’s queue.
In this command, the variable printer-name is the same as in Step 2 on page 109.
The current form is deleted from the print server’s
/etc/lp/printers/printer-name/configuration file.
# accept printer-name
$ lpstat -p printer-name -l
Otherwise, submit a print request that requires the new form and check the
printer for output.
# reject luna
destination "luna" will no longer accept requests
# lpadmin -p luna -M f none
# accept luna
destination "luna" now accepting requests
The following example shows the process of mounting the medical form on the
printer luna.
# reject luna
destination "luna" will no longer accept requests
# lpadmin -p luna -M f medical -a -o filebreak
# accept luna
destination "luna" now accepting requests
2. Set a request alert for mounting a form by using the lpadmin command.
-Q requests Specifies how many print requests that require the form must
be in the queue to trigger an alert. If you don’t specify this
option, an alert occurs with just one print request in the
queue.
-W minutes Specifies how often (in minutes) the alert will occur. If you
don’t specify this option, the alert is sent once.
3. Verify that the alert has been added for the form by checking the output of the
following command.
Otherwise, if you have set a low number of print requests to trigger the alert,
submit print requests to meet the minimum requirement and make sure you
receive an alert to mount the form.
In the following example, the command sets email alerts to occur every five minutes
for the letterhead form when there are 10 print requests for letterhead in the
print queue.
In the following example, the command sets console window alerts to occur every 10
minutes for the letterhead form when there are five requests for letterhead in
the print queue.
In the following example, the command sets no request alerts for the invoice form.
# lpforms -f form-name -l
-f form-name Form for which you want to view information. Specify all
for form-name to view information about all the available
forms.
# lpforms -f medical -l
Page length: 62
Page width: 72
Number of pages: 2
Line pitch: 6
Character pitch: 12
Character set choice: pica
Ribbon color: black
Comment:
Medical claim form
In the following example, the command redirects the information about the medical
form to a file. (This command creates the form definition for the form.) This is useful
if a form definition gets removed unintentionally.
2. Request information about the current status of a form by using the lpstat(1)
command.
$ lpstat -f form-name
Form for which you want to view the current status. Specify all for
−f form-name
form-name to view the current status of all the forms.
$ lpstat -f medical,payroll
form medical is available to you
deny:user-list Represents users to be added to the deny user access list. Use
a comma or a space to separate users’ login IDs. If you use
spaces, enclose the list of IDs in quotes. Table 4–4 provides
the valid values for user-list.
The specified user(s) are added to the allow or deny user access list for the
specified form in one of the following files on the print server:
/etc/lp/forms/form-name/allow/etc/lp/forms/form-name/deny
3. Verify the allow and deny user access lists by using the lpforms command.
# lpforms -f form-name -l
In the following example, the command denies users jones and smith access to the
dental form.
The specified form(s) are added to the allow or deny forms list in one of the
following files on the print server:
/etc/lp/printers/printer-name/[Link] /etc/lp/printers/printer-name/[Link]
3. Verify the allow and deny forms lists by using the following command.
# lpstat -p printer-name -l
In the following example, the command denies the printer luna from accessing the
medical, dental, and check forms.
Managing Fonts
If you have a laser printer, you may need to install and maintain PostScript fonts. You
may also have to decide where to install PostScript fonts and how to manage them.
For many printers, the fonts are set up as part of the printer installation process.
PostScript fonts are stored in outline form, either on the printer or on a system that
communicates with the printer. When a document is printed, the PostScript
interpreter generates each character as needed (in the appropriate size) from the
outline description of it. If a font required for a document is not stored on the printer
/etc/lp/printers/printer-name/residentfonts
You must edit the files containing the list of printer-resident fonts by using a text
editor such as vi.
1. It searches the PostScript document to determine which fonts are requested. These
requests are documented with the following PostScript structuring comments:
%%DocumentFonts: font1 font2 … in the header comments.
2. It searches the list of printer-resident fonts to determine if the requested font must
be downloaded.
3. If the font is not resident on the printer, the download filter searches the
host-resident font directory (by getting the appropriate file name from the map
table) to determine if the requested font is available.
4. If the font is available, the filter takes the file for that font and appends it to the
file to be printed.
5. It sends the font definition file and the source file (the file to be printed) to the
PostScript printer.
The fonts available for use with PostScript printers are stored in directories you
create called /usr/share/lib/hostfontdir/typeface/font, where typeface is
replaced by a name like palatino or helvetica, and font is replaced by a name
like bold or italic.
# cd /etc/lp/printers/printer-name
# touch residentfonts
This file may not exist if this is the first time you are adding permanently
downloaded fonts.
4. Edit the residentfonts file by adding all the printer-resident fonts and fonts
to be permanently downloaded.
You can use any text editor, such as vi.
# cd /usr/share/lib
# mkdir hostfontdir
3. Create a directory for a new typeface, if the directory does not already exist.
# mkdir typeface
# cp filename /usr/share/lib/hostfontdir/typeface/font
5. Add the name of the font and the name of the file in which it resides to the
map table.
a. Change to the /usr/share/lib/hostfontdir directory.
Palatino-Bold /usr/share/lib/hostfontdir/palatino/bold
6. If you are using troff, you must create new width tables for this font in the
standard troff font directory.
This chapter provides background information and procedures for customizing the
LP print service.
This is a list of the step-by-step instructions in this chapter.
4 “How to Adjust the Printer Port Characteristics” on page 123
4 “How to Add a terminfo Entry for an Unsupported Printer” on page 127
4 “How to Set Up a Custom Printer Interface Program” on page 131
4 “How to Create a New Print Filter” on page 142
4 “How to Create a New Form Definition” on page 147
For overview information about printers, see Chapter 1.
121
TABLE 6–1 stty Default Settings Used by the LP Print Service
Option Meaning
-p printer-name Name of the printer for which you are adjusting the port
characteristics.
3. Verify that the printer port characteristics have been changed by using the
following command.
# stty -a
In the following example, the command sets the terminal baud rate to 19200 for the
printer venus.
Item Meaning
Booleans:
Numbers:
Item Meaning
Strings:
cr Carriage return
ff Page eject
Item Meaning
Strings:
Item Meaning
Note - Before you create a terminfo entry for a printer, you should first make sure
none of the existing terminfo entries will support the printer. To do so, try to set
up the printer with an entry for a similar printer, if there is one.
# tic terminfo_entry
Caution - If you have a printer interface program from a release of UNIX System V
prior to Release 3.2, it will probably work with the SunOS 5.7 or compatible LP print
service. However, several −o options have been standardized in the SunOS 5.7 or
compatible LP print service and will be passed to every printer interface program.
These options may interfere with similarly named options used by the old interface.
The LP print service, not a printer interface program, is responsible for opening the
printer port. The printer port is given to the printer interface program as standard
output, and the printer is identified as the “controlling terminal” for the printer
stty options 9600 cs8 -cstopb -parenb -parodd ixon -ixany opost
-olcuc onlcr -ocrnl -onocr -onlret -ofill nl0 cr0
tab0 bs0 vt0 ff0
Exit code 0
1 to 127 A problem was encountered when printing a request (for example, too
many nonprintable characters or the request exceeds the printer
capabilities). The LP print service notifies the person who submitted the
request that there was an error when printing it. This error will not affect
future print requests. If a printer fault has occurred, it has been cleared.
128 This code is reserved for internal use by the LP print service. Interface
programs must not exit with this code.
129 A printer fault was encountered when printing the request. This fault will
affect future print requests. If the fault recovery for the printer directs the
LP print service to wait for the administrator to correct the problem, the
LP print service disables the printer. If the fault recovery is to continue
printing, the LP print service will not disable the printer, but it will try
printing again in a few minutes.
>129 These codes are reserved for internal use by the LP print service.
Interface programs must not exit with codes in this range.
If the program exits with a code of 129, root is alerted of a printer fault. The LP print
service must also reprint the request from the beginning, after the fault has been
cleared. If you do not want the entire request to be reprinted, you can have the
interface program send a fault message to the LP print service, but wait for the fault
to be cleared. When the fault is cleared, the interface program can resume printing
the file. When printing is finished, the printer interface program can give a zero exit
code, just as if the fault had never occurred. An added advantage of this approach is
that the interface program can detect when the fault is cleared automatically, so that
the administrator does not need to re-enable the printer.
If you use the special exit code 129 or the [Link] program, the printer interface
program does not need to disable the printer itself. The interface program can
disable the printer directly, but doing so will override the fault-alerting mechanism.
Alerts are sent only if the LP print service detects that the printer has a fault, and the
special exit code and the [Link] program are its main detection tools.
If the LP print service has to interrupt printing of a file at any time, it kills the
interface program with a signal TERM (trap number 15). (See kill(1) and
signal(3B).) If the printer interface program dies from receipt of any other signal,
the LP print service assumes that future print requests will not be affected, and
continues to use the printer. The LP print service notifies the user who submitted the
request that the request has not been finished successfully.
When the interface is first invoked, the signals HUP, INT, QUIT, and PIPE (trap
numbers 1, 2, 3, and 13) are ignored. The standard interface changes this so the
signals are trapped at appropriate times. The standard interface interprets receipt of
these signals as warnings that the printer has a problem; when it receives a signal, it
issues a fault alert.
2. Determine your next step based on whether you have a custom printer
interface program.
# cp /var/spool/lp/model/standard custom-interface
4. Change the copy of the standard printer interface program to meet your needs.
Refer to the description of the program in “The Standard Printer Interface
Program” on page 129 to determine what you need to change.
-p printer-name The printer that will use the custom printer interface
program.
The custom printer interface program is registered with the LP print service, and
will be used by that printer when users submit print requests.
6. Verify that the custom printer interface program has been added in the
/etc/lp/printers/printer-name/configuration file.
In the following example, the command sets up a custom printer interface program
that the system venus is using on the printer asteroid.
Types of Filters
There are two types of print filters: fast filters and slow filters.
Fast filters do not require much processing time to prepare a file for printing. They
must have access to the printer when they run. To be capable of detecting printer
faults, a print filter must be a fast filter. Any filter that uses the PRINTER keyword as
a filter option must be installed as a fast filter.
Slow filters require a great deal of processing time to prepare a file for printing. They
do not require access to the printer when they run. Slow filters are run in the
background so they do not tie up the printer, allowing other files that do not need
slow filtering to be printed.
Converting Files
The LP print service uses print filters to convert files from one content type to
another. You can specify the accepted file content types for each printer. The user
(continued)
Printers: printer-list
Filter type: fast or slow
Options: template-list
Note - If you provide more than one definition (that is, more than one line) for any
filter characteristic other than Options, only the second definition will be used by
the print service.
The information can be arranged in any order, and not all the information is
required. When you do not specify values, those shown in Table 6–5 are assigned by
default. They are not very useful, which is why you should specify explicit values.
Item Default
Printers any
Command
Use the full path of the filter program. If there are any fixed options that the
program always needs, include them here.
Input Types
Input types is a list of file content types that the print filter can process. The LP print
service does limit the number of input types, but most filters can accept only one
Output Types
Output types is list of file types that the filter can produce as output. For each input
type, the filter produces a single output type. The output type may vary, however,
from job to job. The name of the output type is restricted to 14 alphanumeric
characters and dashes.
The output type names should either match the types of available (local or remote)
printers, or match the input types handled by other filters. The LP print service
groups filters in a shell pipeline if it finds that several passes by different filters are
needed to convert a file. It is unlikely that you will need this level of sophistication,
but the LP print service allows it. Try to find a set of filters that takes as input types
all the different files the users may want printed, and that converts those files
directly into file types the printer can handle.
Printer Types
Printer types is a list of the types of printers into which the print filter can convert
files. For most printers and filters, you can leave this part of the filter definition
blank, because it is identical to the list of output types. But it can be different. For
example, you could have a printer with a single printer type for purposes of
initialization, but which can recognize several different file content types. Essentially,
this printer has an internal filter that converts the various file types into one that it
can handle. Thus, a filter may produce one of several output types that match the file
types that the printer can handle. The print filter should be marked as working with
that printer type.
As another example, you may have two different models of printers that are listed as
accepting the same file types. Due to slight differences in manufacture, however, one
printer deviates in the results it produces. You label the printers as being of different
printer types, say A and B, where B is the one that deviates. You create a filter that
adjusts files to account for the deviation produced by printers of type B. Because this
filter is needed only for those printer types, you would list it as working only on
type B printers.
Filter Type
The LP print service recognizes fast and slow filters, as described in “Types of
Filters” on page 133.
Slow filters that are invoked by printing modes (using the lp -y command) must be
run on the system from which the print request originated. The LP print service
cannot pass values for modes to print servers. It can, however, match a file content
type (specified after the -T option of the lp command) to a content type on a print
server. Therefore, if you want to activate special modes on a print server, you must
specify content types that permit the LP print service to match input types and
output types.
Options
Options specify how different types of information are converted into command-line
arguments to the filter command. This information may include specifications from a
user (with the print request), the printer definition, and the specifications
implemented by any filters used to process the request.
A print filter definition can include more than one template. Multiple templates are
entered on a single line and separated with commas, or they are entered on separate
lines, preceded by the Options: prefix.
The format of a template is as follows:
keywordpattern = replacement
The keyword identifies the type of option being registered for a particular
characteristic of the filter.
The pattern is a specific option for the keyword.
If the Options line becomes too long, put each template on a separate line, as
follows:
In both templates, the keyword is defined as OUTPUT. In the first template, the pattern
is impress and the value of the replacement is -I. In the second template, the value
of pattern is postscript and the value of replacement is -P.
To find out which values to supply for each type of template (that is, for the pattern
and replacement arguments for each keyword), consider the following:
4 The values for the INPUT templates come from the file content type that needs to
be converted by the filter.
4 The values for the OUTPUT templates come from the output type that has to be
produced by the filter.
4 The value for the TERM template is the printer type.
4 The value for the PRINTER template is the name of the printer that will print the
final output.
4 The values for the CPI, LPI, LENGTH, and WIDTH templates come from the user’s
print request, the form being used, or the default values for the printer.
4 The value for the PAGES template is a list of pages that should be printed.
Typically, it is a list of page ranges separated by commas. Each page range consists
of a pair of numbers separated by a dash, or a single number. (For example,
1–5,6,8,10 indicates pages 1 through 5, plus pages 6, 8, and 10.) However,
whatever value was given in the −P option to a print request is passed unchanged.
4 The value for the CHARSET template is the name of the character set to be used.
4 The value for the FORM template is the name of the form requested by the lp -f
command (the command used to submit a print request).
4 The value of the MODES template comes from the lp -y command. Because a user
can specify several −y options, there may be several values for the MODES
template. The values will be applied in the left-to-right order given by the user.
The replacement part of a template shows how the value of a template should be
given to the filter program. It is typically a literal option, sometimes with the
placeholder asterisk (*) included to show where the value goes. The pattern and
replacement also can use the regular expression syntax of ed(1) for more complex
conversion of user input options into filter options. All regular expression syntax of
ed(1) is supported, including the \( ... \) and \n constructions, which can be
used to extract portions of the pattern for copying into the replacement, and the &,
which can be used to copy the entire pattern into the replacement.
In this example, the print filter program is named col. Once you add the new print
filter to a print server, a user’s print requests will be handled as follows:
4 When a user enters the following command:
$ lp -y expand [Link]
The print filter program is run with the following arguments to convert the file:
/usr/bin/col -x -p -f
The print filter program is run with the following arguments to convert the file:
/usr/bin/col -x
The following example shows a print filter definition to convert from troff to
PostScript.
Printer types: PS
Command: /usr/lib/lp/postscript/dpost
In this example, the filter program is named dpost. It takes one input type, troff,
produces a postscript output, and works with any printer of type PS (PostScript).
Users need to give just the abbreviation port or land when they ask for the paper
orientation to be in portrait mode or landscape mode. Because these options are not
intrinsic to the LP print service, users must specify them using the lp -y command.
The print filter program dpost is run with the following arguments to convert the
file:
The print filter program dpost is run with the following arguments to convert the
file:
/usr/lib/lp/postscript/dpost -n4
(continued)
Comment:
informal notes about the form
Alignment pattern: [content-type] alignment pattern
The optional phrase [,mandatory] means that the user cannot override the
character set choice in the form. The content-type can be given, although this is
optional, with an alignment pattern. If this attribute is given, the print service uses it
to determine, as necessary, how to filter and print the file.
With two exceptions, the information may appear in any order. The exceptions are
the Alignment pattern (which must always be last), and the comment (which
must always follow the line with the Comment: prompt). If the comment contains a
line beginning with a key phrase (like Page length, Page width , and so on),
precede that line with a > character so the key phrase is not at the beginning of the
line. The initial > character is stripped from the comment and is not displayed.
Not all of the information must be given. When you do not specify values for the
items listed in Table 6–7 the default values are assigned. Before running the lpforms
command, gather the following information about the new form:
Page length 66 lines The length of the form, or the length of each
page in a multipage form. This information
can be the number of lines, or the size in
inches or centimeters.
Line pitch 6 lines per inch A measurement of how close lines appear
on the form. This is also called leading. It is
the distance between two lines, from
baseline to baseline, measured by either
lines per inch or lines per centimeter.
Character set choice Any The character set, print wheel, or font
cartridge that should be used when this
form is used. Users may choose a different
character set for their own print requests
when using this form, or you can require
that only one character set be used.
Alignment pattern (No default) A sample file that the LP print service uses
to fill one blank form. When mounting the
form, you can print this pattern on the form
to align it properly. You can also define a
content type for this pattern so that the print
service knows how to print it.
Note - The LP print service does not try to mask sensitive information in the
alignment pattern. If you do not want sensitive information printed on sample
forms—for example when you align checks—then you should mask the appropriate
data. The LP print service keeps the alignment pattern stored in a safe place, where
only those logged in as root or lp can read it.
3. Add the form to the LP print service by using the lpadmin command.
149
The print service consists of the LP print service software, any print filters you may
provide, and the hardware (the printer, system, and network connections).
Directories
The files of the LP print service are distributed among seven directories, as shown in
Table 7–1.
Directory Contents
/var/spool/lp The spooling directory where files are queued for printing
Configuration Files
The scheduler stores configuration information in LP configuration files located in
the /etc/lp directory, as described in Table 7–2.
These configuration files serve a similar function to the /etc/printcap file in the
SunOS 4.1 release.
Note - You can check the contents of the configuration files, but you should not edit
them directly. Instead, use the lpadmin(1M) command to make configuration
changes. Your changes will be written to the configuration files in the /etc/lp
directory. The lpsched daemon administers and updates the configuration files.
$ ls -l /etc/lp/printers
drwxrwxr-x 2 lp lp 512 Jan 23 23:53 luna
drwxrwxr-x 2 lp lp 512 Jan 11 17:50 sparc1
Within each of the printer-specific directories, the following files can describe the
printer:
4 [Link] – Shell to execute in response to alerts
4 [Link] – Alert variables
4 configuration – Configuration file
4 [Link] – List of users to whom printer access is denied
4 comment – Printer description
The configuration file for the printer luna,
/etc/lp/printers/luna/configuration, would typically appear as follows:
Log Files
The LP print service maintains two sets of log files:
4 /var/spool/lp — A list of current requests that are in the print queue
4 /var/lp/logs/requests — An ongoing history of print requests
$ ls /var/spool/lp/tmp/terra
20-0 21-0
(continued)
These files remain in their directories only as long as the print request is in the queue.
Once the request is finished, the information in the files is combined and appended
to the file /var/lp/logs/requests, which is described in the next section.
Use the information in the /var/spool/lp logs if you need to track the status of
a print request that is currently in the queue.
History Logs
The LP print service records a history of printing services in two log files: lpsched
and requests. These log files are located in the /var/lp/logs directory. You can
use the information in these logs to diagnose and troubleshoot printing problems.
This is an example of the contents of the /var/lp/logs directory:
# cd /var/lp/logs
# ls
lpsched.1 requests requests.2
lpsched lpsched.2 requests.1
#
The files with the .1 and .2 suffixes are copies of the previous day’s logs. Each day,
the lp cron job cleans out the lpsched and requests log files and keeps copies
for two days. See “Creating and Editing crontab Files” on page 417 for suggestions
on modifying the cron job for cleaning out the requests log.
The two most important log files for troubleshooting is the lpsched log, which
contains information about local printing requests
The requests log contains information about print requests that are completed and
no longer in the print queue. Once a request is finished printing, the information in
the /var/spool/lp log files is combined and appended to the
/var/lp/logs/requests log.
The requests log has a simple structure, so that you can extract data using
common UNIX shell commands. Requests are listed in the order they are printed,
and are separated by lines showing their request IDs. Each line below the separator
# pwd
/var/lp/logs
# tail requests.2
= slw2-20, uid 200, gid 200, size 5123, Tue Jun 17 [Link] MDT
1998
z slw2
C 1
D slw2
F /etc/motd
P 20
t simple
U irving
s 0x0100
#
Table 7–4 shows the letter codes and the content of their corresponding lines in the
LP requests log.
= The separator line. It contains the following items: request ID, user ID
(UID), and group IDs (GIDs) of the user, the total number of bytes in the
original (unfiltered) file size, and the time when the request was queued.
F The name of the file printed. The line is repeated for each file printed;
files were printed in the order shown.
N The type of alert used when the print request was successfully completed.
The type is the letter M if the user was notified by email or W if the user
was notified by a message to the terminal.
r A single-letter line that is included if the user asked for “raw” processing
of the files (the lp -r command).
Y The list of special modes for the print filters used to print the request.
z The printer used for the request. This printer differs from the destination
(the D line) if the request was queued for any printer or a class of
printers, or if the request was moved to another destination.
Table 7–5 shows the outcome codes in the LP requests log and their descriptions.
Spooling Directories
Files queued for printing are stored in the /var/spool/lp directory until they are
printed, which may be only seconds. Table 7–6 shows the contents of the
/var/spool/lp directory.
SCHEDLOCK File Lock file for the scheduler. Check for this file if
the scheduler dies and will not restart.
Command Task
Activate a printer
enable(1)
Mount a form
lpadmin(1M)
Command Task
Set or change the default priority and priority limits that can be
lpusers(1M) requested by users of the LP print service
Each print server must have only one LP scheduler running. The scheduler is started
when a system is booted (or enters run level 2) by the control script
/etc/rc2.d/S80lp. Without rebooting the systems, you can stop the scheduler
with the /usr/lib/lp/lpshut command and restart the scheduler with the
lpsched command. The scheduler for each system manages requests issued to the
system by the lp commands.
# pwd
/var/lp/logs
# tail requests
s 0x1010
= slw2-20, uid 200, gid 200, size 5123, Mon Jun 16 [Link] MDT
1997
z slw2
C 1
D slw2
F /etc/motd
P 20
t simple
U irving
s 0x1010
#
# EDITOR=vi
# export EDITOR
# crontab -e lp
4. Change the first line of the file which rotates the requests log files every
Sunday (0) to an asterisk (*) for daily rotation:
Figure 7–5 Network Printing Between a SunOS 5.7 or Later Print Client and a
SunOS 5.7 or Compatible Print Server
This part provides instructions for working with remote systems in the Solaris
environment. This part contains this chapter.
This chapter describes all the tasks required to log in to remote systems and work
with their files. This is a list of the step-by-step instructions in this chapter.
4 “How to Search for and Remove .rhosts Files” on page 179
4 “How to Find Out If a Remote System Is Operating” on page 180
4 “How to Find Who Is Logged In to a Remote System” on page 181
4 “How to Log In to a Remote System (rlogin) ” on page 181
4 “How to Log Out From a Remote System (exit)” on page 182
4 “How to Open an ftp Connection to a Remote System” on page 185
4 “How to Close an ftp Connection to a Remote System” on page 186
4 “How to Copy Files From a Remote System (ftp)” on page 186
4 “How to Copy Files to a Remote System (ftp)” on page 188
4 “How to Copy Files Between a Local and a Remote System (rcp)” on page 193
For the purpose of this chapter, a remote system is a workstation or server that is
connected to the local system with any type of physical network and configured for
TCP/IP communication, shown in Figure 8–1:
earth pluto
TCP/IP TCP/IP
LAN
WAN
local system remote system
Figure 8–1 A Remote System
171
On systems running the Solaris release, TCP/IP configuration is established
automatically during start-up. For more information, see the TCP/IP and Data
Communications Administration Guide.
What’s your
password?
YES NO
host1
host2 user_a
+@group1
-@group2
When a simple entry for a host is made in [Link], such as the entry above
for host1, it means that the host is trusted, and so is any user at that machine.
If the user name is also mentioned, as in the second entry in the example, then the
host is trusted only if the specified user is attempting access.
A group name preceded by a plus sign (+) means that all the machines in that
netgroup are considered trusted.
A group name preceded by a minus sign (–) means that none of the machines in that
netgroup are considered trusted.
This can create a serious security problem. Either replace the /etc/[Link]
file with a correctly configured one, or remove the file altogether.
A single line of + in the /etc/[Link] file indicates that every known host is
trusted.
local system:
earth
remote system:
jupiter
remote system:
pluto
Of course, the user could have logged out of jupiter and then logged in directly to
pluto, but this type of linking can be more convenient.
To link remote logins without having to supply a password, you must have the
/etc/[Link] or .rhosts file set up correctly.
earth mars
Already logged on to
the local system
earth, Jones logs in
remotely to the remote
system mars.
earth mars
From mars, Jones
logs in remotely to
his home system
earth.
Figure 8–3 Direct and Indirect Logins
A direct remote login is attempted with the default user name; that is, the user name
of the individual currently logged in to the local system. This is the most common
form of remote login.
An indirect remote login is attempted with a different user name, which is supplied
during the remote login operation. This is the type of remote login you might
attempt from a workstation that you borrowed temporarily. For instance, if you were
in a coworker’s office and needed to examine files in your home directory, you might
log in to your system remotely, from your coworker’s system, but you would
perform an indirect remote login, supplying your own user name.
The dependencies between direct and indirect logins and authentication methods are
summarized in Table 8–1.
User Name
Type of Login Supplied By Authentication Password
System Required
System Required
However, if the rlogin command finds your home directory, it sources both your
.cshrc and .login files. Therefore, after a remote login, your prompt is your
standard login prompt, and the current directory is the same as when you log in
locally.
For example, if your usual prompt displays your system name and working
directory, and when you log in, your working directory is your home directory, your
login prompt looks like this:
earth(/home/smith):
Then when you log in to a remote system, you will see a similar prompt and your
working directory will be your home directory, regardless of the directory from
which you entered the rlogin command:
earth(/home/smith):rlogin pluto
.
pluto(/home/smith):
In other words, if you cd to /home and then run ls, this is what you’ll see:
earth(home/smith): cd ..
earth(/home): ls
smith jones
2. Search for and remove .rhosts files by using the find(1) command.
ping:no answer from system-name The system is known, but is not currently
operating.
If the system you “ping” is located in a different domain, the return message may
also contain routing information, which you can ignore.
The ping command has a time-out of 20 seconds. In other words, if it does not get a
response within 20 seconds, it returns the third message. You can force ping to wait
longer (or less) by entering a time-out value, in seconds:
rusers (No options) Displays the name of the system followed by the name of users
currently logged in to it, including root.
-l Displays additional information about each user: the user’s login window, login
time and date, amount of time logged in, and the name of the remote system from
which the user logged on.
$ rusers pluto
pluto smith jones
In the following example, the long version of rusers show that two users are
logged in to the remote system named pluto. The first user logged in from the
system console on November 18 and has been logged on for 4 hours and 10 minutes.
The second user logged in from a remote system, mars, on the same date, and has
been logged on for a similar amount of time.
$ rusers -l pluto
smith pluto:console Nov 18 09:19 4:10
jones mars:console Nov 18 09:20 4:11 (mars)
-l user-name Logs you into the remote system indirectly; in other words, with the
user name you supply.
If the network attempts to authenticate you, you won’t be prompted for a password.
If the remote system attempts to authenticate you, you will be asked to provide a
password.
If the operation succeeds, the rlogin command displays brief information about
your latest remote login to that system, the version of the operating system running
on the remote system, and whether you have mail waiting for you in your home
directory.
$ rlogin pluto
Last login: Thu Feb 26 [Link] from earth
Sun Microsystems Inc. SunOS 5.7 September 1998
You have mail.
pluto%
The following example shows the output of an indirect remote login to pluto, with
the user being authenticated by the remote system.
$ exit
pluto% logout
Connection closed.
earth%
Command Description
close Logs out of the remote system and returns to the command
interpreter
get, mget Copies a file (or multiple files) from the remote working
directory to the local working directory
put, mput Copies a file (or multiple files) from the local working directory
to the remote working directory
delete, mdelete Deletes a file (or multiple files) from the remote working
directory
$ ftp remote-system
If the system you are accessing has established an anonymous ftp account, you
will not be prompted for a password. If the ftp interface accepts your password,
it displays a confirmation message and the (ftp>) prompt.
You can now use any of the commands supplied by the ftp interface, including
help. The principal commands are summarized in Table 8–2.
This ftp session was established by the user smith on the remote system pluto:
$ ftp pluto
Connected to pluto.
220 pluto FTP server (UNIX(r) System V Release 4) ready.
Name (pluto:smith): smith
331 Password required for smith:
Password: password
230 User smith logged in.
(continued)
ftp>
ftp> bye
221 Goodbye.
earth%
$ cd target-directory
ftp> cd source-directory
If your system is using the automounter, the home directory of the remote
system’s user appears parallel to yours, under /home.
4. Make sure you have Read permission for the source files.
ftp> ls -l
You can supply a series of individual file names and you can use wildcard
characters. The mget command will copy each file individually, asking you for
confirmation each time.
ftp> bye
In this example, the user kryten opens an ftp connection to the system pluto, and
uses the get command to copy a single file from the /tmp directory:
$ cd $HOME
ftp pluto
Connected to pluto.
220 pluto FTP server (SunOS 5.7) ready.
Name (pluto:kryten): kryten
331 Password required for kryten.
Password: xxx
230 User kryten logged in.
ftp> cd /tmp
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 ASCII data connection for /bin/ls ([Link],34344)
(0 bytes).
dtdbcache_:0
filea
files
ps_data
[Link]
226 ASCII Transfer complete.
53 bytes received in 0.022 seconds (2.39 Kbytes/s)
ftp> get filea
200 PORT command successful.
150 ASCII data connection for filea ([Link],34331)
(0 bytes).
226 ASCII Transfer complete.
ftp> bye
221 Goodbye.
In this example, the same user kryten uses the mget command to copy a set of files
from the /tmp directory to his home directory. Note that kryten can accept or reject
individual files in the set.
ftp> cd target-directory
Remember, if your system is using the automounter, the home directory of the
remote system’s user appears parallel to yours, under /home.
ftp> ls -l target-directory
You can supply a series of individual file names and you can use wildcard
characters. The mput command will copy each file individually, asking you for
confirmation each time.
ftp> bye
$ cd /tmp
ftp pluto
Connected to pluto.
220 pluto FTP server (SunOS 5.7) ready.
Name (pluto:kryten): kryten
331 Password required for kryten.
Password: xxx
230 User kryten logged in.
ftp> cd /tmp
250 CWD command successful.
ftp> put filef
200 PORT command successful.
150 ASCII data connection for filef ([Link],34356).
226 Transfer complete.
ftp> ls
200 PORT command successful.
150 ASCII data connection for /bin/ls ([Link],34357) (0 bytes).
dtdbcache_:0
filea
(continued)
filef
files
ps_data
[Link]
226 ASCII Transfer complete.
60 bytes received in 0.058 seconds (1.01 Kbytes/s)
ftp> bye
221 Goodbye.
In this example, the same user kryten uses the mput command to copy a set of files
from his home directory to the /tmp directory system pluto. Note that kryten can
accept or reject individual files in the set.
$ cd $HOME/testdir
$ ls
test1 test2 test3
$ ftp pluto
Connected to pluto.
220 pluto FTP server (SunOS 5.7) ready.
Name (pluto:kryten): kryten
331 Password required for kryten.
Password: xxx
230 User kryten logged in.
ftp> cd /tmp
250 CWD command successful.
ftp> mput test*
mput test1? y
200 PORT command successful.
150 ASCII data connection for test1 ([Link],34365).
226 Transfer complete.
mput test2? y
200 PORT command successful.
150 ASCII data connection for test2 ([Link],34366).
226 Transfer complete.
mput test3? y
200 PORT command successful.
150 ASCII data connection for filef ([Link],34356).
226 Transfer complete.
ftp> bye
221 Goodbye.
Caution - Both the cp and rcp commands can overwrite files without warning.
Make sure file names are correct before executing the command.
This syntax applies whether you are logged in to the remote system or in to the
local system. Only the pathname of the file or directory changes, as described in
Table 8–3 and as illustrated in the examples below.
You can use the “~” and “.” characters to specify the path portions of the local
file or directory names. Note, however, that “~” applies to the current user, not
the remote system, and that “.” applies to system you are logged into. For
explanations of these symbols, see Table 8–3.
earth pluto
/home/jones
/home/smith
[Link] [Link]
Since the rcp operation is performed without a remote login, the “.” symbol applies
to the local system, not the remote system.
In the following example, rcp is used —while logged in to the remote system— to
perform the same operation. Although the flow of the operation is the same, the
paths change to take into account the remote login:
rcp ...
/home/jones
/home/smith
[Link] [Link]
Use of the “.” symbol would be inappropriate in this instance because of the remote
login; it would simply apply to the remote system, essentially directing rcp to create
a duplicate file. The “~” symbol, however, refers to the current user’s home directory,
even when logged in to a remote system.
In the following example, rcp copies the file [Link] from the home directory
(/home/smith) of the local system earth to the /home/jones directory of the
remote system, pluto:
/home/jones
/home/smith
[Link] [Link]
Because no remote filename is provided, the file [Link] is copied into the
/home/jones directory with the same name.
In this example, the operation is repeated, but rcp is entered from a different
working directory on the local system (/tmp). Note the use of the “~” symbol to
refer to the current user’s home directory:
In this example, rcp is used —while logged in to the remote system— to perform
the same operation as in the previous example. Although the flow of the operation is
the same, the paths change the take into account the remote login:
rcp ...
/home/jones
/home/smith
[Link] [Link]
In this instance, the “~” symbol can be used to denote the current user’s home
directory, even though it is on the local system. The “.” symbol refers to the working
directory on the remote system because the user is logged in to the remote system.
Here is an alternative syntax that performs the same operation:
This part provides instructions for managing terminals and modems. This part
contains these chapters.
This chapter provides the overview information for managing terminals and
modems. This is a list of the overview information in this chapter.
4 “Terminals, Modems, Ports, and Services” on page 201
4 “Tools for Managing Terminals and Modems” on page 204
4 “Admintool” on page 205
4 “Service Access Facility” on page 206
For step-by-step instructions about how to set up terminals and modems with
Admintool, see Chapter 10.
For step-by-step instructions about how to set up terminals and modems with the
Service Access Facility (SAF), see Chapter 11.
201
Terminals
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
Modems can be set up in three basic configurations:
4 Dial-out
4 Dial-in
4 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.
Ports
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
Services
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.
Port Monitors
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 9–1 describes the two types of port monitors included in the Solaris
environment.
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.
If You Want The Tool Then Use ... To Start This Tool See ...
That Is ...
TABLE 9–3 Functionality Differences Between Solstice Serial Port Manager and Service
Access Facility
Keep the modem Service Access ttyadm -h specifies that the system will not
connection when a Facility ttyadm -h hang up on a modem before setting or
user logs off a host 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 Service Access ttyadm -r specifies that ttymon should
type a character Facility ttyadm -r require the user to type a character or press
before the system Return a specified number of times before
displays a prompt 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
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:
4 Templates for common terminal and modem configurations
4 Multiple port setup, modification, or deletion
4 Quick visual status of each port
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.
4 “How to Start Admintool” on page 213
4 “How to Set Up a Terminal” on page 214
4 “How to Set Up a Modem” on page 215
4 “How to Set Up a Modem for Use With UUCP” on page 217
4 “How to Initialize a Port” on page 218
4 “How to Disable a Port” on page 219
4 “ How to Remove a Port Service” on page 220
For overview information about terminals and modems, see Chapter 9.
207
Note - 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 10–1.
Basic Port Lists the port or ports you selected from Serial Ports
main window.
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 Specifies that the port software is initialized but not
Only configured.
Option: Bidirectional Specifies that the port line is used in both directions.
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.
Streams Modules Shows the STREAMS modules that are pushed before
the service is invoked.
Basic Port —
Service Enabled
Terminal Type —
Option: Bidirectional no
Service Tag —
Connect on Carrier no
Service /usr/bin/login
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.
Basic Port — — —
Terminal — — —
Type
Option: no no yes
Bidirectional
Option: no no no
Software
Carrier
Service Tag — — —
Connect on no no no
Carrier
Table 10–5 describes the default values for the Initialize Only template.
Basic Port —
Service Enabled
Terminal Type —
Option: Bidirectional no
Service Tag —
Connect on Carrier no
Service /usr/bin/login
Note - The system being configured must be your local system. Use Solstice
AdminSuite Serial Port Manager to configure serial ports on a remote system.
2. Start Admintool.
$ admintool &
8. Use the pmadm command to verify the terminal service has been added.
$ pmadm -l -s ttya
8. Use the pmadm command to verify the modem service has been configured for
use with UUCP.
$ pmadm -l -s ttyb
6. Enter a baud rate that provides seven bit, even parity service. Click on OK.
9. Use the pmadm command to verify the modem service has been configured for
use with UUCP.
$ pmadm -l -s ttya
7. Use the pmadm command to verify the port has been disabled.
$ pmadm -l -s ttyb
5. 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.
7. Use the pmadm command to verify the port service has been disabled.
$ pmadm -l -s ttya
2. Select the port or ports that has a service you want to delete.
4. Use the pmadm command to verify the port service has been deleted.
$ pmadm -l -s ttya
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:
4 Login ID or password is incorrect.
4 Terminal is waiting for X-ON flow control key (Control-q).
4 Serial cable is loose or unplugged.
4 Terminal configuration is incorrect.
4 Terminal is shut off or otherwise has no power.
2. Check the terminal.
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
223
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 11–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.
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 225
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.
SAC
Login Request
Administrative
Files
Login Prompt
login
Valid Name & Password
Login Complete
shell
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 227
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.
Bidirectional Service
If a port is configured for bidirectional service, ttymon will:
4 Allow users to connect to a service
4 Allow uucico, cu, or ct to use the port for dialing out (if the port’s free)
4 Wait to read a character before printing a prompt
4 Invoke the port’s associated service—without sending the prompt message—when
a connection is requested (if the connect-on-carrier flag is set)
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 229
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.
# sacadm -l -p mbmon
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 231
-l The list port monitor status flag
# sacadm -l -p mbmon
PMTAG PMTYPE FLGS RCNT STATUS COMMAND
mbmon ttymon - 0 STARTING /usr/lib/saf/ttymon #TTY Ports a & b
mbmon
ttymon
STARTING
/usr/lib/saf ...
#TTY Ports a & b Identifies any comment used to describe the port monitor.
# sacadm -k -p mbmon
# sacadm -s -p mbmon
# sacadm -d -p mbmon
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 233
To enable a ttymon port monitor, type:
# sacadm -e -p mbmon
# sacadm -r -p mbmon
Note - 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.
Note - In this example, the input wraps to the next line. Do not put a Return or line
feed after contty.
The above pmadm command contains an embedded ttyadm command. The options
in this embedded command are as follows:
-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 (")
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 235
How to View the Status of a TTY Port Service
Use the pmadm command as shown to list the status of a TTY port, or all the ports
associated with a port monitor.
# pmadm -l -p mbmon -s a
# pmadm -l
# pmadm -l -p mbmon
mbmon Identifies the port monitor name, mbmon, set by using the
pmadm -p command.
<PMSPECIFIC> Information
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 237
- 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.
# pmadm -e -p mbmon -s a
# pmadm -d -p mbmon -s a
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 239
File Name Description
# VERSION=1
zsmon:ttymon::0:/usr/lib/saf/ttymon #
# VERSION=1
ttya:u:root:reserved:reserved:reserved:/dev/term/a:I::/usr/bin/login::9600:ldterm,
ttcompat:ttya login\: ::tvi925:y:#
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 241
ldterm,ttcompat Identifies the STREAMS modules to be pushed
:y/n:
Service States
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.
State Notes
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
Port States
Ports may be enabled or disabled depending on the state of the port monitor that
controls them.
State Notes
Setting Up Terminals and Modems With the Service Access Facility (Tasks) 243
244 System Administration Guide, Volume II ♦ October 1998
PART IV Managing System Security
This part provides instructions for managing system security in the Solaris 7
environment. This part contains these chapters.
247
4 Chapter 15
4 Chapter 16
Securing Files
Since the SunOS 5.7 operating system is a multiuser system, file system security is
the most basic, and important, security risks on a system. You can use both the
traditional UNIX file protection or the more secure access control lists (ACLs) to
protect your files.
Also, many executable programs have to be run as root (that is, as superuser) to
work properly. These executables run with the user ID set to 0 (setuid=0). Anyone
running these programs runs them with the root ID, which creates a potential
security problem if the programs are not written with security in mind.
Except for the executables shipped with setuid to root, you should disallow the use
of setuid programs, or at least restrict and keep them to a minimum.
Installing a Firewall
Another way to protect your network is to use a firewall or secure gateway system.
A firewall is a dedicated system separating two networks, each of which approaches
the other as untrusted. You should consider this setup as mandatory between your
internal network and any external networks, such as Internet, with which you want
internal network users to communicate.
A firewall can also be useful between some internal networks. For example, the
firewall or secure gateway computer will not send a packet between two networks
unless the gateway computer is the origin or the destination address of the packet. A
firewall should also be set up to forward packets for particular protocols only. For
example, you may allow packets for transferring mail, but not those for telnet or
rlogin. The ASET utility, when run at high security, disables the forwarding of
Internet Protocol (IP) packets.
File Security
The SunOS 5.7 operating system is a multiuser system, which means that all the
users logged in to a system can read and use files belonging to one another, as long
as they have permission to do so. Table 12–1 describes file system administration
commands. See Chapter 13 for step-by-step instructions on securing files.
Command Description
File Encryption
Placing a sensitive file into an inaccessible directory (700 mode) and making the file
unreadable by others (600 mode) will keep it secure in most cases. However,
someone who guesses your password or the root password can read and write to
Command Description
System Security
This section describes how to safeguard your system against unauthorized access,
such as how to prevent an intruder from logging in to your system, how to maintain
the password files, and how to prevent unauthorized superuser access to sensitive
system files and programs.
Special Logins
There are two common ways to access a system—by using a conventional user login
or by using the root login. In addition, a number of special system logins allow a user
to perform administrative commands without using the root account. The
administrator assigns password to these login accounts.
Table 12–3 lists the system login accounts and their uses. The system logins perform
special functions, and each has its own group identifier number (GID). Each of these
logins should have its own password, which should be distributed on a
need-to-know basis.
lp 71 Owns the object and spooled data files for the printer.
uucp 5 Owns the object and spooled data files for UUCP, the
UNIX-to-UNIX copy program.
You should also set the security of the eeprom command to require a password. See
eeprom(1M) for more information.
/etc Files
If your network uses /etc files, the password information is kept in the system’s
/etc/passwd and /etc/shadow files. The user name and other information are
kept in the password file /etc/passwd, while the encrypted password itself is kept
in a separate shadow file, /etc/shadow. This is a security measure that prevents a
user from gaining access to the encrypted passwords. While the /etc/passwd file is
available to anyone who can log in to a machine, only superuser can read the
/etc/shadow file. You can use Solstice AdminSuite’s User Manager, Admintool, or
the passwd(1) command to change a user’s password on a local system.
Network Security
The more available access is across a network, the more advantageous it is for
networked systems. However, free access and sharing of data and resources create
security problems. Network security is usually based on limiting or blocking
operations from remote systems. Figure 12–1 describes the security restrictions you
can impose on remote operations.
Firewall Systems
You can set up a firewall system to protect the resources in your network from
outside access. A firewall system is a secure host that acts as a barrier between your
internal network and outside networks.
The firewall has two functions. It acts as a gateway which passes data between the
networks, and it acts as a barrier which blocks the free passage of data to and from
the network. The firewall requires a user on the internal network to log in to the
firewall system to access hosts on remote networks. Similarly, a user on an outside
network must log in to the firewall system before being granted access to a host on
the internal network.
In addition, all electronic mail sent from the internal network is sent to the firewall
system for transfer to a host on an external network. The firewall system receives all
incoming electronic mail, and distributes it to the hosts on the internal network.
A firewall system should not have any trusted hosts. (A trusted host is one from
which a user can log in without being required to type in a password.) It should not
share any of its file systems, or mount any file systems from other servers.
ASET can be used to make a system into a firewall, and to enforce high security on a
firewall system, as described in Chapter 16.
Packet Smashing
Most local-area networks transmit data between computers in blocks called packets.
Through a procedure called packet smashing, unauthorized users can harm or destroy
data. Packet smashing involves capturing packets before they reach their destination,
injecting arbitrary data into the contents, then sending the packets back on their
original course. On a local-area network, packet smashing is impossible because
packets reach all systems, including the server, at the same time. Packet smashing is
possible on a gateway, however, so make sure all gateways on the network are
protected.
The most dangerous attacks are those that affect the integrity of the data. Such
attacks involve changing the contents of the packets or impersonating a user. Attacks
that involve eavesdropping—recording conversations and replaying them later
without impersonating a user—do not compromise data integrity. These attacks do
affect privacy, however. You can protect the privacy of sensitive information by
encrypting data that goes over the network.
Where to Find
Type Description Information
‘‘Weak Authentication
NFS request from unprivileged port’’
This chapter describes the procedures for securing files. This is a list of the
step-by-step instructions in this chapter.
4 “How to Display File Information” on page 267
4 “How to Change the Owner of a File” on page 269
4 “How to Change Group Ownership of a File” on page 270
4 “How to Change Permissions in Absolute Mode” on page 274
4 “How to Change Permissions in Symbolic Mode” on page 276
4 “How to Change Special Permissions in Absolute Mode” on page 275
4 “How to Find Files With setuid Permissions” on page 277
4 “How to Set an ACL on a File” on page 283
4 “How to Disable Programs From Using Executable Stacks” on page 279
4 “How to Check If a File Has an ACL” on page 285
4 “How to Modify ACL Entries on a File” on page 286
4 “How to Delete ACL Entries From a File” on page 287
4 “How to Display ACL Entries for a File” on page 288
263
User Classes
For each file, there are three classes of users that specify the levels of security:
4 The file or directory owner—usually the user who created the file. The owner of a
file can decide who has the right to read it, to write to it (make changes to it), or, if
it is a command, to execute it.
4 Members of a group.
4 All others who are not the file or group owner.
Only the owner of the file or root can assign or modify file permissions.
File Permissions
Table 13–1 lists and describes the permissions you can give to each user class for a
file.
w Write Can write to the file (modify its contents), add to it, or
delete it.
These file permissions apply to special files such as devices, sockets, and named
pipes (FIFOs), as they do to regular files.
For a symbolic link, the permissions that apply are those of the file the link points to.
Directory Permissions
Table 13–2 lists and describes the permissions you can give to each user class for a
directory.
You can protect the files in a directory (and in its subdirectories) by disallowing
access to that directory. Note, however, that superuser has access to all files and
directories on the system.
setuid Permission
When set-user identification (setuid) permission is set on an executable file, a
process that runs this file is granted access based on the owner of the file (usually
root), rather than the user who is running the executable file. This allows a user to
access files and directories that are normally only available to the owner. For
example, the setuid permission on the passwd command makes it possible for a
user to change passwords, assuming the permissions of the root ID:
Note - Using setuid permissions with the reserved UIDs (0-99) from a program
may not set the effective UID correctly. Use a shell script instead or avoid using the
reserved UIDs with setuid permissions.
setgid Permission
The set-group identification (setgid) permission is similar to setuid, except that
the process’s effective group ID (GID) is changed to the group owner of the file, and
a user is granted access based on permissions granted to that group. The
/usr/bin/mail program has setgid permissions:
Sticky Bit
The sticky bit is a permission bit that protects the files within a directory. If the
directory has the sticky bit set, a file can be deleted only by the owner of the file, the
owner of the directory, or by root. This prevents a user from deleting other users’
files from public directories such as /tmp:
Be sure to set the sticky bit manually when you set up a public directory on a
TMPFS file system.
$ ls -la
Displays all files, including hidden files that begin with a dot (.).
−a
Each line in the display has the following information about a file:
4 Type of file
A file can be one of six types. Table 13–4 lists the possible file types.
Symbol Type
- Text or program
d Directory
l Symbolic link
set rstchown = 0
See chown(1) for more details. Also, be aware that there may be other restrictions
on changing ownership on NFS-mounted file systems.
# ls -l filename
set rstchown = 0
See chgrp(1) for more details. Also, be aware that there may be other restrictions
on changing groups on NFS-mounted file systems.
$ ls -l filename
You can use the chmod command to set permissions in either of two modes:
4 Absolute Mode - Use numbers to represent file permissions (the method most
commonly used to set permissions). When you change permissions by using the
absolute mode, represent permissions for each triplet by an octal mode number.
Table 13–5 lists the octal values for setting file permissions in absolute mode. You use
these numbers in sets of three to set permissions for owner, group, and other (in that
order). For example, the value 644 sets read/write permissions for owner, and
read-only permissions for group and other.
0 --- No permissions
You can set special permissions on a file in absolute or symbolic modes. In absolute
mode, you set special permissions by adding a new octal value to the left of the
permission triplet. Table 13–6 lists the octal values to set special permissions on a file.
1 Sticky bit
2 setguid
4 setuid
Table 13–7 lists the symbols for setting file permissions in symbolic mode. Symbols
can specify whose permissions are to be set or changed, the operation to be
performed, or the permissions being assigned or changed.
g Who Group
o Who Others
a Who All
= Operation Assign
+ Operation Add
- Operation Remove
r Permission Read
w Permission Write
x Permission Execute
The who operator permission designations in the function column specifies the symbols
that change the permissions on the file or directory.
nnn Specifies the octal values that represent the permissions for
the file owner, file group, and others, in that order. See Table
13–5 for the list of valid octal values.
Note - If you use chmod to change the file group permissions on a file with ACL
entries, both the file group permissions and the ACL mask are changed to the
new permissions. Be aware that the new ACL mask permissions may change the
effective permissions for additional users and groups who have ACL entries on
the file. Use the getfacl(1) command to make sure the appropriate permissions
are set for all ACL entries.
$ ls -l filename
$ ls -ld public_dir
drwxr--r-- 1 ignatz staff 6023 Aug 5 12:06 public_dir
$ chmod 755 public_dir
$ ls -ld public_dir
drwxr-xr-x 1 ignatz staff 6023 Aug 5 12:06 public_dir
The following example show changing the permissions of an executable shell script
from read/write to read/write/execute.
$ ls -l my_script
-rw------- 1 ignatz staff 6023 Aug 5 12:06 my_script
$ chmod 700 my_script
$ ls -l my_script
-rwx------ 1 ignatz staff 6023 Aug 5 12:06 my_script
nnnn Specifies the octal values that change the permissions on the file or
directory. The first octal value on the left sets the special
permissions on the file. See Table 13–6for the list of valid octal
values for the special permissions.
$ ls -l filename
The following example sets sticky bit permission on the pubdir directory.
$ ls -l filename
The following example adds read and execute permissions for user, group, and
others.
The following example assigns read, write, and execute permissions to group.
# find directory -user root -perm -4000 -exec ls -ldb {}\; >/tmp/filename
An unauthorized user (rar) has made a personal copy of /usr/bin/sh, and has
set the permissions as setuid to root. This means that rar can execute
/usr/rar/bin/sh and become the privileged user. If you want to save this output
for future reference, move the file out of the /tmp directory.
The message is logged by the syslogd(1M) daemon when the syslog kern
facility is set to notice level. This logging is set by default in the [Link](4)
file, which means the message is sent to both the console and to the
/var/adm/messages file.
This message is useful both for observing potential security problems, as well as to
identify valid programs that depend upon executable stacks which have been
prevented from correct operation by setting this variable. If the administrator does
not want any messages logged, then the noexec_user_stack_log variable can be
set to zero to disable it in the /etc/system file, though the SIGSEGV signal may
continue to cause the executing program to core dump.
You can use mprotect(2) if you want programs to explicitly mark their as stack
executable.
Because of hardware limitations, the capability of catching and reporting executable
stack problems is only available on sun4m, sun4d and sun4u platforms.
set noexec_user_stack=1
# init 6
set noexec_user_stack_log=0
# init 6
ACL entries are the way to define an ACL on a file, and they are set through the
setfacl(1) command. ACL entries consist of the following fields separated by
colons:
entry_type:[uid|gid]:perms
perms Represents the permissions that are set on entry_type. perms can
be indicated by the symbolic characters rwx or a number (the
same permissions numbers used with the chmod command).
The following example shows an ACL entry that sets read/write permissions for the
user nathan.
user:nathan:rw-
Caution - UFS file system attributes such as ACLs are supported in UFS file systems
only. This means that if you restore or copy files with ACL entries into the /tmp
directory, which is usually mounted as a TMPFS file system, the ACL entries will be
lost. Use the /var/tmp directory for temporary storage of UFS files.
$ setfacl -s user::perms,group::perms,other:perms,mask:perms,acl_entry_list
filename ...
other:perms Specifies the permissions for users other than the file
owner or members of the file group.
mask:perms Specifies the permissions for the ACL mask. The mask
indicates the maximum permissions allowed for users
(other than the owner) and for groups.
2. To verify that an ACL was set on the file, see “How to Check If a File Has an
ACL” on page 285. To verify which ACL entries were set on the file, use the
getfacl command.
$ getfacl filename
Caution - If an ACL already exists on the file, the −s option will replace the entire
ACL with the new ACL.
# file: [Link]
# owner: nathan
# group: sysadmin
user::rwx
user:george:rwx #effective:r--
group::r-- #effective:r--
mask:r--
other:---
Example—Copying an ACL
The following example copies the ACL on [Link] to [Link].
$ ls -l filename
A ‘+’ to the right of the mode field indicates the file has an ACL.
Note - Unless you have added ACL entries for additional users or groups on a file, a
file is considered to be a “trivial” ACL and the ’+’ will not display.
$ ls -l [Link]
-rwxr-----+ 1 nathan sysadmin 167 Nov 11 11:13 [Link]
acl_entry_list Specifies the list of one or more ACL entries to modify on the
file or directory. You can also modify default ACL entries on
a directory. Table 13–8 and Table 13–9 show the valid ACL
entries.
2. To verify that the ACL entries were modified on the file, use the getfacl
command.
$ getfacl filename
# file: [Link]
# owner: nathan
# group: staff
user::rw-
user::george:rw- #effective:r--
group::r- #effective:r--
mask:r--
other:r-
The following example modifies the default permissions for the group staff to read
and the default ACL mask permissions to read/write on the book directory..
Alternately, you can use the setfacl -s command to delete all the ACL entries
on a file and replace them with the new ACL entries specified.
2. To verify that the ACL entries were deleted from the file, use the getfacl
command.
$ getfacl filename
Displays the file name, file owner, file group, and ACL entries for the
−a
specified file or directory.
Displays the file name, file owner, file group, and default ACL entries
−d
for the specified directory.
If you specify multiple file names on the command line, the ACL entries are
separated by a blank line.
$ getfacl [Link]
# file: [Link]
# owner: nathan
# group: sysadmin
user::rw-
user:george:r-- #effective:r--
group::rw- #effective:rw-
mask:rw-
other:---
The following example shows the default ACL entries for the book directory.
# file: book
# owner: nathan
# group: sysadmin
user::rwx
user:george:r-x #effective:r-x
group::rwx #effective:rwx
mask:rwx
other:---
default:user::rw-
default:user:george:r--
default:group::rw-
default:mask:rw-
default:other:---
This chapter describes the procedures for securing systems. This is a list of the
step-by-step instructions in this chapter.
4 “How to Display a User’s Login Status” on page 291
4 “How to Display Users Without Passwords” on page 293
4 “How to Temporarily Disable User Logins” on page 294
4 “How to Save Failed Login Attempts” on page 295
4 “How to Create a Dial-Up Password” on page 298
4 “How to Temporarily Disable Dial-up Logins” on page 300
4 “How to Restrict Superuser (root) Login to the Console” on page 300
4 “How to Monitor Who Is Using the su Command” on page 301
4 “How to Display Superuser (root) Access Attempts to the Console” on page 302
For overview information about securing systems, see “System Security” on page 252.
291
# logins -x -l username
The logins(1M) command uses the local /etc/passwd file and the NIS or
NIS+ password databases to obtain a user’s login status.
# logins -x -l rimmer
rimmer 500 staff 10 Arnold J. Rimmer
/export/home/rimmer
/bin/sh
PS 010170 10 7 -1
In this example,
# logins -p
The logins command uses the local /etc/passwd file and the NIS or NIS+
password databases to obtain a user’s login status.
# logins -p
pmorph 501 other 1 Polly Morph
#
# vi /etc/nologin
# vi /etc/nologin
(Add system message here)
# cat /etc/nologin
***No logins permitted.***
# touch /var/adm/loginlog
3. Set read and write permissions for root on the loginlog file.
5. Make sure the log works by attempting to log into the system five times with
the wrong password after the loginlog file is created. Then display the
/var/adm/loginlog file.
# more /var/adm/loginlog
pmorph:/dev/pts/4:Mon Jun 8 [Link] 1998
pmorph:/dev/pts/4:Mon Jun 8 [Link] 1998
pmorph:/dev/pts/4:Mon Jun 8 [Link] 1998
pmorph:/dev/pts/4:Mon Jun 8 [Link] 1998
pmorph:/dev/pts/4:Mon Jun 8 [Link] 1998
#
/dev/term/a
/dev/term/b
The d_passwd(4) file has two fields. The first is the login shell that will require a
password, and the second is the encrypted password. The /etc/dialups and
/etc/d_passwd files work like this:
When a user attempts to log in on any of the ports listed in /etc/dialups, the
login program looks at the user’s login entry stored in /etc/passwd, and compares
the login shell to the entries in /etc/d_passwd. These entries determine whether
the user will be required to supply the dial-up password.
/usr/lib/uucp/uucico:encrypted_password:
/usr/bin/csh:encrypted_password:
/usr/bin/ksh:encrypted_password:
/usr/bin/sh:encrypted_password:
/usr/bin/csh:<encrypted_password >:
/usr/bin/ksh:<encrypted_password >:
Matching entry for /usr/bin/sh:<encrypted_password >:
/usr/bin/ksh found;
prompt for password
found in /etc/d_passwd
Figure 14–1 Basic Dial-Up Password Sequence
Caution - When you first establish a dial-up password, be sure to remain logged in
on at least one terminal while testing the password on a different terminal. If you
make a mistake while installing the extra password and log off to test the new
password, you might not be able to log back on. If you are still logged in on another
terminal, you can go back and fix your mistake.
1. Become superuser.
/dev/term/a
/dev/term/b
/dev/term/c
3. Create an /etc/d_passwd file containing the login programs that will require
a dial-up password, and the encrypted dial-up password.
Include shell programs that a user could be running at login, for example,
uucico, sh, ksh, and csh. The /etc/d_passwd file should look like this:
/usr/lib/uucp/uucico:encrypted_password:
/usr/bin/csh:encrypted_password:
/usr/bin/ksh:encrypted_password:
/usr/bin/sh:encrypted_password:
6. Set read and write permissions for root on the two files.
# useradd user-name
# passwd user-name
temp:U9gp9SyA/JlSk:7967:::::7988:
# userdel user-name
/usr/bin/sh:*:
Note - Restricting superuser login to the console is set up by default when you
install a system.
CONSOLE=/dev/console
Any users who try to remotely log in to this system must first log in with their
user login, and then use the su command to become superuser.
4. Attempt to log in remotely as superuser to this system, and verify that the
operation fails.
SULOG=/var/adm/sulog
4. After modifying the /etc/default/su file, use the su command several times
and display the /var/adm/sulog file. You should see an entry for each time
you used the su command.
# more /var/adm/sulog
SU 12/20 16:26 + pts/0 nathan-root
SU 12/21 10:59 + pts/0 nathan-root
SU 01/12 11:11 + pts/0 root-joebob
SU 01/12 14:56 + pts/0 pmorph-root
SU 01/12 14:57 + pts/0 pmorph-root
CONSOLE=/dev/console
4. Use the su command to become root, and verify that a message is printed on
the system console.
The first section of this chapter provides information about the authentication
mechanisms that may be used with Secure RPC. Both Diffie-Hellman and Kerberos
Version 4 authentication are supported. The second section covers the Pluggable
Authentication Module (PAM) framework. PAM provides a method to “plug-in”
authentication services and provides support for multiple authentication services.
This is a list of the step-by-step instructions in this chapter.
4 “How to Set Up NIS+ Credentials for Diffie-Hellman Authentication” on page 310
4 “How to Set Up NIS Credentials with Diffie-Hellman Authentication” on page 312
4 “How to Share and Mount Files With Diffie-Hellman Authentication” on page 314
4 “How to Share and Mount Files With Kerberos Authentication” on page 315
4 “How to Acquire a Kerberos Ticket for Superuser on a Client” on page 315
4 “How to Log In to Kerberos Service” on page 316
4 “How to Access a Directory With Kerberos Authentication” on page 317
4 “How to Add a PAM Module” on page 329
4 “How to Prevent Unauthorized Access from Remote Systems with PAM” on page
329
4 “How to Initiate PAM Error Reporting” on page 329
303
authentication. Both of these authentication mechanisms use DES encryption.
Applications that use Secure RPC include NFS and the NIS+ name service.
DES Encryption
The Data Encryption Standard (DES) encryption functions use a 56-bit key to encrypt
a secret key. If two credential users (or principals) know the same DES key, they can
communicate in private, using the key to encipher and decipher text. DES is a
relatively fast encryption mechanism. A DES chip makes the encryption even faster;
but if the chip is not present, a software implementation is substituted.
The risk of using just the DES key is that, with enough time, an intruder can collect
enough cipher-text messages encrypted with the same key to be able to discover the
key and decipher the messages. For this reason, security systems such as Secure NFS
change the keys frequently.
Note - Implicit in these procedures is the name of the caller, who must be
authenticated in some manner. The keyserver cannot use DES authentication to do
this because it would create a deadlock. To solve this problem, the keyserver stores
the secret keys by UID and grants requests only to local root processes.
Additional Transactions
With every transaction after the first, the client returns the index ID to the server in
its second transaction and sends another encrypted time stamp. The server sends
back the client’s time stamp minus 1, encrypted by the conversation key.
Kerberos Version 4
Kerberos is an authentication system that was developed at the Massachusetts
Institute of Technology. Kerberos uses DES encryption to authenticate a user when
logging in to the system. Authentication is based on the ability of the sending system
to use the common key to encrypt the current time, which the receiving system can
decrypt and check against its current time. Kerberos Version 4 is supported starting
in the Solaris 2.6 release.
Kerberos works by authenticating the user’s login password. A user enters the
kinit command, which acquires a ticket that is valid for the time of the session (or
eight hours, the default session time) from the Kerberos authentication server. When
the user logs out, the ticket can be destroyed (using the kdestroy command).
The Kerberos software is available from MIT project Athena, and is not part of the
SunOS 5.7 software. SunOS 5.7 software provides:
4 Commands and APIs used by the client to create, acquire, and verify tickets
4 An authentication option to Secure RPC
4 A client-side daemon, kerbd(1M)
“Implementation of Kerberos Authentication with NFS” on page 309 gives an
overview of how the Kerberos authentication procedure works.
Note - Solaris provides the ability to connect to the Kerberos functionality. It does
not provide the Kerberos package. However, you can ftp Kerberos 4 source from
[Link] using anonymous as a username and your email address
as a password. The source is located in the pub/kerberos directory.
# /usr/sbin/keyserv
publickey: nisplus
hostname is the name of a trusted NIS+ server that contains an entry in its tables
for the client machine.
4. Add the client to the cred table by typing the following commands.
# nisaddcred local
# nisaddcred des
# keylogin
Password:
#
1. Add the user to the cred table on the root master server by typing the
following command:
2. Verify the setup by logging in as the client and typing the keylogin command.
Password:
Retype password:
publickey: nis
# newkey -h hostname
# newkey -u username
username is the name of the user. The system prompts for a password. The system
administrator can type a generic password. The private key is stored encrypted
with the generic password.
# newkey -u george
Adding new key for unix.12345@[Link]
New Password:
Retype password:
Please wait for the database to get updated...
Your new key has been successfully stored away.
#
earth% chkey -p
Updating nis publickey database.
Reencrypting key for unix.12345@[Link]
Please enter the Secure-RPC password for george:
Please enter the login password for george:
Sending key change request to pluto...
#
The -o sec=dh option mounts the file system with AUTH_DH authentication.
# kinit [Link]
# kinit [Link]
Password:
#
1. Become superuser.
# ksrvtgt [Link]
earth% cd /mntkrb
earth% ls -l /mntkrb
-rw-r--r-- 1 marks staff 29 Jul 14 12:22 sports
drwxr-xr-x 3 jjones staff 512 Sep 13 13:44 market
earth% klist
Ticket file: /tmp/tkt8516
Principal: jjones@[Link]
Issued Expires Principal
Jan 14 [Link] Jan
[Link] [Link]@[Link]
Jan 14 [Link] Jan [Link] [Link]@[Link]
earth% kdestroy
Tickets destroyed
earth% ls /mntkrb
Can’t get Kerberos key: No ticket file (tf_util)
NFS getattr failed for server pluto: RPC: Authentication error
can not access directory /mntkrb.
Introduction to PAM
The Pluggable Authentication Module (PAM) framework lets you “plug in” new
authentication technologies without changing system entry services such as login,
Overview of PAM
PAM employs run-time pluggable modules to provide authentication for system
entry services. These modules are broken into four different types based on their
function: authentication, account management, session management, and password
management. A stacking feature is provided to let you authenticate users through
multiple services, as well as a password-mapping feature to not require that users
remember multiple passwords.
Stacking Feature
The PAM framework provides a method for authenticating users with multiple
services using stacking. Depending on the configuration, the user can be prompted
for passwords for each authentication method. The order in which the authentication
services are used is determined through the PAM configuration file.
Password-Mapping Feature
The stacking method can require that a user remember several passwords. With the
password-mapping feature, the primary password is used to decrypt the other
passwords, so the user doesn’t need to remember or enter multiple passwords. The
other option is to synchronize the passwords across each authentication mechanism.
Note that this could increase the security risk, since the security of each mechanism
is limited by the least secure password method used in the stack.
PAM Functionality
The PAM software consists of a library, several modules, and a configuration file.
New versions of several system entry commands or daemons which take advantage
of the PAM interfaces are also included.
Figure 15–1 illustrates the relationship between the applications, the PAM library, the
[Link] file, and the PAM modules.
PAM Library
The PAM library, /usr/lib/libpam, provides the framework to load the
appropriate modules and manage the stacking process. It provides a generic
structure to which all of the modules can plug in.
PAM Modules
Each PAM module implements a specific mechanism. When setting up PAM
authentication, you need to specify both the module and the module type, which
You can add comments to the [Link] file by starting the line with a # (pound
sign). Use white space to delimit the fields.
Note - An entry in the PAM configuration file is ignored if one of the following
conditions exist: the line has less than four fields, an invalid value is given for
module_type or control_flag, or the named module is not found.
There are several module types that are not appropriate for each service. For
example, the password module type is only specified to go with the passwd
command. There is no auth module type associated with this command since it is
not concerned with authentication.
Control Flags
To determine continuation or failure behavior from a module during the
authentication process, you must select one of four control flags for each entry. The
control flags indicate how a successful or a failed attempt through each module are
handled. Even though these flags apply to all module types, the following
explanation assumes that these flags are being used for authentication modules. The
control flags are as follows:
4 required - This module must return success in order to have the overall result be
successful.
If all of the modules are labeled as required, then authentication through all
modules must succeed for the user to be authenticated.
If some of the modules fail, then an error value from the first failed module is
reported.
If a failure occurs for a module flagged as required, all modules in the stack are
still tried but failure is returned.
# PAM configuration
# Authentication management
#
login auth required /usr/lib/security/pam_unix.so.1
login auth required /usr/lib/security/pam_dial_auth.so.1
rlogin auth sufficient /usr/lib/security/pam_rhost_auth.so.1
rlogin auth required /usr/lib/security/pam_unix.so.1
dtlogin auth required /usr/lib/security/pam_unix.so.1
telnet auth required /usr/lib/security/pam_unix.so.1
su auth required /usr/lib/security/pam_unix.so.1
ftp auth required /usr/lib/security/pam_unix.so.1
uucp auth required /usr/lib/security/pam_unix.so.1
rsh auth required /usr/lib/security/pam_rhost_auth.so.1
OTHER auth required /usr/lib/security/pam_unix.so.1
#
# Account management
#
(continued)
Normally, the entry for the module_path is “root-relative.” If the filename you enter
for module_path does not begin with a slash (/), the path /usr/lib/security/ is
prepended to the filename. A full pathname must be used for modules located in
other directories.
The values for the module_options can be found in the man pages for the module. (For
example, pam_unix(5)).
The use_first_pass and try_first_pass options, which are supported by the
pam_unix module, let users reuse the same password for authentication without
retyping it.
If login specifies authentication through both pam_local and pam_unix, then the
user is prompted to enter a password for each module. In situations where the
passwords are the same, the use_first_pass module option prompts for only one
password and uses that password to authenticate the user for both modules. If the
passwords are different, the authentication fails. In general, this option should be
used with an optional control flag, as shown below, to make sure that the user can
still log in.
# Authentication management
#
login auth required /usr/lib/security/pam_unix.so.1
login auth optional /usr/lib/security/pam_local.so.1 use_first_pass
If the try_first_pass module option is used instead, the local module prompts
for a second password if the passwords do not match or if an error is made. If both
methods of authentication are necessary for a user to get access to all the tools they
Configuring PAM
The section below discusses some of the tasks that may be required to make the
PAM framework fully functional. In particular, you should be aware of some of the
security issues associated with the PAM configuration file.
Here are some suggestions to consider before changing the configuration file:
4 Use the OTHER entry for each module type so that every application does not have
to be included.
4 Make sure to consider the security implications of the sufficient and
optional control flags.
4 Review the man pages associated with the modules to understand how each
module will function, what options are available, and the interactions between
stacked modules.
After changing the /etc/[Link] file, review it as much as possible while still
logged in as superuser. Test all of the commands that might have been affected by
your changes. For example, if you added a new module to the telnet service, use
the telnet command and verify that the changes you made behave as expected.
4. Set the permissions so that the module file is owned by root and permissions
are 555.
5. Edit the PAM configuration file, /etc/[Link], and add this module to the
appropriate services.
Verification
It is very important to do some testing before the system is rebooted in case the
configuration file is misconfigured. Run rlogin, su, and telnet before rebooting
the system. If the service is a daemon spawned only once when the system is booted,
it may be necessary to reboot the system before you can verify that the module has
been added.
2. Restart the syslog daemon or send a SIGHUP signal to it to activate the PAM
error reporting.
[Link] /dev/console
[Link] ’root’
[Link];[Link] /var/log/pamlog
Each line in the log contains a time stamp, the name of the system that generated the
message, and the message itself. The pamlog file is capable of logging a large
amount of information.
This chapter describes how to use the Automated Security Enhancement Tool (ASET)
to monitor or restrict access to system files and directories.
This is a list of step-by-step instructions in this chapter.
4 “How to Run ASET Interactively” on page 350
4 “How to Run ASET Periodically” on page 351
4 “How to Stop Running ASET Periodically” on page 352
4 “How to Collect Reports on a Server” on page 352
331
system to a system that serves as a gateway system. (See “Firewall Setup” on page
598.)
ASET uses master files for configuration. Master files, reports, and other ASET files
are in the /usr/aset directory. These files can be changed to suit the particular
requirements of your site.
Each task generates a report noting detected security weaknesses and changes the
task has made to the system files. When run at the highest security level, ASET will
attempt to modify all system security weaknesses. If it cannot correct a potential
security problem, ASET reports the existence of the problem.
You can initiate an ASET session by using the /usr/aset command interactively, or
you can also set up ASET to run periodically by putting an entry into the crontab
file.
ASET tasks are disk-intensive and can interfere with regular activities. To minimize
the impact on system performance, schedule ASET to run when system activity level
is lowest, for example, once every 24 or 48 hours at midnight.
Note - ASET does not change the permissions of a file to make it less secure, unless
you downgrade the security level or intentionally revert the system to the settings
that existed prior to running ASET.
User/Group Checks
This task checks the consistency and integrity of user accounts and groups as defined
in the passwd and group files. It checks the local, and NIS or NIS+ password files.
NIS+ password file problems are reported but not corrected. This task checks for the
following violations:
4 Duplicate names or IDs
4 Entries in incorrect format
4 Accounts without a password
4 Invalid login directories
4 The nobody account
4 Null group password
4 A plus sign (+) in the /etc/passwd file on an NIS (or NIS+) server
Discrepancies are reported in the [Link] file.
eeprom Check
This task checks the value of the eeprom security parameter to ensure that it is set to
the appropriate security level. You can set the eeprom security parameter to none,
command, or full.
ASET does not change this setting, but reports its recommendations in the
[Link] file.
Firewall Setup
This task ensures that the system can be safely used as a network relay. It protects an
internal network from external public networks by setting up a dedicated system as
a firewall, which is described in “Firewall Systems” on page 257. The firewall system
separates two networks, each of which approaches the other as untrusted. The
firewall setup task disables the forwarding of Internet Protocol (IP) packets and hides
routing information from the external network.
The firewall task runs at all security levels, but takes action only at the highest level.
If you want to run ASET at high security, but find that your system does not require
firewall protection, you can eliminate the firewall task by editing the asetenv file.
Any changes made are reported in the [Link] file.
The log first shows the system and time that ASET was run. Then it lists each task as
it is started.
ASET invokes a background process for each of these tasks, which are described in
“ASET Tasks” on page 333. The task is listed in the execution log when it starts; this
does not indicate that it has been completed. To check the status of the background
tasks, use the taskstat utility.
ASET Reports
All report files generated from ASET tasks are in subdirectories under the
/usr/aset/reports directory. This section describes the structure of the
/usr/aset/reports directory, and provides guidelines on managing the report
files.
ASET places the report files in subdirectories that are named to reflect the time and
date when the reports are generated. This enables you to keep an orderly trail of
records documenting the system status as it varies between ASET executions. You
can monitor and compare these reports to determine the soundness of your system’s
security.
Figure 16–1 shows an example of the reports directory structure.
Tasks Report
Within each report file, messages are bracketed by a beginning and an ending banner
line. Sometimes a task terminates prematurely; for example, when a component of
ASET is accidently removed or damaged. In most cases, the report file will contain a
message near the end that indicates the reason for the premature exit.
The following is a sample report file, [Link].
Tune Files
The [Link], [Link], and [Link] master files define the available ASET
security levels. They specify the attributes of system files at each level and are used
for comparison and reference purposes.
Configuring ASET
This section discusses how ASET is configured and the environment under which it
operates.
ASET requires minimum administration and configuration, and in most cases, you
can run it with the default values. You can, however, fine-tune some of the
parameters that affect the operation and behavior of ASET to maximize its benefit.
Before changing the default values, you should understand how ASET works, and
how it affects the components of your system.
ASET relies on four configuration files to control behavior of its tasks:
4 /usr/aset/asetenv
4 /usr/aset/masters/[Link]
4 /usr/aset/masters/[Link]
4 /usr/aset/masters/[Link]
4 CKLISTPATH_LOW
4 CKLISTPATH_MED
4 CKLISTPATH_HIGH
The CKLISTPATH_LOW variable defines the directories to be checked at the low
security level. CKLISTPATH_MED and CKLISTPATH_HIGH environment variables
function similarly for the medium and high security levels.
The directory list defined by a variable at a lower security level should be a subset of
the directory list defined at the next higher level. For example, all directories
specified for CKLISTPATH_LOW should be included in CKLISTPATH_MED, and all the
directories specified for CKLISTPATH_MED should be included in
CKLISTPATH_HIGH.
Checks performed on these directories are not recursive; ASET only checks those
directories explicitly listed in the variable. It does not check their subdirectories.
You can edit these variable definitions to add or delete directories that you want
ASET to check. Note that these checklists are useful only for system files that do not
normally change from day to day. A user’s home directory, for example, is generally
too dynamic to be a candidate for a checklist.
Note - Although ASET automatically repairs the local tables, it only reports
potential problems in the NIS+ tables; it does not change them.
Note - Modify settings in the tune file by adding or deleting file entries. Setting a
permission to a less restrictive value than the current setting has no effect; the ASET
tasks do not relax permissions unless you downgrade your system security to a
lower level.
Environment Variables
Table 16–2 lists the ASET environment variables and the values that they specify.
The environment variables listed below are found in the /usr/aset/asetenv file.
The ASETDIR and ASETSECLEVEL variables are optional and can be set only
through the shell by using the aset command. The other environment variables can
be set by editing the file. The variables are described below.
ASETDIR Variable
ASETDIR specifies an ASET working directory.
$ ASETDIR=pathname
$ export ASETDIR
Set pathname to the full path name of the ASET working directory.
ASETSECLEVEL Variable
The ASETSECLEVEL variable specifies a security level at which ASET tasks are
executed.
PERIODIC_SCHEDULE Variable
The value of PERIODIC_SCHEDULE follows the same format as the crontab file.
Specify the variable value as a string of five fields enclosed in double quotation
marks, each field separated by a space:
Variable Value
minutes hours Specifies start time in number of minutes after the hour (0-59)
and the hour (0-23)
day-of-month Specifies the day of the month when ASET should be run, using
values from 1 through 31
month Specifies the month of the year when ASET should be run,
using values from 1 through 12
day-of-week Specifies the day of the week when ASET should be run, using
values from 0 through 6; Sunday is day 0 in this scheme
4 You can specify a list of values, each delimited by a comma, for any field.
PERIODIC_SCHEDULE=’’0 0 * * *’’
TASKS Variable
The TASKS variable lists the tasks that ASET performs. The default is to list all seven
tasks:
UID_ALIASES Variable
The UID_ALIASES variable specifies an aliases file. If present, ASET consults this file
for a list of permitted multiple aliases. The format is UID_ALIASES=pathname.
pathname is the full path name of the aliases file.
The default is:
UID_ALIASES=${ASETDIR}/masters/uid_aliases
YPCHECK Variable
The YPCHECK variable extends the task of checking system tables to include NIS or
NIS+ tables. It is a Boolean variable, which can be set to either true or false.
The default is false, confining checking to local system tables:
YPCHECK=false
CKLISTPATH_level Variable
The three checklist path variables list the directories to be checked by the checklist
task. The following definitions of the variables are set by default; they illustrate the
relationship between the variables at different levels:
CKLISTPATH_LOW=${ASETDIR}/tasks:${ASETDIR}/util:${ASETDIR}/masters:
/etc
CKLISTPATH_MED=${CKLISTPATH_LOW}:/usr/bin:/usr/ucb
CKLISTPATH_HIGH=${CKLISTPATH_MED}:/usr/lib:/sbin:/usr/sbin:/usr/ucblib
Tune Files
ASET maintains three tune files. The entry format in all three tune files are described
in Table 16–4.
Entry Description
4 If two entries have different owner or group designations, the last entry takes
[Link] following example shows the first few lines of the [Link] file.
Aliases File
An aliases file contains a list of aliases that share the same user ID.
Each entry is in this form:
uid=alias1=alias2=alias3=...
For example, the following entry lists the user ID 0 being shared by sysadm and
root:
0=root=sysadm
level Specifies the level of security. Valid values are low, medium,
or high. The default setting is low. See “ASET Security
Levels” on page 332 for detailed information about security
levels.
3. Verify ASET is running by viewing the ASET execution log that is displayed
on the screen.
The execution log message identifies which tasks are being run.
# /usr/aset/aset -l low
======= ASET Execution Log =======
(continued)
tune
cklist
eeprom
2. If necessary, set up the time when you want ASET to run periodically.
You should have ASET run when system demand is light. The
PERIODIC_SCHEDULE environment variable in the /usr/aset/asetenv file is
used to set up the time for ASET to run periodically. By default, the time is set for
midnight every 24 hours.
If you want to set up a different time, edit the PERIODIC_SCHEDULE variable in
the /usr/aset/asetenv file. See “PERIODIC_SCHEDULE Variable” on page 346
for detailed information about setting the PERIODIC_SCHEDULE variable.
# /usr/aset/aset -p
# crontab -e root
# crontab -l root
mars# cd /usr/aset
d. This creates a subdirectory (client_rpt) for a client. Repeat this step for each
client whose reports you need to collect.
The following example creates the directory all_reports, and the
subdirectories pluto_rpt and neptune_rpt.
mars# cd /usr/aset
mars# mkdir all_reports
mars# cd all_reports
mars# mkdir pluto_rpt
mars# mkdir neptune_rpt
# shareall
5. On each client, mount the client subdirectory from the server at the mount
point, /usr/aset/masters/reports
6. Edit the /etc/vfstab file to mount the directory automatically at boot time.
ASET cannot determine what the security Ensure the current security level is set either
levels are for the current and previous through the command line option or the
invocations. ASETSECLEVELenvironment variable. Also,
ensure that the last line of ASETDIR/
archives/[Link] correctly
reflects the previous security level. If these
values are not set or are incorrect, specify
them correctly.
The ASET working (operating) directory is Use the ASETDIR environment variable or
not defined, or defined incorrectly. the -d command line option to specify it
correctly, and restart ASET.
The ASET working (operating) directory is Ensure that the correct directory—that is, the
not defined, or it is defined incorrectly. This directory containing the ASET directory
may be because the ASETDIR variable or the hierarchy—is referred to correctly.
-d command line option refers to a
nonexistent directory.
ASET cannot expand the directory name Ensure that the directory name is given
given by the ASETDIR variable or the -d correctly, and that it refers to an existing
command line option to a full path name. directory to which the user has access.
The security level is not defined or it is Use the ASETSECLEVEL variable or the -l
defined incorrectly. Only the values low, command line option to specify one of the
med, or high are acceptable. three values.
ASET cannot locate an asetenv file in its Ensure there is an asetenv file in ASET’s
working directory. working directory. See asetenv(4) for the
details about this file.
The file referred to by filename doesn’t exist Ensure the argument to the -u option exists
or is not readable. This can specifically occur and is readable.
when using the -u option where you can
specify a file that contains a list of users
whom you want to check.
The ASET task list, which should be defined Examine your asetenv file. Ensure the task
in the asetenv file, is not defined. This can list is defined in the User Configurable
mean that your asetenv file is bad. section. Also check other parts of the file to
ensure the file is intact. See asetenv(4) for
the content of a good asetenv file.
The ASET task list, which should be defined Examine your asetenv file. Ensure the task
in the asetenv file, is not defined. This can list is defined in the User Configurable
mean that your asetenv file is bad. section. Also check other parts of the file to
ensure the file is intact. See asetenv(4) for
the content of a good asetenv file.
ASET scheduling is requested using the -p Check the User Configurable section of
option, but the variable the asetenv file to ensure the variable is
PERIODIC_SCHEDULE is undefined in the defined and is in proper format.
asetenv file.
ASET is scheduled more than once. In other Verify, through the crontab(1) command
words, scheduling is requested while a interface, that the correct schedule is in
schedule is already in effect. This is not effect. Ensure that no unnecessary crontab
necessarily an error if more than one entries for ASET are in place.
schedule is indeed desired, just a warning
that normally this is unnecessary since you
should use the crontab(1) scheduling
format if you want more than one schedule.
This part provides instructions for managing system resources in the Solaris
environment. This part contains these chapters.
361
What Are Quotas?
Quotas enable system administrators to control the size of UFS file systems by
limiting the amount of disk space and the number of inodes (which roughly
corresponds to the number of files) that individual users can acquire. For this reason,
quotas are especially useful on the file systems where user home directories reside.
(As a rule, public and /tmp file systems probably wouldn’t benefit as much from the
establishment of quotas.)
Setting up quotas involves these general steps:
1. A series of commands prepares a file system to accept quotas, ensuring that
quotas will be enforced each time the system is rebooted and the file system is
mounted. Entries must be added to the /etc/vfstab file, and a quotas file
must be created in the top-level directory of the file system.
2. After a quota is created for one user, it can be copied as a prototype to set up
other user quotas.
3. Before quotas are actually turned on, another command checks for consistency by
comparing the proposed quotas to the current disk usage making sure there are
no conflicts.
4. Finally, a command turns the quotas on for one or more entire file systems.
These steps ensure that quotas are automatically activated on a file system each time
it is mounted. See Chapter 20 for specific information about these procedures.
Once they are in place, quotas can be changed to adjust the amount of disk space or
number of inodes that users can consume. Additionally, quotas can be added or
removed as system needs change. See “Changing and Removing Quotas” on page
406 for instructions on how to change quotas, disable individual quotas, or remove
quotas from file systems.
In addition, quota status can be monitored. Quota commands enable administrators
to display information about quotas on a file system, or search for users who have
exceeded their quotas. For procedures that describe how to use these commands, see
“Checking Quotas” on page 403.
Accounting Components
The accounting software provides C language programs and shell scripts that
organize data into summary files and reports. These programs reside in the
/usr/adm/acct and /usr/lib/acct directories.
Daily accounting can help you do four types of auditing:
4 Connect
4 Process
4 Disk
4 Fee calculations
This chapter describes tasks required to examine and change the most common
system information. This is a list of the step-by-step instructions in this chapter.
4 “How to Display General System Information (uname)” on page 369
4 “How to Display a System’s Host ID Number ” on page 369
4 “How to Display a System’s Installed Memory” on page 370
4 “How to Display the Date and Time” on page 370
4 “How to Synchronize Date and Time From Another System” on page 373
4 “How to Set a System’s Date and Time Manually” on page 373
4 “How to Set Up a Message of the Day” on page 374
4 “How to Set the Number of Processes per User” on page 375
4 “How to Increase the Number of Pseudo-ttys” on page 376
4 “How to Increase Shared Memory Segments” on page 377
367
TABLE 18–1 Commands for Displaying System Information
Host ID number
hostid(1)
Installed memory
prtconf(1M)
$ showrev [-a]
$ showrev -a
Hostname: pluto
Hostid: 5721864d
Release: 5.7
Kernel architecture: sun4m
Application architecture: sparc
Hardware provider: Sun_Microsystems
Domain: [Link]
Kernel version: SunOS 5.7 Generic September 1998
(continued)
OpenWindows version:
OpenWindows Version 3.7, 3 February 1998
No patches are installed
$
$ uname[-a]
$ uname
SunOS
$ uname -a
SunOS pluto 5.7 Generic sun4m sparc SUNW,SPARCstation-5
$
$ hostid
$ date
$ date
Thu Feb 26 [Link] MST 1998
$
Using these commands, you can set a system’s date and time to synchronize with the
date and time of another system, such as a server. Or you can change a system’s date
and time by specifying new information.
The message of the day (MOTD) facility, located in /etc/motd, enables you to send
announcements or inquiries to all users of a system when they log in. Use this
facility sparingly, and edit this file regularly to remove obsolete messages.
By editing the /etc/system file, you can:
4 Change the number of processes per user
4 Increase the number of pseudo-ttys to 256
4 Increase the number of lock requests
4 Increase shared memory segments
# cp [Link] [Link]
# ./xntpd start
# cp [Link] [Link]
2. To reset the date and time to synchronize with another system, use the rdate
command.
# rdate other-system-name
3. Verify that you have reset your system’s date correctly by checking your
system’s date and time using the date command.
The output should show a date and time that matches that of the other system.
neptune$ date
Thu Feb 26 [Link] MST 1998
neptune# rdate pluto
Thu Feb 26 [Link] MST 1998
neptune$ date
Thu Feb 26 [Link] MST 1998
3. Verify that you have reset your system’s date correctly by checking your
system’s date and time using the date command with no options.
The output should show a date and time that matches that of the other system.
# date
Thu Feb 26 [Link] MST 1998
# date 022610221998
3. Edit the text to include the message that will be displayed as part of the user
login process, including spaces, Tabs, and Returns.
$ cat /etc/motd
Welcome to the UNIX Universe. Have a nice day.
$ cat /etc/motd
Sun Microsystems Inc SunOS 5.7 Generic September 1998
The following example shows an edited /etc/motd file that provides information
about system availabilty to each user who logs in.
$ cat /etc/motd
The system will be down from 7:00 a.m to 2:00 [Link]
Saturday, February 28, for upgrades and maintenance.
Do not try to access the system during those hours.
Thank you...
set maxuprc=value
set maxuprc=100
set pt_cnt=value
set npty=same_value_as_pt_cnt
set sad_cnt=2_times_pt_cnt value
set nautopush=same_value_as_pt_cnt
set nautopush Sets the number of STREAMS autopush entries and should
be two times the value of sadcnt.
$ touch /reconfigure
set pt_cnt=128
set npty=128
set sad_cnt=256
set nautopush=128
set shmsys:shminfo_shmmax=value
set shmsys:shminfo_shmmin=value
set shmsys:shminfo_shmmni=value
set shmsys:shminfo_shmseg=value
set semsys:seminfo_semmap=value
set semsys:seminfo_semmni=value
set semsys:seminfo_semmns=value
set semsys:seminfo_semmsl=value
set semsys:seminfo_semmnu=value
set semsys:seminfo_semume=value
set shmsys:shminfo_shmmax=268435456
set shmsys:shminfo_shmmin=200
set shmsys:shminfo_shmmni=200
set shmsys:shminfo_shmseg=200
set semsys:seminfo_semmap=250
set semsys:seminfo_semmni=500
set semsys:seminfo_semmns=500
set semsys:seminfo_semmsl=500
(continued)
set semsys:seminfo_semmnu=500
set semsys:seminfo_semume=100
This chapter describes how to optimize disk space by locating unused files and large
directories. This is a list of the step-by-step instructions in this chapter.
4 “How to Display Information About Blocks, Files, and Disk Space” on page 381
4 “How to Display the Size of Files” on page 384
4 “How to Find Large Files” on page 385
4 “How to Find Files That Exceed a Given Size Limit” on page 386
4 “How to Display the Size of Directories, Subdirectories, and Files” on page 387
4 “How to Display the User Allocation of Local UFS File System” on page 388
4 “How to List the Newest Files” on page 390
4 “How to Find and Remove Old or Inactive Files ” on page 390
4 “How to Clear Out Temporary Directories” on page 392
4 “How to Find and Delete core Files” on page 393
4 “How to Delete Crash Dump Files” on page 393
381
$ df [directory] [-F fstype] [-g] [-k] [-t]
df With no options, lists all mounted file systems and their device
names, the number of total 512-byte blocks used, and the
number of files.
directory Directory whose file system you want to check. The device
name, blocks used, and number of files are displayed.
Displays total blocks as well as blocks used for all mounted file
−t
systems.
Note - For remotely mounted file systems, ‘‘-1 files’’ is displayed instead of
the number of files.
$ df
/ (/dev/dsk/c0t3d0s0 ): 30374 blocks 14002 files
/usr (/dev/dsk/c0t3d0s6 ): 40714 blocks 80522 files
/proc (/proc ): 0 blocks 429 files
/dev/fd (fd ): 0 blocks 0 files
/export/home (/dev/dsk/c0t3d0s7 ): 10712 blocks 10564 files
/export/root (/dev/dsk/c0t3d0s3 ): 69180 blocks 18812 files
/export/swap (/dev/dsk/c0t3d0s4 ): 61804 blocks 29563 files
/opt (/dev/dsk/c0t3d0s5 ): 15722 blocks 13147 files
/tmp (swap ): 57104 blocks 5653 files
/usr/local (mars:/usr/local ): 435040 blocks -1 files
$
$ df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t3d0s0 30991 15812 12089 57% /
/dev/dsk/c0t3d0s6 185303 164946 1827 99% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t3d0s7 19095 13739 3456 80% /export/home
/dev/dsk/c0t3d0s3 34599 9 31140 1% /export/root
/dev/dsk/c0t3d0s4 55511 24609 25352 50% /export/swap
/dev/dsk/c0t3d0s5 23063 15202 5561 74% /opt
swap 29564 976 28588 4% /tmp
mars:/usr/local 5353093 5135591 163972 97% /usr/local
$
The following example shows information about the same system as the previous
example, but only UFS file system information is displayed.
$ df -F ufs
/ (/dev/dsk/c0t3d0s0 ): 30358 blocks 14002 files
/usr (/dev/dsk/c0t3d0s6 ): 40714 blocks 80522 files
/export/home (/dev/dsk/c0t3d0s7 ): 10712 blocks 10564 files
/export/root (/dev/dsk/c0t3d0s3 ): 69180 blocks 18812 files
/export/swap (/dev/dsk/c0t3d0s4 ): 61804 blocks 29563 files
/opt (/dev/dsk/c0t3d0s5 ): 15722 blocks 13147 files
$
Note - Although /proc and /tmp are local file systems, they are not UFS file
systems (/proc is a PROCFS file system, and /tmp is a TMPFS file system).
The following example shows a list of all mounted file systems, device names, total
512-byte blocks used, and number of files. The second line of each two-line entry
displays the total number of blocks and files allocated for the file system.
$ df -t
/ (/dev/dsk/c0t3d0s0 ): 30358 blocks 14002 files
total: 61982 blocks 16128 files
/usr (/dev/dsk/c0t3d0s6 ): 40714 blocks 80522 files
total: 370606 blocks 94080 files
/proc (/proc ): 0 blocks 429 files
total: 0 blocks 492 files
/dev/fd (fd ): 0 blocks 0 files
total: 0 blocks 26 files
/export/home (/dev/dsk/c0t3d0s7 ): 10712 blocks 10564 files
total: 38190 blocks 10752 files
/export/root (/dev/dsk/c0t3d0s3 ): 69180 blocks 18812 files
(continued)
$ ls [-l] [-s]
% cd /var/lp/logs
% ls -s
total 2 0 lpsched 0 lpsched.1 2 lpsched.2%
sort -nr Sorts the list of files by block size from smallest to
largest.
-size +nnn Is a number of 512-byte blocks. Files that exceed the size
indicated are listed.
(continued)
./[Link]
The following example displays the sizes of two directories, all of the subdirectories
and files they contain, and the total number of blocks contained in each directory.
$ du -a /var/log /var/cron
0 /var/log/authlog
0 /var/log/syslog
2 /var/log/[Link]
4 /var/log
3248 /var/cron/log
3250 /var/cron
$ du -s /var/log /var/cron
4 /var/log
3250 /var/cron
2. Display users, directories, or file systems, and the number of 1024-byte blocks
used.
Lists all users of each mounted UFS file system and the
−a
number of 1024-byte blocks used.
Note - The quot command works only on local UFS file systems.
# quot /
/dev/rdsk/c0t0d0s0:
35400 bin
183 adm
49 lp
47 uucp
37 bob
28 sys
2 mary
# quot -a
/dev/rdsk/c0t0d0s0 (/):
35400 bin
183 adm
49 lp
47 uucp
37 bob
28 sys
2 mary
/dev/rdsk/c0t0d0s6 (/usr):
56567 bin
2000 lp
698 uucp
1 adm
/dev/rdsk/c0t0d0s7 (/export/home):
617 ken
$ ls -t [directory]
$ ls -t /var/adm
sulog wtmpx wtmp messages.1 [Link] spellhist
messages utmp sa messages.2 log aculog
utmpx lastlog messages.0 messages.3 acct passwd
$ ls -l /var/adm
total 686
drwxr-xr-x 5 adm adm 512 Feb 13 16:20 acct
-rw------- 1 uucp bin 0 Feb 13 16:04 aculog
-r--r--r-- 1 root other 8456 Mar 27 10:34 lastlog
drwxr-xr-x 2 adm adm 512 Feb 13 16:36 log
-rw-r--r-- 1 root other 117376 Mar 27 13:11 messages
-rw-r--r-- 1 root other 4620 Jan 30 08:30 messages.0
-rw-r--r-- 1 root other 11176 Jan 23 04:30 messages.1
-rw-r--r-- 1 root other 60 Jan 13 09:45 messages.2
-rw-r--r-- 1 root other 0 Jan 31 04:05 messages.3
drwxr-xr-x 2 adm adm 512 Feb 13 16:03 passwd
drwxr-xr-x 2 adm sys 512 Mar 20 06:59 sa
-rw-rw-rw- 1 bin bin 0 Feb 13 16:04 spellhist
-rw------- 1 root root 1647 Mar 27 13:28 sulog
-rw-r--r-- 1 root bin 504 Mar 27 10:34 utmp
-rw-r--r-- 1 root bin 5208 Mar 27 10:34 utmpx
-rw-rw-rw- 1 root root 500 Jan 11 14:40 [Link]
-rw-rw-r-- 1 adm adm 14724 Mar 27 10:34 wtmp
-rw-rw-r-- 1 adm adm 151404 Mar 27 10:34 wtmpx
3. Remove the inactive files that you listed in the previous step.
# rm ‘cat filename‘
(continued)
/var/adm/messages.1
/var/adm/messages.2
/var/adm/messages.3
# rm ‘cat /var/tmp/deadfiles‘
# cd /var/tmp
Caution - Be sure you are in the right directory before completing the following
step. The next step deletes all files in the current directory.
# rm -r *
# cd /var/tmp
# ls
deadfiles wxconAAAa0003r:0.0 wxconAAAa000NA:0.0
test_dir wxconAAAa0003u:0.0 wxconAAAa000cc:0.0
wxconAAAa000zs:0.0
(continued)
# rm -r *
# ls
#
3. Find and remove any core files in this directory and its subdirectories.
# cd /home/jones
# find . -name core -exec rm {} \;
1. Become superuser.
# cd /var/crash/system
# rm *
# ls
# cd /var/crash/venus
# rm *
# ls
This chapter describes how to set up and administer quotas for disk space and
inodes. This is a list of the step-by-step instructions in this chapter.
4 “How to Configure File Systems for Quotas” on page 399
4 “How to Set Up Quotas for a User” on page 400
4 “How to Set Up Quotas for Multiple Users” on page 401
4 “How to Check Quota Consistency” on page 402
4 “How to Turn Quotas On” on page 402
4 “How to Check for Exceeded Quotas” on page 404
4 “How to Check Quotas on a File System” on page 405
4 “How to Change the Soft Time Limit Default” on page 407
4 “How to Change Quotas for a User” on page 408
4 “How to Disable Quotas for a User” on page 409
4 “How to Turn Quotas Off” on page 410
Using Quotas
Using quotas enable system administrators to control the size of UFS file systems by
limiting the amount of disk space and the number of inodes (which roughly
corresponds to the number of files) that individual users can acquire. For this reason,
quotas are especially useful on the file systems where user home directories reside.
Once they are in place, quotas can be changed to adjust the amount of disk space or
number of inodes that users can consume. Additionally, quotas can be added or
395
removed as system needs change. See “Changing and Removing Quotas” on page
406 for instructions on changing quotas or the amount of time that quotas can be
exceeded, disabling individual quotas, or removing quotas from file systems.
In addition, quota status can be monitored. Quota commands enable administrators
to display information about quotas on a file system, or search for users who have
exceeded their quotas. For procedures that describe how to use these commands, see
“Checking Quotas” on page 403.
Set the hard and soft limits on the number of inodes and
edquota(1M) disk space for each user.
2. Set Up Quotas for a User Use the edquota command to create disk
“How to Set Up Quotas for a
and inode quotas for a single user account.
User” on page 400
3. Set Up Quotas for Optional. Use edquota to apply prototype “How to Set Up Quotas for
Multiple Users quotas to other user accounts. Multiple Users” on page 401
2. Edit the /etc/vfstab file by using the editor of your choice. Add rq to the
mount options field for each UFS file system that will have quotas.
4. Change directory to the top of the file system that will have quotas.
# touch quotas
The following example from /etc/vfstab shows that the /export/home directory
from the system pluto is mounted as an NFS file system on the local system with
quotas enabled.
(continued)
The following example line from /etc/vfstab shows that the local (UFS)/work
directory is mounted with quotas enabled.
2. Use the quota editor to create a temporary file containing one line of quota
information for each mounted UFS file system that has a quotas file in its
top-level directory.
# edquota username
3. Change the number of 1-Kbyte disk blocks, both soft and hard, and the
number of inodes, both soft and hard, from 0 (the default) to the quotas you
specify for each file system.
# quota -v username
The following example shows the same line in the temporary file after quotas have
been set up.
fs /files blocks (soft = 50, hard = 60) inodes (soft = 90, hard = 100)
2. Use the quota editor to apply the quotas you already established for a
prototype user to the additional users you specify.
prototype-user User name of the account for which you have set
up quotas.
Note - To ensure accurate disk data, the file systems being checked should be
quiescent when you run the quotacheck command manually. The quotacheck
command is run automatically when a system is rebooted.
1. Become superuser.
# quotacheck [ -v ] -a | filesystem
# quotacheck -va
*** Checking quotas for /dev/rdsk/c0t0d0s7 (/export/home)
filesystem ... Turns quotas on for one or more file systems that
you specify.
Example—Turning Quotas On
The following example turns quotas on for the file systems on the
/dev/dsk/c0t4d0s2 and /dev/dsk/c0t3d0s2 slices.
Checking Quotas
After you have set up and turned on disk and inode quotas, you can check for users
who exceed their quotas. In addition, you can check quota information for entire file
systems.
Table 20–3 describes the commands you use to check quotas.
Command Task
1. Become superuser.
2. Display user quotas for mounted file systems where quotas are enabled.
# quota -v 301
Disk quotas for bob (uid 301):
Filesystem usage quota limit timeleft files quota limit timeleft
/export/home 0 1 2 0 2 3
timeleft Is the amount of time (in days) left on the quota timer
timeleft Is the amount time (in days) left on the quota timer.
2. Display all quotas for one or all file systems, even if there is no usage.
# repquota -va
/dev/dsk/c0t3d0s7 (/export/home):
Block limits File limits
User used soft hard timeleft used soft hard timeleft
#301 -- 0 1 2.0 days 0 2 3
#341 -- 57 50 60 7.0 days 2 90 100
File Limits
Command Task
You can change the length of time that users may exceed their disk space or inode
quotas by using the edquota command.
1. Become superuser.
2. Use the quota editor to create a temporary file containing soft time limits.
# edquota -t
3. Change the time limits from 0 (the default) to the time limits you specify by
numbers and the keywords month, week, day, hour, min, or sec.
2. Use the quota editor to open a temporary file containing one line for each
mounted file system that has a quotas file in its top-level directory.
# edquota username
Caution - Although you can specify multiple users as arguments to the edquota
command, the information displayed does not show which user it belongs to, which
could create some confusion.
3. Enter the number of 1-Kbyte disk blocks, both soft and hard, and the number
of inodes, both soft and hard.
5. Verify that a user’s quota has been correctly changed by using the quota
command.
# quota -v username
The following example shows the same temporary file after quotas have been
changed.
The following example shows how to verify that the hard quotas for user smith
have been changed to 500 1-Kbyte blocks, and 100 inodes.
# quota -v smith
Disk quotas for smith (uid 12):
Filesystem usage quota limit timeleft files quota limit timeleft
2. Use the quota editor to create a temporary file containing one line for each
mounted file system that has a quotas file in its top-level directory.
# edquota username
Caution - Although you can specify multiple users as arguments to the edquota
command, the information displayed does not show which user it belongs with,
which could create some confusion.
3. Change the number of 1-Kbyte disk blocks, both soft and hard, and the
number of inodes, both soft and hard, to 0 (zero).
5. Verify that you have disabled a user’s quota by using the quota command.
# quota -v username
fs /files blocks (soft = 50, hard = 60) inodes (soft = 90, hard = 100)
The following example shows the same temporary file after quotas have been
disabled.
filesystem1, 2, 3 ... Turns quotas off for one or more file systems you
specify.
# quotaoff -v /export/home
/export/home: quotas turned off
This chapter describes how to schedule routine or one-time system events by using
the crontab and at commands. It also explains how to control access to these
commands by using [Link], [Link], and [Link] files.
This is a list of the step-by-step instructions in this chapter.
4 “How to Create or Edit a crontab File” on page 417
4 “How to Display a crontab File” on page 419
4 “How to Remove a crontab File” on page 420
4 “How to Deny crontab Access” on page 422
4 “How to Limit crontab Access to Specified Users” on page 423
4 “How to Create an at Job” on page 426
4 “How to Display the at Queue” on page 427
4 “How to Display at Jobs” on page 427
4 “How to Remove at Jobs” on page 428
4 “How to Deny at Access” on page 429
413
TABLE 21–1 Command Summary: Scheduling System Events
What It
Command Schedules Location of Files Files That Control Access
10 3 * * 0,4 /etc/cron.d/logchecker
10 3 * * 0 /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
The first command line instructs the system to run logchecker at 3:10 on Sundays
and Thursdays nights. The second command line schedules the system to run
newsyslog at 3:10 every Sunday morning. The third command line orders the
system to execute nfsfind daily at 3:15 in the morning The fourth command line
adm Accounting
lp Printing
Other crontab files are named after the user accounts in which they are created,
such as bob, mary, smith, or jones.
Besides the default crontab file, users can create crontab files to schedule their
own system events. To access crontab files belonging to root or other users,
superuser privileges are required.
Procedures explaining how to create, edit, display, and remove crontab files are
described in “Commands for Scheduling System Events” on page 413.
Minute 0-59
Hour 0-23
Month 1-12
Each command within a crontab file must consist of one line, even if it is very
long, because crontab does not recognize extra carriage returns. For more detailed
information about crontab entries and command options, refer to crontab(1).
$ which $EDITOR
$
$ EDITOR=vi
$ export EDITOR
$ crontab -e [username]
4. Add command lines to the file, following the syntax described in “Syntax of
crontab File Entries” on page 416.
# crontab -l [username]
# crontab -e jones
The following command entry added to a new crontab file will automatically
remove any log files from the user’s home directory at 1 every Sunday morning.
Because the command entry does not redirect output, redirect characters are added
to the command line after *.log to make sure that the command executes properly.
$ crontab -l [username]
Caution - If you accidentally enter the crontab command with no option, press the
interrupt character for your editor. This allows you to quit without saving changes.
Exiting the file and saving changes at this point would overwrite an existing
crontab file with an empty file.
$ crontab -l
13 13 * * * chmod g+w /usr/documents/*.book > /dev/null 2>&1
$ su
Password:
# crontab -l
#ident "@(#)root 1.16 98/04/28 SMI" /* SVr4.0 [Link] */
#
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
10 3 * * 0,4 /etc/cron.d/logchecker
10 3 * * 0 /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
# crontab -l jones
13 13 * * * cp /home/jones/work_files /usr/backup/. > /dev/null
2>&1
By default, crontab -r removes your own crontab file. You must be superuser to
remove crontab files belonging to superuser or other users.
$ crontab -r [username]
Caution - If you accidentally enter the crontab command with no option, press the
interrupt character for your editor. This allows you to quit without saving changes.
Exiting the file and saving changes at this point would overwrite an existing
crontab file with an empty file.
# ls /var/spool/cron/crontabs
$ ls /var/spool/cron/crontabs
adm jones lp root smith sys uucp
$ crontab -r
$ ls /var/spool/cron/crontabs
adm jones lp root sys uucp
The [Link] and [Link] files consist of a list of user names, one per line.
These access control files work together like this:
4 If [Link] exists, only the users listed in this file can create, edit, display, or
remove crontab files.
$ cat /etc/cron.d/[Link]
daemon
bin
smtp
nuucp
listen
nobody
noaccess
None of these user names can access crontab commands. You can edit this file to
add other user names who will be denied access to the crontab command.
No default [Link] file is supplied. This means that, after Solaris software
installation, all users (except the ones listed in the default [Link] file) can access
crontab. If you create a [Link] file, only these users can access crontab
commands.
2. Using the editor of your choice, edit the /etc/cron.d/[Link] file to add
user names, one per line, who will be prevented from using crontab
commands.
daemon
bin
smtp
nuucp
listen
nobody
noaccess
username1
username2
username3
.
.
(continued)
# cat /etc/cron.d/[Link]
3. Enter the user names, one per line, who will be allowed to use crontab
commands.
root
username1
username2
username3
.
.
.
Be sure to add root to this list. If you do not, superuser access to crontab
commands will be denied.
$ cat /etc/cron.d/[Link]
daemon
bin
smtp
nuucp
listen
nobody
noaccess
jones
temp
visitor
The following example shows a [Link] file. The users smith, jones, lp, and
root are the only ones who may access crontab.
$ cat /etc/cron.d/[Link]
root
jones
lp
smith
$ crontab -l
If the user can access crontab, and already has created a crontab file, it will be
displayed. Otherwise, if the user can access crontab but no crontab file exists, a
message like the following will be displayed:
This user either is listed in [Link] (if it exists), or is not listed in [Link].
If the user cannot access crontab, the following message is displayed whether or
not a previous crontab file exists:
This means either that the user is not listed in [Link] (if it exists), or the user
is listed in [Link].
at Command Description
Submitting an at job file includes:
1. Invoking the at utility, specifying a command execution time.
2. Entering a command or script to execute later.
For example, the following at job removes core files from the user account
belonging to Smith near midnight on the last day of January.
$ at 11:45pm June 11
at> rm /home/smith/*core*
at> Press Control-d
job 897543900.a at Wed Jun 10 [Link] 1998
at Command Security
You can set up a file to control access to the at command, permitting only specified
users to create, remove, or display queue information about their at jobs. The file
that controls access to at, /etc/cron.d/[Link], consists of a list of user names,
one per line. The users listed in this file cannot access at commands.
The [Link] file, created during SunOS software installation, contains the following
user names:
With superuser privileges, you can edit this file to add other user names whose at
access you want to restrict.
2. At the at prompt, enter the commands or scripts you want to execute, one per
line. You may enter more than one command by pressing Return at the end of
each line.
Examples—Creating an at Job
The following example shows the at job that user jones created to remove her
backup files at 7:30 at night. She used the -m option so that she would receive a mail
message after her job completed.
She received a mail message which confirmed the execution of her at job.
The following example shows how Jones scheduled a large at job for 4:00 Saturday
morning. The output of which was directed to [Link].
$ at 4 am Saturday
at> sort -r /usr/dict/words > /export/home/jones/[Link]
$ atq
$ atq
Rank Execution Date Owner Job Queue Job Name
1st Jun 8, 1998 19:30 jones 897355800.a a stdin
2nd Jun 10, 1998 23:45 jones 897543900.a a stdin
3rd Jun 13, 1998 04:00 jones 897732000.a a stdin
$ at -l [job-id]
Example—Displaying at Jobs
The following example shows output from the at -l command, used to get status
information on all jobs submitted by a user.
$ at -l
897543900.a Wed Jun 10 [Link] 1998
897355800.a Mon Jun 8 [Link] 1998
897732000.a Sat Jun 13 [Link] 1998
The following example shows output displayed when a single job is specified with
the at -l command.
$ at -l 897732000.a
$ at -r [job-id]
3. Verify the at job is removed by using the at -l (or the atq) command to
display the jobs remaining in the at queue. The job whose identification
number you specified should not appear.
$ at -l [job-id]
Example—Removing at Jobs
In the following example, a user wants to remove an at job that was scheduled to
execute at noon on March 1. First, the user displays the at queue to locate the job
$ at -l
897543900.a Wed Jun 10 [Link] 1998
897355800.a Mon Jun 8 [Link] 1998
897732000.a Sat Jun 13 [Link] 1998
$ at -r 897732000.a
$ at -l 897732000.a
at: 858142000.a: No such file or directory
Controlling Access to at
Users listed in the [Link] file cannot use at to schedule jobs or to check the at
queue status.
The [Link] file is placed in the /etc/cron.d directory during Solaris software
installation. At that time, the same users are listed in both this file and the default
[Link] file.
daemon
bin
smtp
nuucp
listen
nobody
noaccess
3. Add the names of users, one per line, who will be prevented from using at
commands.
Example—Denying at Access
The following example shows an [Link] file that has been edited so that the users
Smith and Jones may not access at.
$ cat [Link]
daemon
bin
smtp
nuucp
listen
nobody
noaccess
jones
smith
# su smith
Password:
$ at -l
at: you are not authorized to use at. Sorry.
This section contains some simple procedures for setting up and maintaining system
accounting.
This is a list of the step-by-step instructions in this chapter.
4 “How to Set Up System Accounting” on page 434
4 “How to Bill Users” on page 437
4 “How to Fix a wtmp File” on page 438
4 “How to Fix tacct Errors” on page 439
4 “How to Restart runacct” on page 440
4 “How to Set Up System Accounting” on page 434
4 “How to Permanently Disable System Accounting” on page 441
433
TABLE 22–1 Default Accounting Scripts
You can change these defaults. After these entries have been added to the database
and the accounting programs have been installed, accounting should run
automatically.
# ln /etc/init.d/acct /etc/rc2.d/S22acct
# ln /etc/init.d/acct /etc/rc0.d/K22acct
5. Modify the admcrontab file to start the ckpacct, runacct, and monacct
programs automatically.
(continued)
30 7 1 * * /usr/lib/acct/monacct
6. Modify the root crontab file to start the dodisk program automatically.
# crontab -e
30 22 * * 4 /usr/lib/acct/dodisk
# /etc/init.d/acct start
Examples—Setting Up Accounting
The following example shows how the crontab entries that run
/usr/lib/acct/ckpacct, /usr/lib/acct/runacct, and
/usr/lib/acct/monacct have been added to
/var/spool/cron/crontabs/adm.
The following example shows how the crontab entry that runs
/usr/lib/acct/dodisk has been added to
/var/spool/cron/crontabs/root.
Example—Billing Users
The following example charges the user print_customer 10 units.
# chargefee print_customer 10
The wtmp(4) files seem to cause the most problems in the day-to-day operation of
the accounting system. When the date is changed and the system is in multiuser
mode, a set of date change records is written into /var/adm/wtmp. The
wtmpfix(1M)wtmpfix utility is designed to adjust the time stamps in the wtmp
records when a date change is encountered. However, some combinations of date
changes and reboots will slip through wtmpfix and cause acctcon to fail. For
instructions on correcting wtmp problems, see “How to Fix a wtmp File” on page 438.
3. Convert the binary file [Link] into the ASCII file xwtmp.
4. Edit xwtmp. Delete the corrupted files, or delete all records from the beginning
up to the date change.
5. Convert the ASCII file xwtmp to a binary file, overwriting the corrupted file.
4. Edit the xtacct file, removing bad records and writing duplicate records to
another file.
6. Merge the files [Link] and [Link] into the file tacct.
Restarting runacct
The runacct program can fail for a variety of reasons, the most common being a
system crash, /var running out of space, or a corrupted wtmp file. If the
activeMMDD file exists, check it first for error messages. If the active and lock
files exist, check fd2log for any mysterious messages.
Called without arguments, runacct assumes that this is the first invocation of the
day. The argument MMDD is necessary if runacct is being restarted and specifies
the month and day for which runacct will rerun the accounting. The entry point
Caution - When running the runacct program manually, be sure to run it as user
adm.
$ cd /var/adm/acct/nite
$ rm lastdate lock*
3. Modify the crontab file for user root in order to stop the dodisk program
from running by commenting out the appropriate line.
# crontab -e
#30 22 * * 4 /usr/lib/acct/dodisk
4. Stop accounting.
# /etc/init.d/acct stop
To re-enable system accounting, remove the newly added comment symbols from the
crontab files and restart accounting.
# /etc/init.d/acct start
2. Modify the adm crontab file and delete the entries for the ckpacct, runacct,
and monacct programs.
3. Modify the root crontab file and delete the entries for the dodisk program.
# crontab -e
# unlink /etc/rc2.d/S22acct
# unlink /etc/rc0.d/K22acct
6. Stop accounting.
# /etc/init.d/acct stop
Daily Accounting
Daily accounting can help you track four types of accounting: connect accounting,
process accounting, disk accounting, and fee calculations.
Connect Accounting
Connect accounting enables you to determine the following:
4 The length of time a user was logged in
443
4 How the tty lines are being used
4 The number of reboots on your system
4 The frequency with which the accounting software was turned off and on
To provide this information, the system stores records of time adjustments, boot
times, times the accounting software was turned off and on, changes in run levels,
the creation of user processes (login processes and init processes), and the deaths
of processes. These records (produced from the output of system programs such as
date, init, login, ttymon, and acctwtmp) are stored in the /var/adm/wtmp file.
Entries in the wtmp file may contain the following information: a user’s login name,
a device name, a process ID, the type of entry, and a time stamp denoting when the
entry was made.
Process Accounting
Process accounting enables you to keep track of the following data about each
process run on your system:
4 User and group IDs of those using the process
4 Beginning and elapsed times of the process
4 CPU time for the process (user time and system time)
4 Amount of memory used
4 Commands run
4 The tty controlling the process
Every time a process dies, the exit program collects this data and writes it to
/var/adm/pacct.
Disk Accounting
Disk accounting enables you to gather and format the following data about the files
each user has on disks:
4 Name and ID of the user
4 Number of blocks used by the user’s files
This data is collected by the shell script /usr/lib/acct/dodisk at intervals
determined by the entry you add to the /var/spool/cron/crontabs/root file.
In turn, dodisk invokes the commands acctdusg and diskusg, which gather disk
usage by login.
See “How to Set Up System Accounting” on page 434 for more information about
setting up dodisk.
The diskusg command may overcharge for files that are written in random access
fashion, which may create holes in the files. This is because diskusg does not read
the indirect blocks of a file when determining its size. Rather, diskusg determines
the size of a file by looking at the di_size value of the inode.
Changes date
Reboots acctwtmp
turnacct switch
(creates a new file
when the old one
reaches 500 blocks)
3. The turnacct program, invoked with the −on option, begins process accounting.
Specifically, turnacct executes the accton program with the /var/adm/pacct
argument.
4. The remove shell script “cleans up” the saved pacct and wtmp files left in the
sum directory by runacct.
5. The login and init programs record connect sessions by writing records into
/var/adm/wtmp. Any date changes (using date with an argument) are also
written to /var/adm/wtmp. Reboots and shutdowns using acctwtmp are also
recorded in /var/adm/wtmp.
6. When a process ends, the kernel writes one record per process, using acct.h
format, in the /var/adm/pacct file.
Every hour, cron executes the ckpacct program to check the size of
/var/adm/pacct. If the file grows past 500 blocks (default), the turnacct
switch is executed. (The program moves the pacct file and creates a new one.)
The advantage of having several smaller pacct files becomes apparent when
trying to restart runacct if a failure occurs when processing these records.
7. runacct is executed by cron each night. runacct processes the accounting
files: /var/adm/pacctn, /var/adm/wtmp, /var/adm/fee, and
/var/adm/acct/nite/disktacct, to produce command summaries and usage
summaries by login.
8. The /usr/lib/acct/prdaily program is executed on a daily basis by
runacct to write the daily accounting information collected by runacct (in
ASCII format) in /var/adm/acct/sum/[Link].
Accounting Reports
This section describes the various reports generated by the accounting software.
Daily Usage Report Indicates usage of system resources by users (listed in order
of UID).
Last Login Shows the last time each user logged in (arranged in
chronological order).
The from and to lines specify the time period reflected in the report—the period
from the time the last accounting report was generated until the time the current
accounting report was generated. It is followed by a log of system reboots,
shutdowns, power failure recoveries, and any other record dumped into
/var/adm/wtmp by the acctwtmp program. For more information, see acct(1M).
The second part of the report is a breakdown of line utilization. The TOTAL
DURATION tells how long the system was in multiuser state (accessible through the
terminal lines). The columns are described in Table 23–3.
Column Description
MINUTES The total number of minutes that the line was in use during the
accounting period.
Column Description
PERCENT The total number of MINUTES the line was in use, divided into the
TOTAL DURATION.
# SESS The number of times this port was accessed for a login session.
# OFF This column reflects the number of times a user logs out and any
interrupts that occur on that line. Generally, interrupts occur on a
port when ttymon is first invoked after the system is brought to
multiuser state. If the # OFF exceeds the # ON by a large factor, the
multiplexer, modem, or cable is probably going bad, or there is a bad
connection somewhere. The most common cause of this is an
unconnected cable dangling from the multiplexer.
During real time, you should monitor /var/adm/wtmp because it is the file from
which the connect accounting is geared. If the wtmp file grows rapidly, execute
acctcon -l file < /var/adm/wtmp to see which tty line is the noisiest. If
interruption is occurring frequently, general system performance will be affected.
Additionally, wtmp may become corrupted. To correct this, see “How to Fix a wtmp
File” on page 438.
(continued)
The data provided in the daily usage report is described in Table 23–4.
Column Description
LOGIN NAME Login name of the user. Identifies a user who has multiple login
names.
CPU-MINS Amount of time, in minutes, that the user’s process used the
central processing unit. Divided into PRIME and NPRIME
(non-prime) utilization. The accounting system’s version of this
data is located in the /etc/acct/holidays file.
CONNECT-MINS Amount of time a user was logged into the system, or “real time.”
Divided into PRIME and NPRIME use. If these numbers are high
while the # OF PROCS is low, you can conclude that the user logs
in first thing in the morning and hardly touches the terminal the
rest of the day.
DISK BLOCKS Output from the acctdusg program, which runs and merges
disk accounting programs and total accounting record
(daytacct). (For accounting purposes, a block is 512 bytes.)
# DISK SAMPLES Number of times disk accounting was run to obtain the average
number of DISK BLOCKS.
FEE Often unused field that represents the total accumulation of units
charged against the user by chargefee.
TOTALS 1067 2730.99 2.01 1649.38 1361.41 0.00 0.00 6253571 2305
The data provided, by column, in the daily command summary is described in Table
23–5.
Column Description
TOTAL CPU-MIN: Total processing time this program has accumulated during
prime time.
MEAN CPU-MIN Mean derived between the NUMBER CMDS and TOTAL
CPU-MIN.
HOG FACTOR Total CPU time divided by elapsed time. Shows the ratio of
system availability to system use, providing a relative
measure of total available CPU time consumed by the
process during its execution.
CHARS TRNSFD Total count of the number of characters pushed around by the
read and write system calls. May be negative due to overflow.
BLOCKS READ Total count of the physical block reads and writes that a
process performed.
TOTALS 771 483.70 0.94 8984.09 515.12 0.00 0.00 2248299 179
See “Daily Command Summary ” on page 451 for a description of the data.
Option Description
Read the files backward, showing latest commands first. (This has no
−b
effect if reading standard input.)
Print the fork/exec flag and system exit status columns. (The
−f
output is an octal number.)
Instead of mean memory size, show the hog factor, which is the
−h
fraction of total available CPU time consumed by the process during
its execution. Hog factor = total_CPU_time/elapsed_time.
Option Description
Show only processes with total CPU time (system plus user)
−C sec
exceeding sec seconds.
Show only processes that exceed factor, where factor is the “hog
−H factor
factor” (see the −h option).
Show only processes with CPU system time exceeding sec seconds.
−O sec
Option Description
The runacct shell script takes care not to damage files if errors occur. A series of
protection mechanisms are used that attempt to recognize an error, provide
intelligent diagnostics, and complete processing in such a way that runacct can be
restarted with minimal intervention. It records its progress by writing descriptive
messages into the file active. (Files used by runacct are assumed to be in the
/var/adm/acct/nite directory, unless otherwise noted.) All diagnostic output
during the execution of runacct is written into fd2log.
When runacct is invoked, it creates the files lock and lock1. These files are used
to prevent simultaneous execution of runacct. The runacct program prints an
error message if these files exist when it is invoked. The lastdate file contains the
month and day runacct was last invoked, and is used to prevent more than one
execution per day. If runacct detects an error, a message is written to the console,
mail is sent to root and adm, locks may be removed, diagnostic files are saved, and
execution is ended. For instructions on how to start runacct again, see “How to
Restart runacct” on page 440.
State Description
WTMPFIX The wtmpfix program checks the [Link] file in the nite
directory for accuracy. Because some date changes will cause
acctcon to fail, wtmpfix attempts to adjust the time stamps in the
wtmp file if a record of a date change appears. It also deletes any
corrupted entries from the wtmp file. The fixed version of
[Link] is written to tmpwtmp.
MERGE The MERGE program merges the process accounting records with the
connect accounting records to form daytacct.
FEES The MERGE program merges ASCII tacct records from the fee file
into daytacct.
DISK If the dodisk procedure has been run, producing the disktacct
file, the DISK program merges the file into daytacct and moves
disktacct to /tmp/[Link].
State Description
CMS The acctcms program is run several times. acctcms is first run to
generate the command summary using the Spacctn files and write
it to sum/daycms. The acctcms program is then run to merge
sum/daycms with the cumulative command summary file sum/cms.
Finally, acctcms is run to produce the ASCII command summary
files, nite/daycms and nite/cms, from the sum/daycms and
sum/cms files, respectively. The lastlogin program is used to
create the /var/adm/acct/sum/loginlog log file, the report of
when each user last logged in. (If runacct is run after midnight, the
dates showing the time last logged in by some users will be incorrect
by one day.)
CLEANUP Cleans up temporary files, runs prdaily and saves its output in
sum/[Link], removes the locks, then exits.
Caution - When restarting runacct in the CLEANUP state, remove the last ptacct
file because it will not be complete.
Accounting Files
The /var/adm directory structure contains the active data collection files and is
owned by the adm login (currently user ID of 4).
File Description
File Description
The /var/adm/acct directory contains the nite, sum, and fiscal directories,
which contain the actual data collection files. For example, the nite directory
contains files that are reused daily by the runacct procedure. A brief summary of
the files in the /var/adm/acct/nite directory follows.
File Description
active Used by runacct to record progress and print warning and error
messages
File Description
reboots Beginning and ending dates from wtmp and a listing of reboots
The sum directory contains the cumulative summary files updated by runacct and
used by monacct. A brief summary of the files in the /var/adm/acct/sum
directory is in Table 23–10.
File Description
cms Total command summary file for current fiscal period in internal
summary format
daycms Command summary file for the day’s usage in internal summary
format
loginlog Record of last date each user logged on; created by lastlogin and
used in the prdaily program
File Description
The fiscal directory contains periodic summary files created by monacct. A brief
description of the files in the /var/adm/acct/fiscal directory is in Table 23–11.
File Description
cmsn Total command summary file for fiscal period n in internal summary
format
File Description
nite/daytacct This file is the total accounting file for the day in tacct.h format.
sum/daycms runacct calls acctcms to process the data about the commands
used during the day. This information is stored in /var/adm/
acct/sum/daycms. It contains the daily command summary. The
ASCII version of this file is /var/adm/acct/nite/daycms.
sum/loginlog runacct calls lastlogin to update the last date logged in for
the logins in /var/adm/acct/sum/loginlog. lastlogin also
removes from this file logins that are no longer valid.
sum/[Link] Each execution of runacct saves a copy of the daily report that
was printed by prdaily.
This part provides instructions for managing system performance. This part contains
these chapters.
465
The pgrep and pkill Commands
The pgrep and pkill commands replace the combination of the ps, grep, egrep,
awk, and kill commands that were used to manage processes in previous Solaris
releases.
The pgrep command looks at the active processes on the system and displays the
process IDs of the processes whose attributes match the specified criteria on the
command line.
The pkill command works the same way as the pgrep command except that each
matching process ID is signaled by kill(2) instead of having the process ID
displayed.
Highlights of the command usage are:
4 Processes can be matched by their real or effective user IDs, group IDs, or their
parent process ID or process group ID, etc.
4 Each process ID is displayed as a decimal value and is separated from the next
process ID by a new line. You can override the new line display between each
process by specifying your own deliminator with the −d option.
4 Multiple options can be specified on one command line by separating each one
with a comma.
4 Defunct processes are never matched by either the pgrep or pkill commands.
4 The current pgrep or pkill process will never consider itself a potential match.
4 You can use pkill -signal to specify a signal value, such as HUP (1) or KILL
(9), as either the symbolic or numeric value. If you specify a signal value, it must
be the first option on the command line. The SIGTERM signal is sent by default.
Using the −u option prevents you from accidently terminating a process called
dtmail owned by another user, if you executed the pkill command as superuser.
This example terminates the most recently created shelltool process owned by the
user pmorph:
This example uses the pwdx command, one of the proc(1) tools, as input to the
pgrep command to display the current working directory of the user rimmer’s Korn
shells:
Term Description
Application thread A series of instructions with a separate stack that can execute
independently in a user’s address space. They can be
multiplexed on top of LWPs.
Structure Description
proc Contains information that pertains to the whole process and has
to be in main memory all the time.
Main Memory
(non-swappable )
user LWP
(user structure) (klwp structure)
swappable
Figure 24–1 Process Structures
Most process resources are accessible to all the threads in the process. Almost all
process virtual memory is shared. A change in shared data by one thread is available
to the other threads in the process.
Another feature enables the control of process groups over processor sets. Using
processor sets means process groups can bind to a group of processors rather than to
just a single processor. The /usr/sbin/psrset command gives a system
administrator control over the creation and management of processor sets. See
psrset(1M) for more information.
See Chapter 25 for more information about commands for managing processes.
In these commands, pid is a process identification number. You can obtain this
number by using the ps -ef command.
Chapter 25 describes how to use the process tool commands to perform selected
system administration tasks, such as displaying details about processes, and starting
3. Verify the mounted file system has forced direct I/O enabled.
# mount
.
.
.
/export/home on /dev/dsk/c0t3d0s7 forcedirectio/setuid/read/write/
largefiles on Tue Jun 16 [Link] 1998
Swap Space
Swap areas are really file systems used for swapping. Swap areas should be sized
based on the requirements of your applications. Check with your vendor to identify
application requirements.
Table 24–5 describes the formula used to size default swap areas by the Solaris
installation program. These default swap sizes are a good place to start if you are not
sure how to size your swap areas.
If Your Physical Memory Size Is ... Your Default Swap Size Is ...
Table 24–7 lists the default settings for kernel parameters affected by the value
assigned to maxusers.
See Chapter 28 for a description of the kernel parameters and how to change the
default values.
Monitoring Tools
The Solaris 7 system software provides several tools to help you keep track of how
your system is performing. These include:
Solstice System Monitor Collect system activity data on Solstice SyMON 1.5
(SyMON) UltraTM EnterpriseTM 3000, 4000, User’s Guide
5000, and 6000 systems
This chapter describes the procedures for managing system processes. This is a list of
the step-by-step instructions in this chapter.
4 “How to List Processes” on page 483
4 “How to Display Information About Processes” on page 485
4 “How to Control Processes” on page 487
4 “How to Kill a Process” on page 489
4 “How to Display Basic Information About Process Classes” on page 490
4 “How to Display the Global Priority of a Process” on page 491
4 “How to Designate a Process Priority” on page 491
4 “How to Change Scheduling Parameters of a Timeshare Process” on page 492
4 “How to Change the Class of a Process” on page 493
4 “How to Change the Priority of a Process” on page 495
The ps Command
481
The ps command enables you to check the status of active processes on a system, as
well as display technical information about the processes. This data is useful for such
administrative tasks as determining how to set process priorities.
Depending on which options you use, ps reports the following information:
4 Current status of the process
4 Process ID
4 Parent process ID
4 User ID
4 Scheduling class
4 Priority
4 Address of the process
4 Memory used
4 CPU time used
Table 25–1 describes some of the fields reported by the ps command. The fields
displayed depend on which option you choose. See ps(1) for a description of all
available options.
Field Description
Field Description
WCHAN The address of an event or lock for which the process is sleeping.
STIME The starting time of the process (in hours, minutes, and
seconds).
TTY The terminal from which the process (or its parent) was started.
A question mark indicates there is no controlling terminal.
TIME The total amount of CPU time used by the process since it
began.
$ ps [-ef]
Example—Listing Processes
The following example shows output from the ps command when no options are
used.
$ ps
PID TTY TIME COMD
1664 pts/4 0:06 csh
2081 pts/4 0:00 ps
The following example shows output from ps −ef. This shows that the first process
executed when the system boots is sched (the swapper) followed by the init
process, pageout, and so on.
pcred Credentials
Note - To avoid typing long command names, add the process tool directory to your
PATH variable. This enables you to run process tools by entering only the last part of
each file name (for example, pwdx instead of /usr/proc/bin/pwdx).
# ps -e | grep process
pcommand Process tool command you want to run. Table 25–2 lists these
commands.
191: /
4
# ptree 191
183 /usr/lib/lpsched
5
# pfiles 191
210: /usr/lib/lpsched
Current rlimit: 1024 file descriptors
0: S_IFIFO mode:0000 dev:165,0 ino:83 uid:0 gid:0 size:0
O_RDWR
1: S_IFIFO mode:0000 dev:165,0 ino:83 uid:0 gid:0 size:0
O_RDWR
3: S_IFCHR mode:0666 dev:32,24 ino:34307 uid:0 gid:3 rdev:21,0
O_WRONLY FD_CLOEXEC
4: S_IFDOOR mode:0444 dev:171,0 ino:4124226512 uid:0 gid:0
size:0
O_RDONLY|O_LARGEFILE FD_CLOEXEC door to nscd[200]
5: S_IFREG mode:0664 dev:32,24 ino:311 uid:71 gid:8 size:0
O_WRONLY
The following example shows output from the pwait command, which waits until a
process terminates, then displays information about what happened. The following
$ ps -e | grep cmdtool
273 console 0:01 cmdtool
277 console 0:01 cmdtool
281 console 0:01 cmdtool
$ pwait -v 281
281: terminated, wait status 0x0000
Note - To avoid typing long command names, add the process tool directory to your
PATH variable. This allows you to run process tools by entering only the last part of
each file name (for example, prun instead of /usr/proc/bin/prun).
# ps -e | grep process
# /usr/proc/bin/pcommand PID
pcommand Process tool command you want to run. Table 25–3 lists
these commands.
# ps | grep PID
Example—Controlling Processes
The following example shows how to use process tools to stop and restart Print Tool.
6
# PATH=$PATH:/usr/proc/bin
# export PATH
7
# ps -e | grep print*
264 console 0:03 printtool
8
# pstop 264
9
# prun 264
# ps | grep 264
264 console 0:03 printtool
#
2. (Optional) Use output from the pgrep command to obtain the identification
number of the process you want to display more information about.
$ pgrep process
4. Use the pgrep command to verify that the process has been stopped.
$ priocntl -l
TS (Time Sharing)
Configured TS User Priority Range: -20 through 20
$ ps -ecl
$ ps -ecl
F S UID PID PPID CLS PRI ADDR SZ WCHAN TTY TIME COMD
19 T 0 0 0 SYS 96 f00d05a8 0 ? 0:03 sched
8 S 0 1 0 TS 50 ff0f4678 185 ff0f4848 ? 36:51 init
19 S 0 2 0 SYS 98 ff0f4018 0 f00c645c ? 0:01 pageout
19 S 0 3 0 SYS 60 ff0f5998 0 f00d0c68 ? 241:01 fsflush
8 S 0 269 1 TS 58 ff0f5338 303 ff49837e ? 0:07 sac
8 S 0 204 1 TS 43 ff2f6008 50 ff2f606e console 0:02 sh
-c class Specifies the class within which to run the process. The
default classes are TS (timesharing) or RT (real-time).
-m userlimit Specifies the maximum amount you can raise or lower your
priority, when using the -p option.
-p pri command_name Lets you specify the relative priority in the RT class, for a
real-time thread. For a timesharing process, the -p option lets
you specify the user-supplied priority which ranges from -20
to +20.
Example—Designating a Priority
The following example starts the find command with the highest possible
user-supplied priority.
-m userlimit Specifies the maximum amount you can raise or lower your
priority, when using the -p option.
-i idtype idlist Uses a combination of idtype and idlist to identify the process.
The idtype specifies the type of ID, such as PID or UID.
-c class Specifies the class, TS or RT, to which you are changing the
process.
-i idtype idlist Uses a combination of idtype and idlist to identify the process.
The idtype specifies the type of ID, such as PID or UID.
Note - If, as superuser, you change a user process to the real-time class, the user
cannot subsequently change the real-time scheduling parameters (using
priocntl -s).
Each timesharing process starts with a default nice number, which it inherits from
its parent process. The nice number is shown in the NI column of the ps report.
A user can lower the priority of a process by increasing its user-supplied priority.
But only the superuser can lower a nice number to increase the priority of a
process. This is to prevent users from increasing the priorities of their own processes,
thereby monopolizing a greater share of the CPU.
Nice numbers range between 0 and +40, with 0 representing the highest priority. The
default value is 20. Two versions of the command are available, the standard version,
/usr/bin/nice, and a version that is part of the C shell.
The first and second commands increase the nice number by four units (the
default); and the third command increases the nice by ten units, lowering the
priority of the process.
The following commands raise the priority of the command by lowering the nice
number.
The above commands raise the priority of the command, command_name, by lowering
the nice number. Note that in the second case, the two minus signs are required.
This chapter describes procedures for monitoring system performance by using the
vmstat, iostat, df, and sar commands. This is a list of the step-by-step
instructions in this chapter.
4 “How to Display Virtual Memory Statistics (vmstat)” on page 498
4 “How to Display System Event Information” on page 500
4 “How to Display Swapping Statistics” on page 501
4 “How to Display Cache Flushing Statistics ” on page 502
4 “How to Display Interrupts Per Device” on page 502
4 “How to Display Disk Utilization Information” on page 503
4 “How to Display Extended Disk Statistics” on page 504
4 “How to Display File System Information” on page 506
4 “How to Check File Access (sar)” on page 507
4 “How to Check Buffer Activity (sar)” on page 508
4 “How to Check System Call Statistics (sar)” on page 510
4 “How to Check Disk Activity (sar)” on page 511
4 “How to Check Page-Out and Memory (sar)” on page 513
4 “How to Check Kernel Memory Allocation (sar)” on page 515
4 “How to Check Interprocess Communication (sar)” on page 517
4 “How to Check Page-In Activity (sar)” on page 518
4 “How to Check Queue Activity (sar)” on page 520
4 “How to Check Unused Memory (sar)” on page 521
4 “How to Check CPU Utilization (sar)” on page 522
4 “How to Check System Table Status (sar)” on page 523
497
4 “How to Check Swap Activity (sar)” on page 525
4 “How to Check Terminal Activity (sar)” on page 526
4 “How to Check Overall System Performance (sar)” on page 528
4 “How to Set Up Automatic Data Collection ” on page 531
$ vmstat n
re Pages reclaimed
pi Kbytes paged in
fr Kbytes freed
us User time
sy System time
id Idle time
$ vmstat 5
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr f0 s3 -- -- in sy cs us sy id
0 0 8 28312 668 0 9 2 0 1 0 0 0 1 0 0 10 61 82 1 2 97
0 0 3 31940 248 0 10 20 0 26 0 27 0 4 0 0 53 189 191 6 6 88
0 0 3 32080 288 3 19 49 6 26 0 15 0 9 0 0 75 415 277 6 15 79
0 0 3 32080 256 0 26 20 6 21 0 12 1 6 0 0 163 110 138 1 3 96
0 1 3 32060 256 3 45 52 28 61 0 27 5 12 0 0 195 191 223 7 11 82
0 0 3 32056 260 0 1 0 0 0 0 0 0 0 0 0 4 52 84 0 1 99
$ vmstat -s
0 swap ins
0 swap outs
0 pages swapped in
0 pages swapped out
2560974 total address trans. faults taken
495226 page ins
52459 page outs
1088645 pages paged in
420615 pages paged out
34409 total reclaims
34104 reclaims from free list
0 micro (hat) faults
2560974 minor (as) faults
493981 major faults
450203 copy-on-write faults
609679 zero fill page faults
(continued)
$ vmstat -S
procs memory page disk faults cpu
r b w swap free si so pi po fr de sr f0 s3 -- -- in sy cs us sy id
0 0 0 5604 1860 0 0 2 0 2 0 1 0 0 0 0 36 291 116 4 2 94
Note - The vmstat command truncates the output of both of these fields. Use the
sar command to display a more accurate accounting of swap statistics.
$ vmstat -c
usr ctx rgn seg pag par
0 60714 5 134584 4486560 4718054
It shows the total number of cache flushes since the last boot. The cache types are
described in Table 26–3.
usr User
ctx Context
rgn Region
seg Segment
pag Page
par Partial-page
$ vmstat -i
$ vmstat -i
interrupt total rate
--------------------------------
clock 181871074 100
zsc0 2 0
(continued)
zsc1 6523622 3
cgsixc0 63951 0
lec0 6433537 3
fdc0 13309 0
--------------------------------
Total 194905495 107
$ iostat 5
tty fd0 sd3 nfs1 nfs31 cpu
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
0 1 0 0 410 3 0 29 0 0 9 3 0 47 4 2 0 94
The first line of output shows the statistics since the last boot. Each subsequent line
shows the interval statistics. The default is to show statistics for the terminal (tty),
disks (fd and sd), and CPU (cpu).
Table 26–4 describes the fields in the iostat command output.
Terminal
Disk
CPU
us In user mode
sy In system mode
id Idle
$ iostat 5
tty fd0 sd3 nfs1 nfs31 cpu
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
0 1 0 0 410 3 0 29 0 0 9 3 0 47 4 2 0 94
0 47 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 97
0 16 0 0 0 0 0 0 0 0 0 0 0 0 3 3 0 93
0 16 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 92
0 16 0 0 0 1 0 7 0 0 0 50 2 94 50 5 0 45
0 16 0 0 0 3 1 14 0 0 0 0 0 0 2 3 1 94
0 16 0 0 0 24 4 58 0 0 0 0 0 0 0 2 0 97
0 16 0 0 0 0 0 0 0 0 0 0 0 0 4 3 0 93
0 16 0 0 0 0 0 0 0 0 0 0 0 0 3 3 0 94
0 16 0 0 0 3 1 25 0 0 0 0 0 0 3 3 0 93
0 16 0 0 0 0 0 0 0 0 0 1 0 27 8 4 0 88
This command displays a line of output for each disk. The output fields are
described in Table 26–5.
$ df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t3d0s0 192807 40231 133296 24% /
$ df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t3d0s0 192807 40239 133288 24% /
/dev/dsk/c0t3d0s6 769758 472613 243262 67% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t3d0s7 217191 19341 176131 10% /export/home
/dev/dsk/c0t3d0s5 192807 7785 165742 5% /opt
swap 161256 288 160968 1% /tmp
$ sar -a
SunOS venus 5.7 Generic sun4m 06/17/98
(continued)
[Link] 0 3 0
[Link] 0 3 0
[Link] 0 3 1
[Link] 0 11 7
Average 0 1 0
iget/s The number of requests made for inodes that were not in the
directory name lookup cache (dnlc).
namei/s This is the number of file system path searches per second. If
namei does not find a directory name in the dnlc, it calls iget
to get the inode for either a file or directory. Hence, most igets
are the result of dnlc misses.
dirbk/s This is the number of directory block reads issued per second.
The larger the values reported, the more time the kernel is spending to access user
files. The amount of time reflects how heavily programs and applications are using
the file systems. The -a option is helpful for viewing how disk-dependent an
application is.
$ sar -b
[Link] bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
[Link] 0 0 100 0 0 57 0 0
The buffer activities displayed by the -b option are described in Table 26–8. The most
important entries are the cache hit ratios %rcache and %wcache, which measure the
lread/s Average number of logical reads per second from the buffer
cache
%rcache Fraction of logical reads found in the buffer cache (100% minus
the ratio of bread/s to lread/s)
lwrite/s Average number of logical writes to the buffer cache, per second
$ sar -b
SunOS venus 5.7 Generic sun4m 06/17/98
(continued)
[Link] 0 0 100 0 0 55 0 0
[Link] 0 0 100 0 0 55 0 0
[Link] 0 0 100 0 0 56 0 0
[Link] 0 0 100 0 0 56 0 0
[Link] 0 0 100 0 0 56 0 0
[Link] 0 0 100 0 0 57 0 0
[Link] 0 1 98 0 1 59 0 0
[Link] 0 1 99 0 1 59 0 0
[Link] 0 0 96 0 0 57 0 0
[Link] 0 1 99 0 1 60 0 0
Average 0 0 99 0 0 57 0 0
$ sar -c
[Link] scall/s sread/s swrit/s fork/s exec/s rchar/s wchar/s
[Link] 2071 231 230 0.01 0.00 923483 923298
Table 26–9 describes the following system call categories reported by the -c option.
Typically, reads and writes account for about half of the total system calls,
although the percentage varies greatly with the activities that are being performed by
the system.
scall/s All types of system calls per second (generally about 30 per
second on a busy four- to six-user system)
fork/s fork system calls per second (about 0.5 per second on a four- to
six-user system); this number will increase if shell scripts are
running
$ sar -c
SunOS venus 5.7 Generic sun4m 06/17/98
$ sar -d
[Link] device %busy avque r+w/s blks/s avwait avserv
avque The sum of the average wait time plus the average service time
r+w/s Number of read and write transfers to the device per second
$ sar -d
SunOS venus 5.7 Generic sun4m 06/17/98
(continued)
The following example is from a computer with SCSI integral disks; that is, disks
that use a SCSI interface. The example illustrates data being transferred from one
SCSI hard disk (sd00-0) to another SCSI integral disk (sd00-1).
$ sar -d
SunOS venus 5.7 Generic sun4m 06/17/98
[Link] device %busy avque r+w/s blks/s avwait avserv
[Link] sd00-0 2 1.0 1 3 0.0 17.9
sd00-1 6 1.1 3 5 2.0 23.9
[Link] sd00-0 2 1.0 1 2 0.0 19.6
sd00-1 6 1.1 3 5 0.2 24.3
[Link] sd00-0 3 1.0 1 3 0.3 18.3
sd00-1 7 1.1 3 5 1.3 25.4
[Link] sd00-0 3 1.0 1 3 0.0 17.2
sd00-1 5 1.0 2 5 0.0 21.6
Average sd00-0 2 1.0 1 3 0.1 18.2
sd00-1 6 1.0 3 5 0.9 23.0
$ sar -g
[Link] pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf
[Link] 0.00 0.00 0.00 0.00 0.00
The output displayed by sar -g is a good indicator of whether more memory may
be needed. Use the ps -elf command to show the number of cycles used by the
page daemon. A high number of cycles, combined with high values for pgfree/s
and pgscan/s indicates a memory shortage.
sar -g also shows whether inodes are being recycled too quickly, causing a loss of
reusable pages.
ppgout/s The actual number of pages that are paged-out, per second. (A
single page-out request may involve paging-out multiple pages.)
pgfree/s The number of pages, per second, that are placed on the free list.
pgscan/s The number of pages, per second, scanned by the page daemon.
If this value is high, the page daemon is spending a lot of time
checking for free memory. This implies that more memory may
be needed.
%ufs_ipf The percentage of ufs inodes taken off the free list by iget
that had reusable pages associated with them. These pages are
flushed and cannot be reclaimed by processes. Thus, this is the
percentage of igets with page flushes. A high value indicates
that the free list of inodes is page-bound and the number of
ufs inodes may need to be increased.
$ sar -g
SunOS venus 5.7 Generic sun4m 06/17/98
(continued)
$ sar -k
[Link] sml_mem alloc fail lg_mem alloc fail ovsz_alloc fail
[Link] 1949696 1444668 0 5578752 4254136 0 2826240 0
sml_mem The amount of memory, in bytes, that the KMA has available in
the small memory request pool (a small request is less than 256
bytes)
alloc The amount of memory, in bytes, that the KMA has allocated
from its small memory request pool to small memory requests
fail The number of requests for small amounts of memory that failed
lg_mem The amount of memory, in bytes, that the KMA has available in
the large memory request pool (a large request is from 512 bytes
to 4 Kbytes)
alloc The amount of memory, in bytes, that the KMA has allocated
from its large memory request pool to large memory requests
$ sar -k
SunOS venus 5.7 Generic sun4m 06/17/98
(continued)
$ sar -m
[Link] msg/s sema/s
[Link] 0.00 0.00
These figures will usually be zero (0.00), unless you are running applications that use
messages or semaphores.
The output from the −m option is described in Table 26–13.
$ sar -p
[Link] atch/s pgin/s ppgin/s pflt/s vflt/s slock/s
[Link] 0.00 0.04 0.05 0.38 0.67 0.00
The reported statistics from the −p option are described in Table 26–14.
atch/s The number of page faults, per second, that are satisfied by
reclaiming a page currently in memory (attaches per second).
Instances of this include reclaiming an invalid page from the
free list and sharing a page of text currently being used by
another process (for example, two or more processes accessing
the same program text).
pgin/s The number of times, per second, that file systems receive
page-in requests.
ppgin/s The number of pages paged in, per second. A single page-in
request, such as a soft-lock request (see slock/s), or a large
block size, may involve paging-in multiple pages.
$ sar -p
SunOS venus 5.7 Generic sun4m 06/17/98
(continued)
$ sar -q
[Link] runq-sz %runocc swpq-sz %swpocc
[Link] 1.0 34
Note - The number of LWPs swapped out may greater than zero even if the system
has an abundance of free memory. This happens when a sleeping LWP is swapped
out and has not been awakened (for example, a process or LWP sleeping, waiting for
the keyboard or mouse input).
$ sar -q
SunOS venus 5.7 Generic sun4m 06/17/98
Average 1.0 30
$ sar -r
[Link] freemem freeswap
[Link] 4184 320108
freeswap The number of 512-byte disk blocks available for page swapping.
$ sar -r
SunOS venus 5.7 Generic sun4m 06/17/98
$ sar -u
[Link] %usr %sys %wio %idle
[Link] 67 33 0 0
(The sar command without any options is equivalent to sar -u.) At any given
moment, the processor is either busy or idle. When busy, the processor is in either
user or system mode. When idle, the processor is either waiting for I/O completion
or “sitting still” with no work to do.
Output from the −u option is described in Table 26–17.
%sys Lists the percentage of time that the processor is in system mode
%user Lists the percentage of time that the processor is in user mode
%wio Lists the percentage of time the processor is idle and waiting for
I/O completion
%idle Lists the percentage of time the processor is idle and is not
waiting for I/O
$ sar -u
SunOS venus 5.7 Generic sun4m 06/17/98
Average 59 28 0 13
file-sz The size of the open system file table. The sz is given as 0,
since space is allocated dynamically for the file table.
$ sar -v
SunOS venus 5.7 Generic sun4m 06/17/98
(continued)
$ sar -w
[Link] swpin/s bswin/s swpot/s bswot/s pswch/s
[Link] 0.00 0.0 0.00 0.0 479
$ sar -w
SunOS venus 5.7 Generic sun4m 06/17/98
$ sar -y
[Link] rawch/s canch/s outch/s rcvin/s xmtin/s mdmin/s
[Link] 0 0 0 0 0 0
If you have a lot of terminal I/O, you can use this report to determine if there are
any bad lines. The activities recorded are defined in Table 26–20.
The number of modem interrupts per second (mdmin/s) should be close to zero, and
the receive and transmit interrupts per second (xmtin/s and rcvin/s) should be
less than or equal to the number of incoming or outgoing characters, respectively. If
this is not the case, check for bad lines.
$ sar -y
SunOS venus 5.7 Generic sun4m 06/17/98
(continued)
Average 0 0 2 0 0 0
/usr/lib/sa/sadc [t n] [ofile]
/usr/lib/sa/sa1 [t n]
sar [-aAbcdgkmpqruvwy] [-s time] [-e time] [-i sec] [-f file]
The sar command below samples cumulative activity counters in the operating
system every t seconds, n times. (t should be 5 seconds or greater; otherwise, the
command itself may affect the sample.) You must specify a time interval between
which to take the samples; otherwise, the command operates according to the second
format. The default value of n is 1. The following example takes two samples
separated by 10 seconds. If the -o option is specified, samples are saved in file in
binary format.
$ sar -u 10 2
Option Actions
2. Using the editor of your choice, open the /etc/init.d/perf file, which
contains the sadc start-up instructions. Verify that the following lines are
uncommented:
This version of the sadc command writes a special record that marks the time
when the counters are reset to zero (boot time). The sadc output is put into the
file sadd (where dd is the current date), which acts as the daily system activity
record.
# 0 * * * 0-6 /usr/lib/sa/sa1
# 20,40 8-17 * * 1-5 /usr/lib/sa/sa1
The first entry writes a record to /var/adm/sa/sadd on the hour, every hour,
seven days a week.
The second entry writes a record to /var/adm/sa/sadd twice each hour during
peak working hours: at 20 minutes and 40 minutes past the hour, from 8 a.m. to 5
p.m., Monday through Friday.
Thus, these two crontab entries cause a record to be written to
/var/adm/sa/sadd every 20 minutes from 8 a.m. to 5 p.m., Monday through
Friday, and every hour on the hour otherwise. You can change these defaults to
meet your needs.
This chapter describes the how to monitor network performance. This is a list of the
step-by-step instructions in this chapter.
4 “How to Check the Response of Hosts on the Network” on page 534
4 “How to Send Packets to Hosts on the Network” on page 535
4 “How to Capture Packets From the Network” on page 536
4 “How to Check the Network Status” on page 536
4 “How to Display NFS Server and Client Statistics” on page 539
spray Test the reliability of your packet sizes. It can tell you whether
packets are being delayed or dropped.
snoop Capture packets from the network and trace the calls from each
client to each server.
533
TABLE 27–1 Network Monitoring Commands (continued)
netstat Display network status, including state of the interfaces used for
TCP/IP traffic, the IP routing table, and the per-protocol
statistics for UDP, TCP, ICMP, and IGMP.
$ ping hostname
If you suspect a physical problem, you can use ping to find the response time of
several hosts on the network. If the response from one host is not what you would
expect, you can investigate that host. Physical problems could be caused by:
$ ping elvis
elvis is alive
With the -s option, ping sends one datagram per second to a host. It then prints
each response and the time it took for the round trip. For example:
# snoop
Displays statistics for the UDP, TCP, ICMP, and IGMP protocols.
−s
$ netstat -i
Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
lo0 8232 software localhost 1280 0 1280 0 0 0
le0 1500 loopback venus 1628480 0 347070 16 39354 0
This display shows how many packets a machine has transmitted and received on
each interface. A machine with active network traffic should show both Ipkts and
Opkts continually increasing.
Calculate the network collisions rate by dividing the number of collision counts
(Collis) by the number of out packets (Opkts). In the above example, the collision
Calculate the input packet error rate by dividing the number of input errors by the
total number of input packets (Ierrs/Ipkts). The output packet error rate is the
number of output errors divided by the total number of output packets
(Oerrs/Opkts). If the input error rate is high (over 0.25 percent), the host may be
dropping packets.
The following example shows output from the netstat -s command, which
displays the per-protocol statistics for the UDP, TCP, ICMP, and IGMP protocols.
UDP
udpInDatagrams =196543 udpInErrors = 0
udpOutDatagrams =187820
TCP
tcpRtoAlgorithm = 4 tcpRtoMin = 200
tcpRtoMax = 60000 tcpMaxConn = -1
tcpActiveOpens = 26952 tcpPassiveOpens = 420
tcpAttemptFails = 1133 tcpEstabResets = 9
tcpCurrEstab = 31 tcpOutSegs =3957636
tcpOutDataSegs =2731494 tcpOutDataBytes =1865269594
tcpRetransSegs = 36186 tcpRetransBytes =3762520
tcpOutAck =1225849 tcpOutAckDelayed =165044
tcpOutUrg = 7 tcpOutWinUpdate = 315
tcpOutWinProbe = 0 tcpOutControl = 56588
tcpOutRsts = 803 tcpOutFastRetrans = 741
tcpInSegs =4587678
tcpInAckSegs =2087448 tcpInAckBytes =1865292802
tcpInDupAck =109461 tcpInAckUnsent = 0
tcpInInorderSegs =3877639 tcpInInorderBytes =-598404107
tcpInUnorderSegs = 14756 tcpInUnorderBytes =17985602
tcpInDupSegs = 34 tcpInDupBytes = 32759
tcpInPartDupSegs = 212 tcpInPartDupBytes =134800
tcpInPastWinSegs = 0 tcpInPastWinBytes = 0
tcpInWinProbe = 456 tcpInWinUpdate = 0
tcpInClosed = 99 tcpRttNoUpdate = 6862
tcpRttUpdate =435097 tcpTimRetrans = 15065
tcpTimRetransDrop = 67 tcpTimKeepalive = 763
tcpTimKeepaliveProbe= 1 tcpTimKeepaliveDrop = 0
IP
ipForwarding = 2 ipDefaultTTL = 255
ipInReceives =11757234 ipInHdrErrors = 0
ipInAddrErrors = 0 ipInCksumErrs = 0
ipForwDatagrams = 0 ipForwProhibits = 0
ipInUnknownProtos = 0 ipInDiscards = 0
ipInDelivers =4784901 ipOutRequests =4195180
ipOutDiscards = 0 ipOutNoRoutes = 0
ipReasmTimeout = 60 ipReasmReqds = 8723
ipReasmOKs = 7565 ipReasmFails = 1158
ipReasmDuplicates = 7 ipReasmPartDups = 0
ipFragOKs = 19938 ipFragFails = 0
ipFragCreates =116953 ipRoutingDiscards = 0
(continued)
ICMP
icmpInMsgs =490338 icmpInErrors = 0
icmpInCksumErrs = 0 icmpInUnknowns = 0
icmpInDestUnreachs = 618 icmpInTimeExcds = 314
icmpInParmProbs = 0 icmpInSrcQuenchs = 0
icmpInRedirects = 313 icmpInBadRedirects = 5
icmpInEchos = 477 icmpInEchoReps = 20
icmpInTimestamps = 0 icmpInTimestampReps = 0
icmpInAddrMasks = 0 icmpInAddrMaskReps = 0
icmpInFragNeeded = 0 icmpOutMsgs = 827
icmpOutDrops = 103 icmpOutErrors = 0
icmpOutDestUnreachs = 94 icmpOutTimeExcds = 256
icmpOutParmProbs = 0 icmpOutSrcQuenchs = 0
icmpOutRedirects = 0 icmpOutEchos = 0
icmpOutEchoReps = 477 icmpOutTimestamps = 0
icmpOutTimestampReps= 0 icmpOutAddrMasks = 0
icmpOutAddrMaskReps = 0 icmpOutFragNeeded = 0
icmpInOverflows = 0
IGMP:
0 messages received
0 messages received with too few bytes
0 messages received with bad checksum
0 membership queries received
0 membership queries received with invalid field(s)
0 membership reports received
0 membership reports received with invalid field(s)
0 membership reports received for groups to which we belong
0 membership reports sent
The following example shows output from the netstat -r command, which
displays the IP routing table.
Routing Table:
Destination Gateway Flags Ref Use Interface
------------------ -------------------- ----- ----- ------ ---------
localhost localhost UH 0 2817 lo0
earth-bb pluto U 3 14293 le0
[Link] pluto U 3 0 le0
default mars-gate UG 0 14142
$ nfsstat -c
Client rpc:
Connection oriented:
calls badcalls badxids timeouts newcreds badverfs timers
1595799 1511 59 297 0 0 0
cantconn nomem interrupts
1198 0 7
Connectionless:
calls badcalls retrans badxids timeouts newcreds badverfs
80785 3135 25029 193 9543 0 0
timers nomem cantsend
17399 0 0
Client nfs:
calls badcalls clgets cltoomany
1640097 3112 1640097 0
Version 2: (46366 calls)
null getattr setattr root lookup readlink read
0 0% 6589 14% 2202 4% 0 0% 11506 24% 0 0% 7654 16%
wrcache write create remove rename link symlink
0 0% 13297 28% 1081 2% 0 0% 0 0% 0 0% 0 0%
mkdir rmdir readdir statfs
24 0% 0 0% 906 1% 3107 6%
Version 3: (1585571 calls)
null getattr setattr lookup access readlink read
0 0% 508406 32% 10209 0% 263441 16% 400845 25% 3065 0% 117959 7%
write create mkdir symlink mknod remove rmdir
69201 4% 7615 0% 42 0% 16 0% 0 0% 7875 0% 51 0%
rename link readdir readdir+ fsstat fsinfo pathconf
(continued)
Client nfs_acl:
Version 2: (3105 calls)
null getacl setacl getattr access
0 0% 0 0% 0 0% 3105 100% 0 0%
Version 3: (5055 calls)
null getacl setacl
0 0% 5055 100% 0 0%
Field Description
retrans The total number of retransmissions. For this client, the number
of retransmissions is less than 1 percent (10 time-outs out of
6888 calls). These may be caused by temporary failures. Higher
rates may indicate a problem.
wait The number of times a call had to wait because no client handle
was available.
timers The number of times the time-out value was greater than or
equal to the specified time-out value for a call.
Field Description
If you suspect that the hardware components of your network are creating problems,
you need to look carefully at the cabling and connectors.
This chapter describes the procedures for tuning kernel parameters. This is a list of
the step-by-step instructions in this chapter.
4 “Listing the Kernel Parameters” on page 543
4 “How to Change the Value of a Kernel Parameter” on page 544
4 “How to Set the Value of a Kernel Module Variable” on page 544
4 “How to Tune the Interprocess Communication Parameters” on page 548
4 “How to Tune Memory Management Parameters” on page 549
4 “How to Tune Miscellaneous Parameters” on page 550
# sysdef -i
* Hostid
53001b80
*
* sun4m Configuration
* Devices
packages (driver not attached)
disk-label (driver not attached)
deblocker (driver not attached)
obp-tftp (driver not attached)
.
.
.
(continued)
543
(Continuation)
options, instance #0
aliases (driver not attached)
openprom (driver not attached)
iommu, instance #0
sbus, instance #0
espdma, instance #0
esp, instance #0
sd (driver not attached)
st (driver not attached)
.
.
.
set parameter=value
The following line in the /etc/system file sets the value of the max_nprocs to
500 parameter.
set max_nprocs=500
set module_name:variable=value
UFS Parameters
Table 28–1 describes the tunable UFS parameters.
Parameter Description
Message Queue
Semaphore Facility
Note: The total number of undo structures allocated in the system is:
seminfo_semmnu * seminfo_semume
Shared Memory
2. Add a line to the /etc/system file using the syntax described in Table 28–4.
Note - Since the Solaris 2.4 release, the tune_t_gpgslo parameter has been
replaced by a more complicated criteria for swapping based on the number of
runnable threads.
set tune:variable=value
set parameter=value
set pt_cnt=200
This chapter contains reference information for the SunOS 5.7 scheduler. This is a list
of the overview information in this chapter.
4 “About the Scheduler” on page 551
4 “Scheduler Class Policies” on page 552
4 “Scheduler Configuration” on page 554
Note - The fundamental scheduling entity is the kernel thread. For single-threaded
processes, scheduling the kernel thread is synonymous with process scheduling.
The SunOS 5.7 scheduler controls the order in which processes run and the amount
of CPU time each process may use before another process can run.
The scheduler allocates CPU time to processes according to the scheduling policies
defined for each scheduling class. Associated with each scheduling class is a set of
priority levels or queues. Ready-to-run processes are moved among these queues.
Within a class, you can view these queues as a contiguous set of priority levels.
These priority levels are mapped into a set of global scheduling priorities.
551
The global priority of a process determines when it runs—the scheduler runs the
process with the highest global priority that is ready to run. Processes with
numerically higher priorities run first, and processes with the same priority run
using a round robin scheduling policy.
Once the scheduler assigns a process to a CPU, the process runs until one of the
following events occur:
4 The process uses up its time slice.
4 The process blocks waiting for an event (for example, I/O) or a suspended lock.
4 The process is preempted by a higher-priority process.
By default, all real-time processes have higher priorities than any system process,
and all system processes have higher priorities than any timesharing process.
A process inherits its scheduler parameters from its parent process, including its
scheduler class and its priority within that class. A process changes class only from a
user request (with the priocntl command or system call). The system manages the
priority of a process based on user requests and the policy associated with the
scheduling class of the process.
Scheduler Activation
Scheduler activations provide kernel scheduling support for applications with
particular scheduling needs, such as database and multithreaded applications.
Multithreaded support changes for scheduler activation are implemented as a private
interface between the kernel and the libthread library, without changing the
libthread interface. Additionally, applications may give scheduling hints to the
kernel to improve performance. See schedctl_init(3X) for more information.
The user process with the highest real-time priority always gets the CPU as soon as
it can be run, even if other processes are ready to run. An application can be written
so that its real-time processes have a guaranteed response time from the operating
system.
The real-time policy gives higher-priority processes smaller time slices, by default.
The higher priorities are allocated to real-time processes that are driven by external
events. The operating system must be able to respond instantly to I/O. The
lower-priority real-time processes are those that need more computation time. If a
process with the highest priority uses up its time slice, it runs again because there is
no process with a higher priority to pre-empt it.
Scheduler Configuration
This section describes the parameters and tables that control the scheduler
configuration. A basic assumption is that your work load is reasonable for your
system resources, such as CPU, memory, and I/O. If your resources are inadequate
to meet the demands, reconfiguring the scheduler won’t help.
You can display or change (fine tune) the scheduler parameters in a running system
for both the timesharing and real-time classes by using the dispadmin command.
Changes made by the dispadmin command do not survive a reboot. To make
permanent changes in scheduler configuration, you must change the scheduler
parameter tables in the appropriate loadable module: TS_DPTBL or RT_DPTBL
First 159
. Real-Time
100
99
. System
60
59
. Timesharing
Last 0
Tunable Parameters
This section describes the tunable parameters that control scheduler configuration. To
change any of these kernel parameters, enter a line in the /etc/system file with the
format:
set parameter=value
This command would put the command into execution at a real-time priority of 120.
Timesharing Policy
The following parameter is specified in the TS loadable module, which controls the
timesharing policy:
4 ts_maxupri
ts_maxupri specifies the range within which users may adjust the priority of a
timesharing process, using the priocntl(l) command or the priocntl(2)
system call. The valid range for the user-supplied priority in the timesharing class
is from +ts_maxupri to -ts_maxupri. The default value of ts_maxupri is 20
(which sets the range between +20 and -20, emulating the behavior of the older,
less general scheduler interfaces, nice and setpriority.)
The value of ts_maxupri is independent of the configured number of global
timesharing priorities. In the default configuration, there are 0-59 timesharing
priorities, but users may adjust their priorities only within a range of -20 to +20,
relative to the system-calculated priority of the process. See “How to Designate a
Process Priority” on page 491 for more information.
To change the value of this parameter, enter a line in /etc/system with the
format:
set TS:ts_maxupri=value
These tables define scheduling policy by setting the scheduling parameters to use for
real-time and timesharing processes. The parameters specify how much CPU time
processes get at different priority levels.
Default time slices for the priority levels are specified in the ts_dptbl and
rt_dptbl configuration tables, which are defined in the TS_DPTBL and RT_DPTBL
loadable modules. These modules are automatically loaded from the
/kernel/sched directory into the kernel as needed.
The time slices are specified in units (quanta) with a resolution defined by a
“resolution” line. The default resolution is 1000, which means the time quantum
values are interpreted as milliseconds. This is derived from the reciprocal of the
specified resolution in seconds. The quanta are rounded up to the next integral
multiple of the system clock’s resolution in clock ticks. (The system clock ticks HZ
times per second, where HZ is a hardware-dependent constant defined in the
param.h header file.) For example, if the clock tick is 10 milliseconds, 42 quanta is
rounded up to 50 milliseconds.
$ dispadmin -c TS -g
# Time Sharing Dispatcher Configuration
RES=1000
(continued)
40 34 55 0 55 # 44
40 35 56 0 56 # 45
40 36 57 0 57 # 46
40 37 58 0 58 # 47
40 38 58 0 58 # 48
40 39 58 0 59 # 49
40 40 58 0 59 # 50
40 41 58 0 59 # 51
40 42 58 0 59 # 52
40 43 58 0 59 # 53
40 44 58 0 59 # 54
40 45 58 0 59 # 55
40 46 58 0 59 # 56
40 47 58 0 59 # 57
40 48 58 0 59 # 58
20 49 59 32000 59 # 59
$
ts_tqexp Determines the new process priority for a process whose time
slice has expired. If a process uses its whole time slice without
(expired level) sleeping, the scheduler changes its priority to the level indicated
in the ts_tqexp column. The expired level is lower than the
prior level. For example, a process with a priority of 30 that
used up its time slice (80 milliseconds) will get a new priority of
20.
ts_lwait Contains the new priority for a ready-to-run process that has
exceeded the maximum wait time (ts_maxwait) without
(wait level) getting its full time slice.
PRIORITY LEVEL Contains global priorities. Processes put in queues at the higher
priority levels run first. The global priorities run from a high of
59 to a low of 0. This is the only column in the table that is not
tunable.
$ dispadmin -c RT -g
# Real Time Dispatcher Configuration
RES=1000
(continued)
800 # 15
800 # 16
800 # 17
800 # 18
800 # 19
600 # 20
600 # 21
600 # 22
600 # 23
600 # 24
600 # 25
600 # 26
600 # 27
600 # 28
600 # 29
400 # 30
400 # 31
400 # 32
400 # 33
400 # 34
400 # 35
400 # 36
400 # 37
400 # 38
400 # 39
200 # 40
200 # 41
200 # 42
200 # 43
200 # 44
200 # 45
200 # 46
200 # 47
200 # 48
200 # 49
100 # 50
100 # 51
100 # 52
100 # 53
100 # 54
100 # 55
100 # 56
100 # 57
100 # 58
100 # 59
$
rt_qntm Describes the default time slice (in milliseconds) a process with
this priority (rt_glbpri) may run before the scheduler gives
another process a chance. The time slice for a real-time process
can be specified with the priocntl -t command.
Note - The kernel assumes that it has at least 40 priorities in ts_kmdpris. It panics
if it does not.
This part provides instructions for troubleshooting Solaris software problems. This
part contains these chapters.
567
4 Chapter 36
ok sync
See Chapter 32 if the system fails to reboot successfully after a system crash.
3. Attempt to save the crash information written onto the swap area by running the
savecore command.
# savecore
Question Description
Can you reproduce the problem? This is important because a reproducible test case is
often essential for debugging really hard problems. By
reproducing the problem, the service provider can
build kernels with special instrumentation to trigger,
diagnose, and fix the bug.
Are you using any third-party drivers? Drivers run in the same address space as the kernel,
with all the same privileges, so they can cause system
crashes if they have bugs.
What was the system doing just before If the system was doing anything unusual like
it crashed? running a new stress test or experiencing
higher-than-usual load, that may have led to the crash.
Were there any unusual console Sometimes the system will show signs of distress
messages right before the crash? before it actually crashes; this information is often
useful.
Did you add any tuning parameters to Sometimes tuning parameters, such as increasing
the /etc/system file? shared memory segments so that the system tries to
allocate more than it has, can cause the system to
crash.
Did the problem start recently? If so, did the onset of problems coincide with any
changes to the system, for example, new drivers, new
software, different workload, CPU upgrade, or a
memory upgrade.
where error message is one of the panic error messages described in crash(1M).
Less frequently, this message may be displayed instead of the panic message:
Watchdog reset !
The error logging daemon, syslogd, automatically records various system warnings
and errors in message files. By default, many of these system messages are displayed
$ dmesg
$ more /var/adm/messages
$ dmesg
SunOS Release 5.7 Version Generic [UNIX(R) System V Release 4.0]
Copyright (c) 1983-1998, Sun Microsystems, Inc.
vac: enabled in write through mode
cpu0: FMI,MB86904 (mid 0 impl 0x0 ver 0x4 clock 110 MHz)
mem = 57344K (0x3800000)
avail mem = 53268480
Ethernet address = [Link]
root nexus = SUNW,SPARCstation-5
iommu0 at root: obio 0x10000000
sbus0 at iommu0: obio 0x10001000
(continued)
The following example shows sample lines from a default /etc/[Link] file.
The most common error condition sources are shown in Table 30–2. The most
common priorities are shown in Table 30–3 in order of severity.
Source Description
auth Authentication
lp Spooling system
Note - Starting in the Solaris 2.6 release, the number of syslog facilities that can be
activated in the /etc/[Link] file is unlimited. In previous releases, the
number of facilities was limited to 20.
Priority Description
Priority Description
2. Using the editor of your choice, edit the /etc/[Link] file, adding or
changing message sources, priorities, and message locations according to the
syntax described in [Link](4) .
[Link] /dev/console
[Link] /var/adm/messages
[Link] ‘root, operator’
[Link] *
575
4 Dump data is now stored in compressed format on the dump device. Kernel crash
dump images can be as big as 4 Gbytes or more. Compressing the data means
faster dumping and less disk space needed for the dump device.
4 Saving crash dump files is run in the background when a dedicated dump
device—not the swap area—is part of the dump configuration. This means a
booting system does not wait for the savecore command to complete before
going to the next step. On large memory systems, the system can be available
before savecore completes.
4 System crash dump files, generated by the savecore command, are now saved
by default.
4 The savecore -L command is a new feature which enables you to get a crash
dump of the live running Solaris operating environment. This command is
intended for troubleshooting a running system by taking a snapshot of memory
during some bad state—such as a transient performance problem or service
outage. If the system is up and you can still run some commands, you can execute
the savecore -L to save a snapshot of the system to the dump device, and then
immediately write out the crash dump files to your savecore directory. Because
the system is still running, you may only use savecore -L if you have
configured a dedicated dump device.
dump device The device that stores dump data temporarily as the system
crashes. When the dump device is not the swap area, savecore
runs in the background, which speeds up the boot process.
savecore directory The directory that stores system crash dump files.
minimum free space Minimum amount of free space required in the savecore
directory after saving crash dump files. If no minimum free
space has been configured, the default is one megabyte.
System Crashes
System crashes can occur due to hardware malfunctions, i/o problems, and software
errors. If the system crashes, it will display an error message on the console, and
then write a copy of its physical memory to the dump device. The system will then
reboot automatically. When the system reboots, the savecore command is executed
to retrieve the data from the dump device and write the saved crash dump to your
savecore directory. The saved crash dump files provide invaluable information to
your support provider to aid in diagnosing the problem.
1. Display the Current Crash Display the current crash dump configuration
“How to Display the Current
Dump Configuration by using the dumpadmcommand.
Crash Dump Configuration” on
page 579
2. Modify the Crash Dump Use the dumpadm command to specify the
“How to Modify a Crash Dump
Configuration type of data to dump, whether or not the
Configuration” on page 579
system will use a dedicated dump device, the
directory for saving crash dump files, and
the amount of space that must remain
available after core files are written.
4. Recover From a Full Crash Optional. The system crashes but there is no “How to Recover From a Full
Dump Directory room in the savecore directory, and you Crash Dump Directory
want to save some critical system crash (Optional)” on page 582
dump information.
4. Disable or Enable the Optional. Use the dumpadm command to “How to Disable or Enable
Saving of Crash Dump Files disable or enable the saving the crash dump Saving Crash Dumps
files. Saving crash dump files is enabled by (Optional)” on page 583
default.
2. Display the current crash dump configuration by using the dumpadm command
without any options.
# dumpadm
Dump content: kernel pages
Dump device: /dev/dsk/c0t3d0s1 (swap)
Savecore directory: /var/pluto
Savecore enabled: yes
2. Identify the current crash dump configuration by using the dumpadm command.
# dumpadm
Dump content: kernel pages
Dump device: /dev/dsk/c0t3d0s1 (swap)
Savecore directory: /var/crash/pluto
Savecore enabled: yes
This the default dump configuration for a system running the Solaris 7 release.
Specifies the minimum free disk space for saving core files by
−m nnnk | nnnm | nnn%
creating a minfree file in the current savecore directory. This
parameter can be specified in kilobytes (nnnk) , megabytes
(nnnm)or file system size percentage (nnn%). The savecore
command consults this file prior to writing the crash dump
files. If writing the crash dump files, based on their size,
would decrease the amount of free space below the minfree
threshold, the dump files are not written and an error
message is logged. See “How to Recover From a Full Crash
Dump Directory (Optional)” on page 582 for recovering from
this scenario.
# dumpadm
Dump content: kernel pages
Dump device: /dev/dsk/c0t3d0s1 (swap)
Savecore directory: /var/crash/pluto
Savecore enabled: yes
# dumpadm -c all -d /dev/dsk/c0t1d0s1 -m 10%
Dump content: all pages
(continued)
# /usr/sbin/crash
dumpfile = /dev/mem, namelist = /dev/ksyms, outfile = stdout
> status
.
.
.
> size buf proc queue
.
.
du .
# /usr/sbin/crash
dumpfile = /dev/mem, namelist = /dev/ksyms, outfile = stdout
> status
system name: SunOS
release: 5.7
node name: saturn
version: Generic
machine name: sun4m
time of crash: Thu Feb 26 [Link] 1998
age of system: 19 day, 23 hr., 55 min.
panicstr:
panic registers:
pc: 0 sp: 0
> size buf proc queue
120
1552
88
# savecore [ directory ]
2. Disable or enable the saving of crash dumps on your system by using the
dumpadm command.
# dumpadm -n
Dump content: all pages
Dump device: /dev/dsk/c0t1d0s1 (dedicated)
Savecore directory: /var/crash/pluto (minfree = 77071KB)
Savecore enabled: no
# dumpadm -y
Dump content: all pages
Dump device: /dev/dsk/c0t1d0s1 (dedicated)
Savecore directory: /var/crash/pluto (minfree = 77071KB)
Savecore enabled: yes
This chapter describes miscellaneous software problems that may occur occasionally
and are relatively easy to fix. Troubleshooting miscellaneous software problems
includes solving problems that aren’t related to a specific software application or
topic, such as unsuccessful reboots and full file systems. Resolving these problems
are described in the following sections.
This is a list of information in this chapter.
4 “What to Do If Rebooting Fails” on page 585
4 “What to Do If a System Hangs” on page 586
4 “What to Do If a File System Fills Up” on page 587
4 “What to Do If File ACLs Are Lost After Copy or Restore” on page 588
4 “Troubleshooting Backup Problems” on page 588
585
Problem — A System Won’t Boot Because ... How to Fix the Problem
The system can’t find /platform/‘uname You may need to change the boot-device
-m‘/kernel/unix. setting in the PROM on a SPARC system.
See “Booting a SPARC System (Tasks)” in
System Administration Guide, Volume I for
information on changing the default boot
device.
There is no default boot device on an x86 Boot the system using the Configuration
system. The message displayed is: Assistant/Boot diskette and select the disk
from which to boot.
Not a UFS filesystem.
There’s an invalid entry in the /etc/ See “Shutting Down and Booting a System
passwd file. (Overview)” in System Administration Guide,
Volume I for information on recovering from
an invalid passwd file.
If none of the above suggestions solve the problem, contact your local service
provider.
1. Determine whether the system is running a window environment and follow the
suggestions listed below. If these suggestions don’t solve the problem, go to step
2.
4 Make sure the pointer is in the window where you are typing the commands
4 Press Control-q in case the user accidently pressed Control-s, which freezes the
screen. Control-s freezes only the window, not the entire screen. If a window is
frozen, try using another window.
There are several reasons why a file system fills up. The following sections describe
several scenarios for recovering from a full file system. See Chapter 19 for information
on routinely cleaning out old and unused files to prevent full file systems.
Someone accidentally copied a file or Log in as superuser and use the ls -tl
directory to the wrong location. This also command in the specific file system to
happens when an application crashes and identify which large file is newly created
writes a large core file into the file system. and remove it. See “How to Find and Delete
core Files” on page 393 to remove core
files.
This can occur if tmpfs is trying to write See tmpfs(7FS) for information on
more than it is allowed or some current recovering from tmpfs-related error
processes are using a lot of memory. messages.
If files or directories with ACLs are copied or Copy or restore files into the /var/tmp
restored into the /tmp directory, the ACL directory instead.
attributes are lost. The /tmp directory is
usually mounted as a temporary file system,
which doesn’t support UFS file system
attributes such as ACLs.
If you used an invalid destination device Use the ls -tl command in the /dev
name with the −f option, the ufsdump directory to identify which file is newly
command wrote to a file in the /dev created and abnormally large, and remove it.
directory of the root (/) file system, filling it
up. For example, if you typed /dev/rmt/
st0 instead of /dev/rmt/0, the backup file
/dev/rmt/st0 was created on the disk
rather than being sent to the tape drive.
Interactive Commands
When you use the interactive command, a ufsrestore> prompt is displayed, as
shown in this example:
At the ufsrestore> prompt, you can use the commands listed on “The ufsdump
and ufsrestore Commands (Reference)” in System Administration Guide, Volume I to
find files, create a list of files to be restored, and restore them.
591
To fix a search path problem, you need to know the pathname of the directory where
the command is stored.
If the wrong version of the command is found, a directory that has a command of
the same name is in the search path. In this case, the proper directory may be later in
the search path or may not be present at all.
You can display your current search path by using the echo $PATH command.
$ echo $PATH
/home/kryten/bin:/sbin:/usr/sbin:/usr/openwin/bin:/usr/openwin/bin/xview:
/usr/dist/local/exe:/usr/dist/exe
Use the which command to determine whether you are running the wrong version
of the command.
$ which maker
/usr/doctools/frame5.1/bin/maker
Note - The which command looks in the .cshrc file for path information. The
which command may give misleading results if you execute it from the Bourne or
Korn shell and you have a .cshrc file than contains aliases for the which
command. To ensure accurate results, use the which command in a C shell, or, in the
Korn shell, use the whence command.
$ echo $PATH
$ export PATH
$HOME/
.login
$ which command
venus% openwin
openwin: Command not found
venus% echo $PATH
no openwin in . /home/ignatz /sbin /usr/sbin /usr/bin /etc
/home/ignatz/bin /bin /home/bin /usr/etc
(continued)
venus% vi ~.cshrc
(Add appropriate command directory to the search path)
venus% source .cshrc
venus% openwin
If you cannot find a command, look at the man page for its directory path. For
example, if you cannot find the lpsched command (the lp printer daemon),
lpsched(1M) tells you the path is /usr/lib/lp/lpsched.
If You Need to Change the Use the ... For More Details, See ...
...
Permission on a file
chmod(1) command “How to Change
Permissions in Absolute
Mode” on page 274
Ownership of a file
chown(1) command “How to Change the Owner
of a File” on page 269
See NFS Administration Guide for information about problems with network access
and problems with accessing systems through AutoFS.
This chapter explains how to troubleshoot printing problems that may occur when
you set up or maintain printing services.
This is a list of step-by-step instructions in this chapter.
4 “How to Troubleshoot No Printer Output” on page 603
4 “How to Troubleshoot Incorrect Output” on page 618
4 “How to Unhang the LP Print Service” on page 624
4 “How to Troubleshoot an Idle (Hung) Printer” on page 625
4 “How to Resolve Conflicting Printer Status Messages” on page 627
See for information about printing and the LP print service.
Tips on Troubleshooting
Sometimes after setting up a printer, you find that nothing prints. Or, you may get a
little farther in the process: something prints, but it is not what you expect—the
output is incorrect or illegible. Then, when you get past these problems, other
problems may occur, such as:
4 LP commands hanging
4 Printers becoming idle
4 Users getting conflicting messages
Note - Although many of the suggestions in this chapter are relevant to parallel
printers, they are geared toward the more common serial printers.
597
Troubleshooting Adding a Printer
If you use Admintool to add access to a remote printer after installing the Solaris
release, and you get the following message:
Admintool: Error
add remote printer failed
It is possible that the SunSoft Print Client software is installed in your network and
the remote printer is already available to you. Use the lpstat -t command before
adding a printer to see if the printer is available.
2. Check that the cable is connected to the port on the printer and to the port on
the system or server.
3. Make sure that the cable is the correct cable and that it is not defective.
Refer to the manufacturer‘s documentation. If the printer is connected to a serial
port, verify that the cable supports hardware flow control; a NULL modem
adapter supports this. Table 34–1 shows the pin configuration for NULL modem
cables.
Host Printer
- 1 (FG) 1(FG)
Host Printer
4. Check that any hardware switches for the ports are set properly.
See the printer documentation for the correct settings.
6. Check that the baud settings for the computer and the printer are correct.
If the baud settings are not the same for both the computer and the printer,
sometimes nothing will print, but more often you get incorrect output. For
instructions, see “How to Troubleshoot Incorrect Output” on page 618.
If the message says the system is alive, you know you can reach the system, so
the network is all right. The message also tells you that either a name service or
the local /etc/hosts file has translated the host (system) name you entered into
an IP address; otherwise, you would need to enter the IP address.
2. (On a SunOS 5.0–5.1 print server only) Check that the listen port monitor is
configured correctly.
3. (On a SunOS 5.0–5.1 print server only) Check that the network listen services
are registered with the port monitor on the print server.
# lpstat -r
scheduler is running
b. If the scheduler is not running, become superuser or lp, and start the
scheduler.
# /usr/lib/lp/lpsched
If you have trouble starting the scheduler, see “How to Unhang the LP Print
Service” on page 624.
2. On both the print server and print client, make sure that the printer is
accepting requests.
a. Check that the printer is accepting requests.
This command verifies that the LP system is accepting requests for each
printer configured for the system.
b. If the printer is not accepting requests, become superuser or lp, and allow
the printer to accept print requests.
# accept luna
3. On both the print server and print client, make sure that the printer is enabled
to print submitted print requests.
a. Check that the printer is enabled.
# lpstat -p luna
printer luna disabled since Jun 16 10:40 1998.
available.
unknown reason
This command displays information about printer status. You can omit the
printer name to obtain information about all printers set up for the system.
The following example shows a printer that is disabled.
b. If the printer is disabled, become superuser or lp, and enable the printer.
# enable luna
printer "luna" now enabled.
4. On the print server, make sure that the printer is connected to the correct serial
port.
a. Check that the printer is connected to the correct serial port.
The message device for printer-name shows the port address. Is the cable
connected to the port to which the LP print service says is connected? If the
port is correct, skip to Step 5 on page 608.
c. Change the file ownership of the device file that represents the port.
# chown lp device-filename
This command assigns the special user lp as the owner of the device file. In
this command, device-filename is the name of the device file.
This command allows only superuser or lp to access the printer port device
file.
5. On both the print server and print client, make sure that the printer is
configured properly.
a. Check that the printer is configured properly.
# lpstat -p luna -l
printer luna is idle. enabled since Jun 16 10:38 1998. available.
Content types: postscript
Printer types: PS
The above example shows a PostScript printer that is configured properly, and
that is available to process print requests. If the printer type and file content
type are correct, skip to Step 6 on page 609.
b. If the printer type or file content type is incorrect, try setting the print type
to unknown and the content type to any on the print client.
6. On the print server, make sure that the printer is not faulted.
a. Check that the printer is not waiting because of a printer fault.
# enable printer-name
This command instructs the LP print service to set a default policy of writing
root—sending the printer fault message to the terminal on which root is
logged in—if the printer fails. This may help you get quick notification of
faults as you try to fix the problem.
7. Make sure that the printer is not set up incorrectly as a login terminal.
a. Look for the printer port entry in the ps -ef command output.
# ps -ef
root 169 167 0 Apr 04 ? 0:08 /usr/lib/saf/listen tcp
root 939 1 0 [Link] ? 0:02 /usr/lib/lpsched
root 859 858 0 [Link] term/a 0:01 /bin/sh -c \ /etc/lp
/interfaces/luna
luna-294 rocket!smith ‘‘passwd\n##
#
# cancel request-id
# lpadmin -p printer-name -h
d. Check the ps -ef command output to verify that the printer port is no
longer a login device.
If you do not find the source of the printing problem in the basic LP print
service functions, continue to one of the following procedures for the specific
client/server case that applies.
2. Check the basic functions of the LP print service on the print client, if you
have not done so already.
For instructions on checking basic functions, see “To check the basic functions of
the LP print service: ” on page 606. On the print client, the LP scheduler has to be
running, and the printer has to be enabled and accepting requests before any
request from the client will print.
Note - For most of the following steps, you must be logged in as root or lp.
If you receive the message print_server not available, you may have a
network problem.
4. On SunOS 5.1 print client only, make sure that the print server is identified as
type s5 by viewing the Modify Printer window in Admintool.
# lpstat -t luna
scheduler is running
system default destination: luna
device for luna: /dev/term/a
luna accepting requests since Jun 16 10:39 1998. available.
printer luna now printing luna-314. enabled since Jun 16 10:39 1998.
available.
luna-129 root 488 Jun 16 10:45
#
1. Check the basic functions of the LP print service on the print client, if you
have not done so already.
For instructions, see “To check the basic functions of the LP print service: ” on
page 606.
3. Make sure that the lpd daemon on the print server is running.
a. On the print server, verify the lpd daemon is running.
b. If lpd is not running on the print server, become superuser on the print
server, and restart it.
# /usr/lib/lpd &
# /usr/etc/lpc
lpc>
lpc> status
lpc> quit
5. Make sure that the print client has access to the print server.
a. Check if there is an /etc/[Link] file on the 4.1 print server.
On a 4.1 print server, if this file exists, it is used to determine whether an
incoming print request can be accepted. If the file does not exist, all print
client systems have access, so skip steps b and c.
b. If the file exists, see if the print client is listed in the file.
Requests from client systems not listed in the file are not transferred to the
print server.
c. If the client is not listed, add the print client to the file.
Note - If you get this far without pinpointing the problem, the SunOS 4.1
system is probably set up and working properly.
# ps -ef | grep lp
root 154 1 80 Jan 07 ? 0:02 /usr/lib/lpsched
# lpshut
# /usr/lib/lp/lpsched
7. Make sure that the remote print server is identified correctly as a SunOS 4.1
system.
If you receive the message print_client not available, you may have a
network problem.
This command shows whether the print client is working. The above example
shows that the print client is not working correctly.
4. Make sure that the lpd daemon is running on the print client.
a. Verify the lpd daemon is running.
This command shows if the lpd daemon is running on the print client. The
above example shows that the daemon is running.
5. On the print client, make sure that there is a printcap entry identifying the
printer.
a. Verify the printer is known.
The above example shows that the /etc/printcap file does not have an
entry for the specified printer.
b. If there is no entry, edit the /etc/printcap file and add the following
information:
printer-name|print-server:\
:lp=:rm=print-server:rp=printer-name:br#9600:rw:\
:lf=/var/spool/lpd/printer-name/log:\
:sd=/var/spool/lpd/printer-name:
The following example shows an entry for printer luna connected to print
server neptune.
luna|neptune:\
:lp=:rm=neptune:rp=luna:br#9600:rw:\
:lf=/var/spool/lpd/luna/log:\
:sd=/var/spool/lpd/luna:
6. Make sure that the print client lpd is not in a wait state by forcing a retry.
If the print server is up and responding, the print client lpd may be in a wait
state before attempting a retry.
# lpc
lpc> restart luna
luna:
no daemon to abort
luna:
daemon started
# quit
$
# more /var/spool/lpd/luna/log
# more /var/spool/lpd/luna/status
waiting for luna to come up
#
c. If the connection is all right, on the print server, verify the print server is
setup correctly.
$ lpstat -p luna -l
printer luna is idle. enabled since Jun 16 10:43 1998.
available.
Form mounted:
Content types: any
Printer types: NeWSprinter20
Description:
Connection: direct
Interface: /etc/lp/interfaces/alamosa
After fault: continue
Users allowed:
(all)
Forms allowed:
(none)
Banner not required
Character sets:
(continued)
Default pitch:
Default page size: 80 wide 66 long
Default port settings:
$
c. If the printer type is not correct, change it with Admintool’s Modify Printer
option, or use the following lpadmin command.
On the print client, the printer type should be unknown. On the print server,
the printer type must match a terminfo entry that is defined to support the
model of printer you have. If there is no terminfo entry for the type of
printer you have, see “How to Add a terminfo Entry for an Unsupported
Printer” on page 127.
3. If the banner page prints, but there is no output for the body of the document,
check the file content types.
File content types specified for a printer indicate the types of files the printer can
print directly without filtering. An incorrect file content type causes filtering to be
bypassed when it may be needed.
a. Note the information on file content type that was supplied in the previous
step by the lpstat command.
On the print client, the file content type should be any, unless you have good
reason to specify one or more explicit content types. If a content is specified
on the client, filtering is done on the print client, rather than the print server.
In addition, content types on the client must match the content types specified
on the print server, which in turn must reflect the capabilities of the printer.
Run this command on either the print client, or print server, or both, as
needed. Try -I any on the print client, and -I "" on the print server. The
latter specifies a null file content type list, which means an attempt should be
made to filter all files, because the printer can directly print only files that
exactly match its printer type.
This combination is a good first choice when files are not printing. If it works,
you may want to try specifying explicit content types on the print server to
reduce unnecessary filtering. For a local PostScript printer, you should use
postscript, or postscript,simple— if the printer supports these types.
Be aware that PS and PSR are not file content types; they are printer types.
If you omit -I, the file content list defaults to simple. If you use the -I
option and want to specify file content types in addition to simple, simple
must be included in the list.
When specifying multiple file content types, separate the names with commas.
Or you can separate names with spaces and enclose the list in quotation
marks. If you specify any as the file content type, no filtering will be done and
only file types that can be printed directly by the printer should be sent to it.
4. Check that the print request does not bypass filtering needed to download
fonts.
If a user submits a print request to a PostScript printer with the command
lp -T PS, no filtering is done. Try submitting the request with the command
lp -T postscript to force filtering, which may result in the downloading of
non-resident fonts needed by the document.
5. Make sure that the stty settings for the printer port are correct.
a. Read the printer documentation to determine the correct stty settings for
the printer port.
(continued)
This command shows the current stty settings for the printer port.
Table 34–2 shows the default stty options used by the LP print service’s
standard printer interface program.
TABLE 34–2 Default stty Settings Used by the Standard Interface Program
Option Meaning
Option Meaning
Use Table 34–3 to choose stty options to correct various problems affecting
print output.
110, 300, 600, Sets baud rate to the Random characters and special
1200, 1800, specified value (enter only characters may be printed and
2400, 4800, one baud rate) spacing may be inconsistent
9600, 19200,
38400
tabs Sets tabs every eight spaces Text has no left margin, is run
together, or is jammed together
You can change more than one option setting by enclosing the list of options
in single quotation marks and separating each option with spaces. For
example, suppose the printer requires you to enable odd parity and set a 7-bit
character size. You would type a command similar to that shown in the
following example:
# lp -d printer-name filename
# lpshut
If this command hangs, press Control-c and proceed to the next step. If this
command succeeds, skip to step 4.
# ps -el | grep lp
134 term/a 0:01 lpsched
#
Use the process ID numbers (PIDs) from the first column in place of the pid
variables in the next step.
This should stop the LP print service processes. If the processes do not stop, as a
last resort go to step 5.
6. Remove the SCHEDLOCK file so you can restart the LP print service.
# rm /usr/spool/lp/SCHEDLOCK
# /usr/lib/lp/lpsched
# lpstat -p printer-name
The information displayed shows you whether the printer is idle or active,
enabled or disabled, or available or not accepting print requests. If everything
looks all right, continue with other procedures in this section. If you cannot run
the lpstat command, see “How to Unhang the LP Print Service” on page 624.
2. If the printer is not available (not accepting requests), allow the printer to
accept requests.
# accept printer-name
# enable printer-name
This command re-enables the printer so that it will act on the requests in its queue.
$ lpstat -o luna
luna-10 fred 1261 Mar 12 17:34 being filtered
luna-11 iggy 1261 Mar 12 17:36 on terra
luna-12 jack 1261 Mar 12 17:39 on terra
(continued)
See if the first waiting request is being filtered. If the output looks like the above
example, the file is being filtered; the printer is not hung, it just is taking a while to
process the request.
# enable printer-name
If a request was blocked by a printer fault, this command will force a retry. If this
command does not work, continue with other procedures in this section.
# reject printer-name
2. On the print client, send an “are you there?” request to the print server.
If you receive the message print_server not available, you may have a
network problem.
3. After you fix the above problem, allow new print requests to be queued.
# enable printer-name
1. On the print server, stop further queuing of print requests from any print
client to the print server.
# reject printer-name
# more /var/lp/logs/lpsched
The information displayed may help you pinpoint what is preventing the print
requests from the print client to the print server from being printed.
3. After you fix the problem, allow new print requests to be queued.
# accept printer-name
# enable printer-name
# lpstat -p printer-name
Users will see conflicting status messages when the print client is accepting
requests, but the print server is rejecting requests.
# lpstat -p -l printer-name
Look at the definitions of the print job components, like print filters, character
sets, print wheels, and forms, to be sure they are the same on both the client and
server systems so that local users can access printers on print server systems.
Error Messages
Normally, fsck is run non-interactively to preen the file systems after an abrupt
system halt in which the latest file system changes were not written to disk. Preening
automatically fixes any basic file system inconsistencies and does not try to repair
more serious errors. While preening a file system, fsck fixes the inconsistencies it
expects from such an abrupt halt. For more serious conditions, the command reports
the error and terminates.
When you run fsck interactively, fsck reports each inconsistency found and fixes
innocuous errors. However, for more serious errors, the command reports the
629
inconsistency and prompts you to choose a response. When you run fsck using the
-y or -n options, your response is predefined as yes or no to the default response
suggested by fsck for each error condition.
Some corrective actions will result in some loss of data. The amount and severity of
data loss may be determined from the fsck diagnostic output.
fsck is a multipass file system check program. Each pass invokes a different phase
of the fsck program with different sets of messages. After initialization, fsck
performs successive passes over each file system, checking blocks and sizes, path
names, connectivity, reference counts, and the map of free blocks (possibly rebuilding
it). It also performs some cleanup.
The phases (passes) performed by the UFS version of fsck are:
4 Initialization
4 Phase 1 – Check blocks and sizes
4 Phase 2 – Check path names
4 Phase 3 – Check connectivity
4 Phase 4 – Check reference counts
4 Phase 5 – Check cylinder groups
The next sections describe the error conditions that may be detected in each phase,
the messages and prompts that result, and possible responses you can make.
Messages that may appear in more than one phase are described in “General fsck
Error Messages ” on page 631. Otherwise, messages are organized alphabetically by
the phases in which they occur.
Many of the messages include the abbreviations shown in Table 35–1:
Abbreviation Meaning
CG Cylinder group
Abbreviation Meaning
UNREF Unreferenced
Many of the messages also include variable fields, such as inode numbers, which are
represented in this book by an italicized term, such as inode-number. For example,
this screen message:
is shown as:
A request to write a specified block number, The disk may be write-protected. Check the
block-number, in the file system failed. write-protect lock on the drive.
If you continue the file system check, fsck If the disk has hardware problems, the
will retry the write and display a list of problem will persist. Run fsck again to
sector numbers that could not be written. If recheck the file system.
the block was part of the virtual memory
If the write-protect is not the problem or the
buffer cache, fsck will terminate with a
recheck fails, contact your local service
fatal I/O error message.
provider or another qualified person.
Request for memory for its internal tables Killing other processes may solve the
failed. fsck terminates. This message problem. If not, contact your local service
indicates a serious system failure that should provider or another qualified person.
be handled immediately. This condition may
occur if other processes are using a very
large amount of system resources.
The file system checklist file filename (usually Check if the file exists and if its access
/etc/vfstab) cannot be opened for modes permit read access.
reading. fsck terminates.
fsck cannot open file system filename. When Check to see if read and write access to the
running interactively, fsck ignores this file raw device file for the file system is
system and continues checking the next file permitted.
system given.
fsck request for statistics about the root This message indicates a serious system
directory failed. fsck terminates. failure. Contact your local service provider
or another qualified person.
fsck request for statistics about the file Check if the file system exists and check its
system filename failed. When running access modes.
interactively, fsck ignores this file system
and continues checking the next file system
given.
Either the -n option was specified or fsck If -n was not specified, check the type of the
could not open the file system filename for file specified. It may be the name of a
writing. When fsck is running in no-write regular file.
mode, all diagnostic messages are displayed,
but fsck does not attempt to fix anything.
The superblock minimum space percentage To set the minfree parameter to the default
is greater than 99 percent or less than 0 10 percent, type y at the default prompt. To
percent. ignore the error condition, type n at the
default prompt.
fsck has had an internal error, whose If one of the following messages are
message is message. displayed, contact your local service
provider or another qualified person:
CPG OUT OF RANGE
FRAGS PER BLOCK OR FRAGSIZE WRONG
INODES PER GROUP OUT OF RANGE
INOPB NONSENSICAL RELATIVE TO BSIZE
MAGIC NUMBER WRONG
NCG OUT OF RANGE
NCYL IS INCONSISTENT WITH NCG*CPG
NUMBER OF DATA BLOCKS OUT OF RANGE
NUMBER OF DIRECTORIES OUT OF RANGE
ROTATIONAL POSITION TABLE SIZE OUT OF RANGE
SIZE OF CYLINDER GROUP SUMMARY AREA WRONG
SIZE TOO LARGE
BAD VALUES IN SUPERBLOCK
The status of a given inode is set to all 1s, Type y to reinitialize the inode to a
indicating file system damage. This message reasonable value.
does not indicate physical disk damage,
unless it is displayed repeatedly after fsck
-y has been run.
An internal error has scrambled the fsck Contact your local service provider or
state map so that it shows the impossible another qualified person.
value state-number. fsck exits immediately.
There is no more room in an internal table in To continue the program, type y at the
fsck containing duplicate block numbers. If CONTINUE prompt. When this error occurs, a
the -o p option is specified, the program complete check of the file system is not
terminates. possible. If another duplicate block is found,
this error condition repeats. Increase the
amount of virtual memory available (by
killing some processes, increasing swap
space) and run fsck again to recheck the file
system. To terminate the program, type n.
Too many (usually more than 10) blocks To continue the program, type y at the
have a number lower than the number of the CONTINUE prompt. When this error occurs, a
first data block in the file system or greater complete check of the file system is not
than the number of the last block in the file possible. You should run fsck again to
system associated with inode inode-number. If recheck the file system. To terminate the
the -o p (preen) option is specified, the program, type n.
program terminates.
Too many (usually more than 10) blocks are To continue the program, type y at the
claimed by the same or another inode or by CONTINUE prompt. When this error occurs, a
a free-list. If the -o p option is specified, the complete check of the file system is not
program terminates. possible. You should run fsck again to
recheck the file system. To terminate the
program, type n.
The block count for inode inode-number is To replace the block count of inode
number-of-BAD-DUP-or-missing-blocks, but inode-number by number-of-blocks-in-filesystem,
should be number-of-blocks-in-filesystem. When type y at the CORRECT prompt. To terminate
preening, fsck corrects the count. the program, type n.
There is no more room in an internal table To continue the program, type y at the
for fsck containing allocated inodes with a CONTINUE prompt. If another allocated
link count of zero. If the -o p (preen) option inode with a zero-link count is found, this
is specified, the program exits and fsck has error condition repeats. When this error
to be completed manually. occurs, a complete check of the file system is
not possible. You should run fsck again to
recheck the file system. Increase the virtual
memory available by killing some processes
or increasing swap space, then run fsck
again. To terminate the program, type n.
fsck has found inode inode-number whose To complete the truncation to the size
size is shorter than the number of blocks specified in the inode, type y at the
allocated to it. This condition occurs only if SALVAGE prompt. To ignore this error
the system crashes while truncating a file. condition, type n.
When preening the file system, fsck
completes the truncation to the specified size.
The mode word of the inode inode-number To deallocate the inode inode-number by
shows that the inode is not a pipe, special zeroing its contents, which results in the
character inode, special block inode, regular UNALLOCATED error condition in phase 2 for
inode, symbolic link, FIFO file, or directory each directory entry pointing to this inode,
inode. If the -o p option is specified, the type y at the CLEAR prompt. To ignore this
inode is cleared. error condition, type n.
Inode inode-number contains a block number When a duplicate block is found, the file
block-number that is already claimed by the system is rescanned to find the inode that
same or another inode. This error condition previously claimed that block.
generates the BAD/DUP error message in
phase 2. Inodes that have overlapping blocks
may be determined by examining this error
condition and the DUP error condition in
phase 1.
An fsck internal error has passed an invalid If this error message is displayed, contact
state state-number to the routine that your local service provider or another
descends the file system directory structure. qualified person.
fsck exits.
A directory inode-number has been found To change the inode number for “.” to be
whose inode number for “.” does not equal equal to inode-number, type y at the FIX
inode-number. prompt To leave the inode numbers for “.”
unchanged, type n.
A directory inode-number has been found To change the inode number for “..” to be
whose inode number for “..” does not equal to the parent of inode-number, type y at
equal the parent of inode-number. the FIX prompt. (Note that “..’’ in the root
inode points to itself.)To leave the inode
number for “..” unchanged, type n.
An fsck internal error has returned an If this message is displayed, contact your
impossible state state-number from the local service provider or another qualified
routine that descends the file system person.
directory structure. fsck exits.
An internal error has assigned an impossible If this error message is displayed, contact
state state-number to the root inode. fsck your local service provider or another
exits. qualified person.
An internal error has assigned an impossible If this error message is displayed, contact
state state-number to inode inode-number. your local service provider or another
fsck exits. qualified person.
A directory filename has been found whose To increase the size of the directory to the
size file-size is less than the minimum minimum directory size, type y at the FIX
directory size. The owner UID, mode prompt. To ignore this directory, type n.
file-mode, size file-size, modify time
modification-time, and directory name filename
are displayed.
A directory filename has been found with To round up the length to the appropriate
size file-size that is not a multiple of the block size, type y. When preening the file
directory block size block-number. system (-o p option), fsck only displays a
warning and adjusts the [Link] ignore
this condition, type n.
A directory with an inconsistent internal To throw away all entries up to the next
state has been found. directory boundary (usually a 512-byte
boundary), type y at the SALVAGE prompt.
This drastic action can throw away up to 42
entries. Take this action only after other
recovery efforts have failed. To skip to the
next directory boundary and resume
reading, but not modify the directory, type n.
Phase 1 or phase 1B found duplicate blocks To remove the directory or file entry filename,
or bad blocks associated with directory or type y at the REMOVE prompt. To ignore this
file entry filename, inode inode-number. The error condition, type n.
owner UID, mode file-mode, size file-size,
modification time modification-time, and
directory or file name filename are displayed.
If the -p (preen) option is specified, the
duplicate/bad blocks are removed.
Phase 1 or phase 1B has found duplicate To clear the existing contents of the root
blocks or bad blocks in the root inode inode and reallocate it, type y at the
(usually inode number 2) of the file system. REALLOCATE prompt. The files and
directories usually found in the root will be
recovered in phase 3 and put into the
lost+found directory. If the attempt to
allocate the root fails, fsck will exit with:
CANNOT ALLOCATE ROOT INODE. Type n to
get the CONTINUE prompt. Type: y to
respond to the CONTINUE prompt, and
ignore the DUPS/BAD error condition in the
root inode and continue running the file
system check. If the root inode is not correct,
this may generate many other error
messages. Type n to terminate the program.
A directory inode-number has been found that To remove the extra entry for “.” type y at
has more than one entry for “.”. the FIX prompt. To leave the directory
unchanged, type n.
A directory inode-number has been found that To remove the extra entry for ‘..’ (the
has more than one entry for “..” (the parent parent directory), type y at the FIX prompt.
directory). To leave the directory unchanged, type n.
fsck has found an extraneous hard link To delete the extraneous entry
hard-link-number to a directory filename. hard-link-number type y at the REMOVE
When preening (-o p option), fsck ignores prompt. To ignore the error condition, type n.
the extraneous hard links.
A directory entry filename has an inode To delete the directory entry filename type y
number inode-number that is greater than the at the REMOVE prompt. To ignore the error
end of the inode list. If the -p (preen) option condition, type n.
is specified, the inode will be removed
automatically.
A directory inode-number has been found To build an entry for “.” with inode number
whose first entry (the entry for “.”) is equal to inode-number, type y at the FIX
unallocated. prompt. To leave the directory unchanged,
type n.
A directory inode-number has been found Mount the file system and move entry
whose first entry is filename. fsck cannot filename elsewhere. Unmount the file system
resolve this problem. and run fsck again.
A directory inode-number has been found If this error message is displayed, contact
whose first entry is not “.”. fsck cannot your local service provider or another
resolve the problem. qualified person.
A directory inode-number has been found To build an entry for “..” with inode
whose second entry is unallocated. number equal to the parent of inode-number,
type y at the FIX prompt. (Note that “..’’ in
the root inode points to itself.) To leave the
directory unchanged, type n.
A directory inode-number has been found Mount the file system and move entry
whose second entry is filename. fsck cannot filename elsewhere. Then unmount the file
resolve this problem. system and run fsck again.
A directory inode-number has been found Mount the file system and move the second
whose second entry is not “..” (the parent entry in the directory elsewhere. Then
directory). fsck cannot resolve this problem. unmount the file system and run fsck again.
An excessively long path name has been Remove the circular links.
found, which usually indicates loops in the
file system name space. This error can occur
if a privileged user has made circular links
to directories.
The root inode (usually inode number 2) has To allocate inode 2 as the root inode, type y
no allocate-mode bits. at the ALLOCATE prompt. The files and
directories usually found in the root will be
recovered in phase 3 and put into the
lost+found directory. If the attempt to
allocate the root fails, fsck displays this
message and exits: CANNOT ALLOCATE ROOT
INODE. To terminate the program, type n.
The root inode (usually inode number 2) of To clear the existing contents of the root
the file system is not a directory inode. inode and reallocate it, type y at the
REALLOCATE prompt. The files and
directories usually found in the root will be
recovered in phase 3 and put into the
lost+found directory. If the attempt to
allocate the root fails, fsck displays this
message and exits :CANNOT ALLOCATE ROOT
INODE. To have fsck prompt with FIX,
type n.
A directory or file entry filename points to an To delete the directory entry filename, type y
unallocated inode inode-number. The owner at the REMOVE prompt. To ignore the error
UID, mode file-mode, size file-size, modify condition, type n.
time modification-time, and file name filename
are displayed.
A directory entry filename has a size file-size To remove the directory entry filename, type
that is zero. The owner UID, mode file-mode, y at the REMOVE prompt. This results in the
size file-size, modify time modification-time, BAD/DUP error message in phase 4. To
and directory name filename are displayed. ignore the error condition, type n.
An internal error has caused an impossible If this occurs, contact your local service
state state-number to be passed to the routine provider or another qualified person.
that descends the file system directory
structure. fsck exits.
A directory filename has been found with size To round up the length to the appropriate
file-size that is not a multiple of the directory block size, type y at the ADJUST prompt.
block size B. (This condition can recur in When preening, fsck displays a warning
phase 3 if it is not adjusted in phase 2.) and adjusts the directory. To ignore this error
condition, type n.
The entry for lost+found is not a directory. To allocate a directory inode and change the
lost+found directory to reference it, type y
at the REALLOCATE prompt. The previous
inode reference by the lost+found
directory is not cleared and it will either be
reclaimed as an unreferenced inode or have
its link count adjusted later in this phase.
Inability to create a lost+found directory
displays the message: SORRY. CANNOT
CREATE lost+found DIRECTORY and
aborts the attempt to link up the lost inode,
which generates the UNREF error message in
phase 4. To abort the attempt to link up the
lost inode, which generates the UNREF error
message in phase 4, type n.
The directory inode inode-number was not To reconnect the directory inode inode-number
connected to a directory entry when the file into the lost+found directory, type y at the
system was traversed. The owner UID, mode RECONNECT prompt. If the directory is
file-mode, size file-size, and modification time successfully reconnected, a CONNECTED
modification-time of directory inode message is displayed. Otherwise, one of the
inode-number are displayed. When preening, lost+found error messages is displayed. To
fsck reconnects the non-empty directory ignore this error condition, type n. This error
inode if the directory size is non-zero. causes the UNREF error condition in phase 4.
Otherwise, fsck clears the directory inode.
(CLEAR)
The inode mentioned in the UNREF error To deallocate the inode by zeroing out its
message immediately preceding cannot be contents, type y at the CLEAR prompt. To
reconnected. This message does not display if ignore the preceding error condition, type n.
the file system is being preened because lack
of space to reconnect files terminates fsck.
The link count for directory or file inode To replace the link count of directory or file
inode-number is link-count but should be inode inode-number with corrected-link-count,
corrected-link-count. The owner UID, mode type y at the ADJUST prompt. To ignore this
file-mode, size file-size, and modification time error condition, type n.
modification-time of inode inode-number are
displayed. If the -o p option is specified, the
link count is adjusted unless the number of
references is increasing. This condition does
not occur unless there is a hardware failure.
When the number of references is increasing
during preening, fsck displays this message
and exits: LINK COUNT INCREASING
The entry for lost+found is not a directory. To allocate a directory inode and change the
lost+found directory to reference it, type y
at the REALLOCATE prompt. The previous
inode reference by the lost+found
directory is not cleared. It will either be
reclaimed as an unreferenced inode or have
its link count adjusted later in this phase.
Inability to create a lost+found directory
displays this message: SORRY. CANNOT
CREATE lost+found DIRECTORY and
aborts the attempt to link up the lost inode.
This error generates the UNREF error
message later in phase 4. To abort the
attempt to link up the lost inode, type n.
There is no space to add another entry to the To expand the lost+found directory to
lost+found directory in the root directory make room for the new entry, type y at the
of the file system. When preening, fsck EXPAND prompt. If the attempted expansion
expands the lost+found directory. fails, fsck displays the message: SORRY. NO
SPACE IN lost+found DIRECTORY and
aborts the request to link a file to the
lost+found directory. This error generates
the UNREF error message later in phase 4.
Delete any unnecessary entries in the
lost+found directory. This error terminates
fsck when preening (-o p option) is in
[Link] abort the attempt to link up the lost
inode, type n.
File inode inode-number was not connected to To reconnect inode inode-number to the file
a directory entry when the file system was system in the lost+found directory, type y.
traversed. The owner UID, mode file-mode, This error may generate the lost+found
size file-size, and modification time error message in phase 4 if there are
modification-time of inode inode-number are problems connecting inode inode-number to
displayed. When fsck is preening, the file is the lost+found directory. To ignore this
cleared if either its size or its link count is error condition, type n. This error always
zero; otherwise, it is reconnected. invokes the CLEAR error condition in phase
4.
A directory entry filename has a size file-size To deallocate the directory inode
that is zero. The owner UID, mode file-mode, inode-number by zeroing out its contents,
size file-size, modification time type y. To ignore the error condition, type n.
modification-time, and directory name filename
are displayed.
A cylinder group block map is missing some To reconstruct the free-block map, type y at
free blocks. During preening, fsck the SALVAGE prompt. To ignore this error
reconstructs the maps. condition, type n.
The magic number of cylinder group If this occurs, contact your local service
character-for-command-option is wrong. This provider or another qualified person.
error usually indicates that the cylinder
group maps have been destroyed. When
running interactively, the cylinder group is
marked as needing reconstruction. fsck
terminates if the file system is being preened.
The actual count of free blocks does not To reconstruct the superblock free-block
match the count of free blocks in the information, type y at the SALVAGE prompt.
superblock of the file system. If the -o p To ignore this error condition, type n.
option was specified, the free-block count in
the superblock is fixed automatically.
This message indicates that the file system checked contains number-of files using
number-of fragment-sized blocks, and that there are number-of fragment-sized blocks
free in the file system. The numbers in parentheses break the free count down into
number-of free fragments, number-of free full-sized blocks, and the percent
fragmentation.
This message indicates that the file system was modified by fsck. If this file system
is mounted or is the current root (/) file system, reboot. If the file system is mounted,
you may need to unmount it and run fsck again; otherwise, the work done by
fsck may be undone by the in-core copies of tables.
This message indicates that file system filename was marked as stable. Use the
fsck -m command to determine if the file system needs checking.
This message indicates that file system filename was not marked as stable. Use the
fsck -m command to determine if the file system needs checking.
Troubleshooting Software
Administration Problems
This chapter describes problems you may encounter when installing or removing
software packages. There are two sections: Specific Software Administration Errors,
which describes package installation and administration errors you might encounter,
and General Software Administration Problems, which describes behavioral
problems that might not result in a particular error message.
This is a list of information in this chapter.
4 “Specific Software Administration Errors ” on page 661
4 “General Software Administration Problems” on page 662
See “Software Administration (Overview)” in System Administration Guide, Volume I
for information about managing software packages.
661
Reason Error Occurred How to Fix the Problem
This error message indicates that not all of a If you see this warning message during a
package’s files could be installed. This package installation, you must also install
usually occurs when you are using pkgadd the package on the server. See “How to Add
to install a package on a client. In this case, Packages to a Server” on page 308 for details.
pkgadd attempts to install a package on a
file system that is mounted from a server, but
pkgadd doesn’t have permission to do so.
There is a known problem with adding or Set the following environment variable and
removing some packages developed prior to try to add the package again.
the Solaris 2.5 release. Sometimes, when
adding or removing these packages, the NONABI_SCRIPTS=TRUE
installation fails during user interaction or
you are prompted for user interaction and
your responses are ignored.
Index-663
fixing corrupted files forms, 107
tacct file, 439 local printers, 38
wtmp file, 438, 456 printer description, 66
installation-dependent local programs, 456 swap space, 475
maintaining, 438, 440 terminfo entry, 124
process, 444, 446, 449, 450 address space map, 470, 484
raw data, 445 address translation page faults, 518
reports, 447, 454 adjusting printer port characteristics, 121
daily command summary, 451, 452, adm file, 415, 435
456, 459 to 461 adm login account, 253
daily report (tty line utilization), 448, administering
449 character sets, 10, 92, 99
daily usage report, 449, 450 fonts, 10, 115, 119
last login report, 453 forms, 10, 105, 115
overview, 447 print filters, 10, 100, 104
total command summary printers, 59, 90
(monthly), 447, 452, 460, 461 Admintool
setting up, 437 ability to define printer with, 22
types of, 437, 443 Add Access To Printer window, 42
user fee calculation, 437, 446, 450 Add Local Printer window, 37
acct file, 434 Browse menu, 35
acct.h format files, 454 main window, 35, 36
acctcms command, 456, 461 prerequisites for using, 35
acctcom command, 452, 454 Printers window, 36, 37, 42
acctcon command, 438, 456, 459 starting, 35
acctdusg command, 444, 450, 458 terminals and modems, 204
acctprc command, 456 alert message priority, 573
acctwtmp command, 444, 445, 448 alerts
ACLs (access control lists), 280 for mounting character sets, 96
adding entries, 286 for mounting font cartridges, 94
changing entries, 286 for mounting forms, 106, 110
checking entries, 285 for mounting print wheels, 94
commands, 252 for printer faults, 72
default entries for directories, 282 alias for selectable character set, 93, 98, 99
deleting entries, 252, 287 aliases file (ASET)
described, 252, 280 described, 339
directory entries, 282 example, 349
displaying entries, 252, 288 format, 349
format of entries, 280 specification, 342
setting entries, 283, 285 alignment pattern
valid file entries, 281 defining, 146
active file, 439, 456, 459 printing, 109
[Link] file, 439, 459 protection of, 107
adapter board (serial port), 203 allow list
Add Access To Printer window, 42 for printer access to forms, 114
Add Local Printer window, 37 for user access to forms, 114
adding for user access to printers, 76
access to remote printers, 42
Index-664 System Administration Guide, Volume II ♦ October 1998
alphanumeric terminal, , see terminal, deleting, 428, 429
anonymous ftp accounts, 183, 185 described, 363, 364
application threads, 468, 469 displaying, 427, 428
ASCII file displaying queue of, 427
file content type of, 26 location of, 364
ASET CKLISTPATH_level variable, 348 submitting, 425
aset command, 245 verifying, 427
-d option, 350 [Link] file, 413, 425, 429, 430
-n option, 335 /atjobs directory, 364, 413, 415
-p option, 351 atq command, 427
initiating ASET sessions, 332 atrun command, 364
running ASET interactively, 350 audio devices, 248
running ASET periodically, 351 auth facility, 573
stop running periodically, 352 authentication
ASET environment file asetenv not found defined, 258
message, 354 DH, 305, 315
ASET error messages, 354 KERB, 309, 315
ASET task list TASKLIST undefined network security, 258, 260
message, 354 remote logins using ftp, 183, 185
ASET working directory $ASETDIR missing remote logins using rlogin, 172, 175, 182
message, 354 /etc/[Link] file, 174
ASET, , see Automated Security Enhancement .rhosts files, 175
Tool (ASET)\x0d, direct vs. indirect logins, 177
[Link] utility, 343 network vs. remote system
aset: invalid/undefined security level authentication, 172, 174, 177
message, 354 types, 258
ASETDIR variable, 344, 345 authorization
asetenv file defined, 258
described, 340 network security, 258, 260
error messages, 354 types, 258
modifying, 340 AUTH_DH authentication, 314
running ASET periodically, 351 AUTH_DH client-server session, 305, 308
ASETSECLEVEL variable additional transaction, 308
described, 344 client authenticates server, 308
setting security levels, 345 contacting the server, 306
asterisk (*) decrypting the conversation key, 307
in crontab file, 416 generating public and secret keys, 305
wildcard character, 348 generating the conversation key, 306
at command, 363, 425, 426, 430 running keylogin, 305
-l option (list), 427, 428 storing information on the server, 307
-m option (mail), 426 verifier returned to client, 307
automatic scheduling of, 415 AUTH_KERB authentication, 315
controlling access to, 413, 425, 429, 430 Automated Security Enhancement Tool
error messages, 430 (ASET), 331, 349, 354
overview, 363, 364, 413, 425, 476 automatic accounting, 434
quitting, 363 automatic quota turn on, 362, 397
at job files, 425, 429
creating, 426, 427
Index-665
automatic system activity data collection, 528, caches
531 buffer cache, 476, 508, 509, 530, 545
automatic system activity reporting, 528, 529 directory name lookup cache, 476, 477,
automatic system event execution 508, 545
repetitive events, 362, 413, 422, 424 cancel command, 85
single events, 363, 413, 425, 426, 430 canceling
print requests, 85
by disabling printer, 84
B
for specific user, 86
background processing, 253 remote logins, 172
backup files, 363, 426, 427 cartridges, , see font cartridges,
banner option, 69 catman database, 363
banner pages centralized
making optional, 69 print administration, 7
nothing else prints, 619 print configuration, 17
reasons to turn off, 68 CERT/CC, , see Computer Emergency
setting Response Team/Coordination
with Admintool, 22, 68 Center (CERT/CC)\x0d,
with lpadmin command, 68, 69 changing
with nobanner variable, 70 /etc/system file, 371, 375, 378
troubleshooting incorrect output, 600 crontab files, 417, 418
turning off, 70 date, 371, 373, 374
baud settings, 600 forms paper, 109
bidirectional modem service, 202, 228 kernel parameter values, 544
billing users, 437, 446, 450 message of the day, 374, 375
/bin directory, 470, 484 number of lock requests, 371
bin login account, 253 number of processes per user, 371, 375, 376
block devices number of pseudo-ttys, 371, 376
checking activity, 530 number of shared memory segments, 371,
booting 377
displaying messages generated priority, 490 to 492, 495
during, 571 real-time processes, 554, 556
running sadc command when, 528 timesharing processes, 492, 494, 495
Bourne shell priority of print requests, 79, 89
ASET working directory specification, 345 quotas for individual users, 408, 409
Browse menu (Admintool), 36 scheduling classes, 493, 494, 552
buffer cache soft limit time, 407, 408
checking activity, 508, 509, 530 time, 371, 373
overview, 476 character sets
setting maximum memory usage for, 545 hardware, 92, 93
bufhwm parameter, 545 managing, 92, 99
bye command, 184, 186 number, 92
selectable, 92, 93
C software, 92
C shell characters transferred
ASET working directory specification, 345 read/write system calls, 452, 454, 510
cable pin configuration, 604 terminal I/O, 526
Index-667
procedure following, 568, 587 verifying existence of, 419
rebooting fails after, 585 crypt command, 252
saving crash dump information, 577 csh program, 297, 298
saving other system information, 571 .cshrc file, 250
creating [Link] file, 456, 459
at jobs, 426, 427 ctmp file, 459
crontab files, 417, 418 current user, 192
directories on remote system, 184 customer service, 568, 578
form definitions, 147 customizing
forms, 144 exit codes, printer, 130
print filters, 133, 142 LP print service, 10, 121, 149
cred database, 305, 311 printer interface program, 128, 131
cred table stty modes, 129
information stored by server, 307 system logging, 572
credentials, 484
described, 306
D
cron daemon, 364, 415
[Link] file, 421 to 424 daemon facility, 573
[Link] file, 421, 423 daemon login account, 253
crontab command, 363, 422 daemons
accounting commands run by, 433, 436 keyserv, 310
controlling access to, 421, 422, 424 lpd, 612
denying access, 421, 423 lpsched, 160, 163, 168
limiting access to specific users, 422 to print, 152
424 daily accounting, 445, 461
overview, 413, 421, 422 reports, 447, 454
cron daemon and, 415 daily command summary, 451, 452,
-e option (edit), 417, 418 456, 459 to 461
-l option (list), 419, 420 daily report (tty line utilization), 448,
-r option (remove), 420, 421 449
/var/adm maintenance and, 571 daily usage report, 449, 450
daily tasks, 363 last login report, 453
error messages, 424 overview, 447
files used by, 415 step-by-step summary of, 445, 447
overview, 363, 413 daily tasks (scheduling with crontab), 363
quitting without saving changes, 418 Data Encryption Standard, , see DES,
scheduling of, 415 date
/crontab directory, 413, 415, 417 changing, 371, 373
crontab files displaying, 367, 370
creating, 417, 418 synchronizing with another system, 371,
deleting, 420, 421 373
described, 415, 416 date command
displaying, 419, 420 accounting data and, 444, 445
editing, 417, 418 described, 367, 370, 371
location of, 415 daytacct file, 450, 456, 459, 461
running ASET periodically, 332 deadfiles file, 391
stop running ASET periodically, 352 deadlock avoidance, 549
syntax, 416
Index-668 System Administration Guide, Volume II ♦ October 1998
decrypting destination printer, 67
conversation key, 307 /dev/term/a, 23
secret key, 305 /dev/term/b, 23
default printer device drivers, 515
ability to set with Admintool, 22 device interrupts, 498, 502, 526, 527
setting with Admintool, 67 devices
setting with lpadmin command, 67, 68 system device access control, 248, 300
defaults, 545, 557 df command, 381, 506, 507
ACL entries for directories, 282 -F option (unmounted file systems), 381,
[Link] file, 429 383
[Link] file, 422 -g option (statvfs structure), 381
crontab files, 415 -k option (kilobytes), 381, 383, 506, 507
/etc/[Link] file, 330 -t option (total blocks), 381, 383
maxusers parameter, 476 examples, 382, 506, 507
message of the day, 375 overview, 381, 506
nice number, 495 dfstab file, 260
priority levels, 472, 473 DH authentication, 305
real-time parameter table, 561 AUTH_DH client-server session, 305, 308
scheduling classes, 491, 553 mounting files, 314
soft limit time, 407, 408 sharing files, 314
time slices, 558 DH security
timesharing parameter table, 559 for an NIS client, 312
defining for an NIS+ client, 311
font cartridges, 94 dial-in modem service, 202
print wheels, 94 dial-out modem service, 202
printer characteristics, 66 dial-up passwords, 295, 298
delete command, 184 basic sequence, 296
deleting /etc/dialups file, 296
access to printers, 60 /etc/d_passwd file, 296 to 298
ACL entries, 252, 287 disabling dial-up logins temporarily, 300
at jobs, 428, 429 dialups file
backup files, 363, 426, 427 creating, 298
core files, 393 described, 296
crash dump files, 393 diff utility (ASET), 339
crontab files, 420, 421 direct printing, 26, 27
.rhosts files, 175 direct remote logins
directories on remote system, 184 indirect logins vs.
files from remote directories, 184 rlogin, 176, 177
forms, 108 using rlogin, 181, 182
log files, 418 directio command, 473
old/inactive files, 363, 389, 394, 418 directories
print filters, 103 abbreviated pathnames, 191, 192
temporary files, 392 ACL entries, 282
deny list
for printer access to forms, 114
for user access to forms, 114
for user access to printers, 76
DES encryption, 304
Index-669
ASET files, 332 displaying information about, 503, 511,
checklist task (CKLISTPATH) 512
setting, 341, 347 basic activity statistics, 498, 503, 511,
master files, 339 512
reports, 337 df command, 381, 506
working directory, 345, 350 directory sizes, 387, 389
current working directory for extended activity statistics, 505
processes, 470, 484 file sizes, 384, 385, 387, 389
displaying files and related free disk space, 381, 506
information, 251, 267, 268 iostat command, 473, 503
displaying information about, 384, 385, mount point, 383, 506
387, 389 overview, 473
ftp commands, 184 sar command, 511, 512
permissions UFS file system user allocation, 388,
defaults, 267 389
described, 264 vmstat command, 498
public directories, 266 file system usage, 381, 473, 506
remote copying, 193 finding and deleting old/inactive
setgid permissions, 266 files, 389, 394, 418, 426, 427
size of, 387, 389 finding files exceeding a size limit, 386
sticky bit permissions, 266 finding large files, 385, 386
temporary, clearing out, 389, 392 fragmentation of, 473
working directory, 192 optimizing, 381, 394
directory name lookup cache, 476, 477, 508, overview, 473
545 slowdowns
disable command, 81, 84 avoiding, 473
disabling, 245 checking for, 523
dial-up logins temporarily, 300 defined, 473
printers, 61, 84 space
quotas for individual users, 409, 410 amount of free, 381, 506
user logins, 293 optimizing usage, 381, 394
disk accounting, 444 to 446, 450 disk space for print queue, 20
disk drives DiskSuite, 473
described, 473 disktacct file, 445, 446, 456, 459
[Link] file, 456
diskusg command, 444, 445
dispadmin command
overview, 490
real-time parameter table display, 561, 562
rebooting and, 555
timesharing parameter table display, 559
dispatch activity, 518, 519, 530
displaying, 498
acct.h format files, 454
ACL entries, 252, 288
ASET task status, 333, 336
at jobs, 427, 428
Index-673
ACL entries searching .rhosts files, 179
adding or modifying, 286 finding
checking, 285 files exceeding a size limit, 386
deleting, 252, 287 large files, 385
displaying, 252, 288 old/inactive files, 389, 394, 418, 427
setting, 283, 285 finding and deleting, old/inactive files, 427
valid entries, 281 firewall systems
administration commands, 251 ASET setup, 258, 335
ASET checks, 333, 334 described, 250, 257
ownership packet smashing, 258
changing, 251 trusted hosts, 258
setgid permission and, 266 [Link] file, 335, 337, 338
setuid permission and, 265 /fiscal directory, 459, 461
permissions fiscrptn file, 461
absolute mode, 271, 274 font cartridges, 93
changing, 251, 271, 277 alerts for mounting, 94, 96
defaults, 267 defining, 94
described, 264 mounting, 95
setgid, 266 naming, 93
setuid, 265 unmounting, 95
sticky bit, 266 fonts
symbolic mode, 271, 272, 276, 277 downloaded PostScript, 118
umask setting, 267 downloading, 116, 117, 620
security, 251, 263, 280 host-resident, 116, 117
access restriction, 249 installing, 118
ACLs (access control lists), 252, 280 managing, 115
changing ownership, 269, 271 permanently downloaded, 116
changing permissions, 271, 277 PostScript, 115
directory permissions, 264 printer-resident, 116
displaying file information, 251, 267, styles, 92
269 forcing programs to quit, 587
encryption, 252 forms
file permissions, 264 adding, 105, 107
file types, 268 alerts for mounting, 106
overview, 247 allowing user access, 113
special file permissions, 266, 272, 278 changing, 105
umask default, 267 controlling access to, 107
user classes, 264 creating, 144
sharing files, 260 default values for, 145, 146
system logins, 253 definition, creating, 147
files entry in [Link] file, 253 deleting, 105, 108
filtering, 26 denying user access, 113
printing without, 26 displaying attributes of, 106
filters, 100 limiting printer access to, 114
download, 116, 117 limiting user access to, 113
find command, 386, 389, 391, 393 managing, 105
finding files with setuid permissions, 277, mounting, 106, 108
278
Index-674 System Administration Guide, Volume II ♦ October 1998
paper (loading and removing), 109 construction of, 556
printer access required for, 108 defined, 490
setting alerts for mounting, 110 displaying, 491, 556
tracking forms mounted, 106 initial, 556
unmounting, 108 maximum, 557
viewing status of, 113 real-time processes, 555, 562
fragmentation, 473 scheduler and, 552, 555, 556
frame buffers, 248 system processes, 555
free list, 498 timesharing processes, 556, 560
freeing memory, 476, 513, 514, 530 group 14, 35
freemem parameter, 549 group ACL entries
fsck command, 363 default entries for directories, 282
fsflush command, 549 described, 281
fstat information, 470, 484, 486 setting, 283, 285
ftp command group identifier numbers (GIDs), 253
authenticating remote logins, 183 groups
authentication, 258 ASET check, 334
described, 184 changing file ownership, 270
interrupting logins, 172
opening remote system connections, 185
H
remote logins compared to rlogin and
rcp, 183 hard disk
ftp command interpreter, 184 recommended for print server, 21
ftp sessions, 169 held signals, 470, 484
anonymous ftp accounts, 183, 185 help command, 184
authenticating remote logins, 183 hex+symbolic stack trace, 470
closing remote system connections, 186 high ASET security level, 332
commands, 184 history log (print requests), 154
copying files hog factor
from remote system, 186 reporting on, 452, 454
to remote system, 188 holidays file, 435, 436, 450
opening remote system connections, 185 host-resident fonts
remote logins compared to rlogin and downloading, 117
rcp, 183 PostScript, 118
hostid command, 367, 369
hosts
G checking response of, 534
get command in /etc/[Link] file, 174
copying from remote systems, 186 sending packets to, 534, 535
described, 184 trusted hosts, 258
example, 187 [Link] file, 174
getfacl command
described, 252
I
displaying ACL entries, 288
examples, 288 I/O (input/output) devices
verifying ACLs set on files, 284 described, 468
getty, 203 I/O, direct, 473
global priorities
Index-675
I/O-intensive processes, 476 acquiring a ticket for root, 315
ICMP protocol, 537 destroying tickets, 318
idle mode (CPU), 500, 503, 522 logging into, 316
igets command Kerberos authentication, 308
with page flushes, 514 implementing, 309
number of requests for inodes not in sharing file systems with, 315
directory name lookup kern facility, 573
table, 508 kernel
IGMP protocol, 537 buffer cache and, 476
indirect remote logins, 176, 177 memory allocation for, 515, 516, 530
init process, 444, 445, 552, 556 module variable setting, 544, 545
init program, 226 paging and, 475
initializing quotas, 398, 402 parameters
inode table buffer cache, 545
size of, 476, 545 changing value of, 544
status of, 523, 524 IPC, 546
inodes, 508, 513, 514 kernel-mode parameter table, 563
installing memory management, 548, 550
local printers, 38 miscellaneous, 550
PostScript fonts, 118 overview, 476, 477
interactive scheduler configuration, 556, 558
commands for restore, 589 STREAMS, 546
interactive processes, 473 tuning, 548, 550, 556, 558
interactively running ASET, 350 UFS, 476, 477, 545
interface program (printer) system process priority and, 473
customizing, 128, 131 Kernel Memory Allocator, 515, 516, 530
standard, 132 kernel thread
Internet firewall setup, 250 displaying information on, 520, 521, 525
interprocess communication scheduling and, 482, 551
checking, 517, 530 structures, 469, 482
increasing shared memory, 377 kernel-mode parameter table, 563
parameters, 546 /kernel/sched directory, 553, 554, 558
tuning parameters, 548 key distribution center, 309
interrupting programs, 587 key, how to create for an NIS user, 313
interrupting remote logins, 172 keyboards, 248
interrupts, 498, 502, 526, 527 keylogin command, 311, 312
iostat command, 503 running, 305
basic information display, 503, 504 keyserv daemon, verifying, 310
-xtc option (extended), 504, 505 keyserver, starting, 310
overview, 473, 503 kill command, 472, 489
IP routing table, 538 killing processes, 470, 472, 489
kilobytes
file system disk usage in, 506
K
read/write statistics in, 505
KDC, , see key distribution center, kinit command, 308, 309, 316
kdestroy command, 308, 309, 318 klwp structure, 469
kerbd, 309 Korn shell
Kerberos, 308
Index-677
LP commands, 624 lpset command, 6
lp login account, 253 ls command, 384, 385, 390
LP print service -l option (size in bytes), 384, 385
checking basic functions of, 610, 606 -s option (size in blocks), 384, 385
configuration files in, 150 -t option (newest files), 390
customizing, 10, 121, 147 LWPs (lightweight processes)
daemons, 152 defined, 468
defined, 149 displaying information on, 470, 501, 520,
defining printer characteristics to, 18 525
directories in, 150 kernel stack size for, 550
files used by, 152 processes and, 468, 469
hung LP commands, 624 structures for, 469
interface program, 163 swapping, 475, 520, 525
log files, 153, 599
overview of, 10, 149
M
structure of, 150
tracking forms, 106 madvise command, 476
tracking print wheels, 94 mail facility, 573
troubleshooting, 599, 601 mask ACL entries
LP print service, see print scheduler default entries for directories, 282
scheduler,, described, 281
LP print spooler, 53 setting, 283, 285
lpadmin command master files (ASET), 333, 339
adding printer description with, 66 maxclsyspri parameter, 557
adjusting printer port characteristics maximums
with, 123 acctdusg users processed, 445
defining font cartridges with, 94 buffer cache memory, 545
defining print wheels with, 94 finding files exceeding maximum size, 386
defining printer class with, 71 frlocks, 549
limiting access to printers with, 77 global priority, 557
limiting printer access to forms with, 114 inode table size, 476
making banner pages optional with, 69 nice number, 495
mounting font cartridge with, 96 pacct file size, 444
mounting forms with, 109 priority, 491, 557, 558
mounting print wheel with, 96 process size, 476, 477
setting alerts to mount forms with, 110 real-time process priority, 558
setting alerts to mount print wheels user processes per user-id, 476, 477
with, 97 users, 476
setting default printer with, 68 maxuprc parameter, 375, 376, 476, 477
setting printer fault alerts with, 72 maxusers parameter, 476
setting printer fault recovery with, 75 max_nprocs parameter, 476, 477, 544
unmounting forms with, 109 mdelete command, 184
lpd daemon, 612 medium ASET security level, 332
LPDEST environment variable, 68 memory
lpfilter command, 101 deadlock avoidance, 549
lpsched daemon, 160, 163, 168 described, 468
lpsched log file, 163 disk slowdowns and, 473
Index-681
system event monitoring, 500 pmadm command
system tables, 523, 524, 530 adding a ttymon service with, 235
terminal I/O, 503, 526, 528, 530 disabling a ttymon service with, 239
tools for monitoring, 478, 531 enabling a ttymon service with, 238
traps, 498 explained, 226
PERIODIC_SCHEDULE variable listing a ttymon service with, 236
described, 344 pmap command, 470, 484
scheduling ASET, 342, 346, 347, 351 port, 24
permissions, 245 defined, 202
ACLs and, 252, 280 disabling, 219
ASET handling of, 332, 333 initialization process of, 227
changing file permissions, 251 initializing, 218
absolute mode, 271, 274 removing service, 220
symbolic mode, 271, 272, 276, 277 states of (table), 243
copying requirements, 193 port monitor
defaults, 267 defined, 203
directory permissions, 264 states of (table), 242
file permissions ttymon and listen (defined), 203, 228
absolute mode, 271, 274 ports in /etc/dialups file, 296
changing, 271, 277 PostScript fonts, 115, 118
described, 264 installing, 118
special permissions, 266, 272, 278 PostScript printers, 92
symbolic mode, 271, 272, 276, 277 character sets for, 93
setgid permissions default print filters, 101, 102
absolute mode, 272, 276 file content type for, 26
described, 266 printer type for, 25
symbolic mode, 272 PostScript Reverse printer, , see Reverse
setuid permissions PostScript printer,
absolute mode, 272, 276 power cycling, 587
described, 265 power failure recoveries, 448
finding files with permissions set, 277, prdaily command
278 files used by, 459, 460
security risks, 266 line usage reporting and, 461
symbolic mode, 272 overview, 456
special file permissions, 266, 272, 278 runacct command and, 456, 461
sticky bit, 266 print administration, centralized, 7
tune files (ASET), 339, 342 print client
umask settings, 267 checking configuration of, 608
user classes and, 264 defined, 18
pfiles command, 470, 484, 486 deleting access to printers, 60
pflags command, 470, 484 freeing jobs in, 627
physical security, 248 setting up, 42
pin configuration in cables, 604, 605 print client software, 7
ping command, 180, 533, 534 print configuration
pldd command, 470, 484 centralized, 17
plus sign (+) using SunOS 5.7 and 4.1 systems, 18
file permissions symbol, 272 print daemons, 152
/etc/[Link] file syntax, 174
Index-682 System Administration Guide, Volume II ♦ October 1998
print filters IDs, 80
adding, 101 canceling print requests by, 85
bypassing, 619, 620 components of, 85
changing, 100, 101 in banner page, 68
characteristics of, 140 in status of print request, 80
converting file content type, 100 moving print requests by, 88
creating, 100, 133, 142 log, 155
defined, 100, 162 managing, 78, 79
definitions, 136 moving to another printer, 87, 88
deleting, 103 moving to head of queue, 89
displaying definition of, 103 putting on hold, 89
download, 117 rejecting, 61, 81
fast, 117 scheduling, 162
handling special modes, 134 setting printer to accept or reject, 82
managing, 100, 101 print scheduler
not provided in SunOS 5.7, 102 if not running, 606
options keywords, 140, 145 managing, 60
PostScript, 101 restarting, 65
removing, 100, 101 starting, 66, 161
required for printer fault recovery, 74 stopping, 65, 161
requirements for, 135 updating LP system files, 160
restoring, 100, 101 print server
slow, 117 checking access to, 611
templates to define options, 139 checking configuration of, 608
to convert from troff to PostScript, 143 checking connections of, 607
TranScript, 101 defined, 18, 36
types of, 133 deleting printer from, 62
used to convert files, 133 hard disk requirements for, 21
used to put request on hold, 135 setting up, 36, 37
viewing information about, 103 spooling space required for, 20
print forms, , see forms, system resource requirements for, 20
print jobs, , see print requests, print service, , see LP print service,
print management, 3, 10 print spooler (SVR4), 53
print protocol adaptor, 5 print wheels, 93
print queue alerts for mounting, 94, 96
log of, 153 defining, 94
print requests mounting, 95
IDs naming, 93
canceling print requests by, 85, 86 tracking, 94
changing priority of print requests unmounting, 95
using, 90 printcap entry, 616
accepting, 81, 109 printer class, 70
canceling, 85 checking status for, 80
by disabling printer, 84 defining with lpadmin command, 71
for specific user, 86 not valid for enabling/disabling
changing priority of, 79, 89 printer, 84
checking status of, 79 setting, 22
cleaning out from log file, 163
Index-683
printer description faults
ability to set with Admintool, 22 detecting, 134
setting with lpadmin command, 66 messages, 131
printer destination restarting printing, 626
ability to set with Admintool, 22 file content types
setting with Admintool, 67 effect on filtering, 619
setting with lpadmin command, 67 incorrect output, 619
PRINTER environment variable, 68 font cartridges, 92
printer interface program, 163 interface program
printer name, 22 customizing, 128, 131
printer port exit codes, 130
ability to set with Admintool, 22 standard, 129, 132
adjusting characteristics of, 123 local, 18, 33, 164
characteristics, adjusting, 121 adding by using Admintool, 38
configuring, 24 network, 33, 48
enabling multiple ports, 24 non-PostScript, 92, 133
parallel, 23 parity bit, 601
serial, 23 PostScript
printer status, 63 character sets for, 93
printer type treatment of text, 92
ability to set with Admintool, 22 print wheels, 92
defined in terminfo database, 152 rejecting print requests, 82
not in terminfo database, 26 remote, 165
troubleshooting setting of, 618 setting definitions for, 66
printer(s) setting up, 29
accepting print requests, 82 with Admintool, 35, 42
access to settings
deleting, 60 baud, 600
access to forms, 108 parity, 601
administering, 59, 90 return, 601
allow list, 76 stty, 122, 125, 621 to 623, 626
allowing user access, 77 tab, 601
baud settings, 600 status
controlling availability of, 82 checking, 63, 79
default, 68 conflicting messages, 603
deleting, 60, 63 stty settings, 129, 621 to 623, 626
deleting client access to, 60 troubleshooting
deleting from print server, 60, 62 backup in printer queue, 602
deny list, 76 conflicting status messages, 627, 603
denying user access, 77 hung LP commands, 624
description, adding, 66 hung printers, 625, 602
disabling, 61, 81, 84 incorrect output, 618, 600
enabling, 81, 84 incorrect printer type, 618
fault alerts, 72 not accepting requests, 607
fault notification, 71 only banner page prints, 619
print service commands, 601
unsupported, 124
Index-685
fstat and fcntl information for open system
files, 470, 484, 486 described, 472
init, 444, 552, 556 priority of, 472, 473, 552, 553, 555, 557
interactive, 473 real-time processes and, 552
killing, 472, 489 scheduling policies for, 553, 555
libraries linked into, 470, 484 timesharing processes and, 552
maximum size of, 476, 477 terminology, 468, 469
maximum user processes per user-id, 476, timing, 484
477 tool commands, 470, 484
nice number of, 482, 494 to 496 tracing flags, 470, 484
number per user, 371, 375, 376, 476, 477 trees, 470, 484, 486
priority, 472, 495 troubleshooting, 496
changing, 490 to 492, 495 UNIX, priority of, 472
changing real-time process waiting for, 487, 560
priority, 554, 556 processing printing, 81
changing timesharing process processors, allocating groups for
priority, 492, 494, 495 applications, 470
defaults, 472, 473 PROCFS (process file system), 470
designating, 491, 492 .profile file, 250
displaying information on, 482, 491 programs
global priorities, 490, 491, 552, 555 to disk-dependency of, 508
557, 560, 562 forcing to quit running, 587
maximums, 491, 557, 558 interrupting, 587
overview, 472, 490, 495 protection page faults, 518
scheduling classes and, 472, 473, 490 prtconf command, 367, 370
to 492, 551 prun command, 487
user-mode priority, 490 ps command, 482, 484
restarting, 470, 487 fields in reports from, 482, 495, 496
runaway, 496 overview, 482
scheduling classes, 472, 473, 490, 495 -c option (scheduling class), 482, 496
changing, 493, 494, 552 -ecl option (global priority), 491
changing priority of, 490 to 492, 495 -ef option (full information), 471, 483
defaults, 491 -elf option (page daemon cycles), 513
described, 472, 473 PS printer type, 25
designating, 491, 492 pseudo-ttys
displaying information on, 482, 490, changing number of, 371, 376
491 number configured, 550
priority levels and, 472, 473, 490 to psig command, 470, 484
492, 551 PSR printer type, 25
scheduling policies and, 472, 473, 552, psrset command, 470
553 pstack command, 470, 484
types of, 472, 473 pstop command, 487
signal actions, 470, 484 [Link] file, 458
sleeping, 553, 560, 563 ptime command, 484
stack trace, 470, 484 ptree command, 470, 484, 486
stopping temporarily, 470, 487 pt_cnt parameter, 376, 550
structures for, 469, 482 public directories, 266
Index-687
real-time parameter table, 561, 562 finding who is logged in, 181
default, 561 ftp commands, 184
fields, 562 interrupting, 172
overview, 554, 558 linking logins, 175
sample, 561 nuucp login account, 253
scheduler configuration changes and, 555 opening ftp connection, 185
real-time processes removing .rhosts files, 179
changing class of, 493, 494 using rlogin, 181, 182
described, 472 verifying remote system operation, 180
overview, 472, 473 remote printing
priority of diagram of process, 165
changing, 554, 556 user fee calculation for, 437
global, 555, 562 remote systems, 172
initial, 556 communication methods, 183
maximum, 558 defined, 172
overview, 472, 473, 552, 554 logging in, 172, 186
parameters controlling, 562 authentication, 258
specifying relative, 491 authorization, 258
scheduling policies for, 554, 555 nuucp login account, 253
system processes and, 552 logging out (exit), 183
timesharing processes and, 552, 554 remote copying
rebooting using ftp, 184
fails after crash, 585 using rcp, 191, 197
monitoring, 443 to 445, 448, 456 verifying operation, 180
reboots file, 456, 459 removing form paper, 109
receiver hardware interrupts, 526, 527 repetitive system events, 363, 413, 422, 424
recognizing network access problems, 595 replayed transactions, 307
reject command, 82 reporting
rejecting, 81 automatic, 528, 529
rejecting print requests, 61, 82 reports
remote copying, 169 ASET, 337 to 339
using ftp, 184 reports (ASET), 337, 338, 344
using rcp, 191, 197 reports directory, 337
remote ftp server, 184 repquota command, 403, 405
remote login and security, 307 requests log, 163
remote logins reset command, 184
authentication, 258 residentfonts file, 118
authentication (ftp), 183 restarting
authentication (rlogin), 172, 175 lpd daemon, 613
network authentication vs. remote print scheduler, 65
system authentication, 172, processes, 470, 487
174 runacct command, 440, 456, 458
/etc/[Link] file, 174 restore
.rhosts files, 175 interactive commands, 589
authorization, 258 using matching commands, 589
closing ftp connection, 186 restoring (ASET), 343
direct vs. indirect (rlogin), 176, 177 restoring file systems, 437, 450
domains, 172
Index-688 System Administration Guide, Volume II ♦ October 1998
restricted shell (rsh), 255 failure of, 439
return settings, 601 files used/produced by, 458, 459, 461
Reverse PostScript printer fixing corrupted files, 438, 456
file content type for, 27 last time executed, 459
method of printing, 26 monacct command and, 456
printer type for, 25 to 27 overview, 446, 456
.rhosts files prdaily command and, 456, 461
remote system authentication process, 173 progress file, 456
to 176, 179 restarting, 440, 456, 458
rlogin command running after midnight, 456
authentication, 172, 175, 258 scheduling running of, 433
network vs. remote system serial use of, 459
authentication, 172, 173 states of, 456
/etc/[Link] file, 174 user fee calculation and, 437, 450
.rhosts files, 175 [Link] command, 456
compared to ftp, 183 runaway processes, 496
described, 172 running, , see starting\x0d,
direct vs. indirect logins, 176, 177 rusers command, 181
interrupting logins, 172
process after logging in, 178, 179
S
using, 181, 182
rm command, 175, 391, 392 sa filename prefix, 529 to 531
root access sa1 command, 528, 529
displaying attempts on console, 301, 302 sa2 command, 528, 529
monitoring su command use, 256, 301 SAC, , see Service Access Controller,
restricting, 260, 300 sacadm command
root file, 414, 415, 435, 444 adding a ttymon port monitor with, 231
root login disabling a ttymon port monitor with, 233
account enabling a ttymon port monitor with, 234
access restrictions, 300 (explained), 225
described, 253 killing a ttymon port monitor with, 233
restricting to console, 300 listing a ttymon port monitor with, 231
tracking, 256 removing a ttymon port monitor with, 234
RPC, 539, 540 starting a ttymon port monitor with, 233
[Link] file, 447, 460, 461 sadc command, 528, 529, 531
[Link] file, 456 sadcnt parameter, 546
RS-232-C, , see serial port, sadd file, 529 to 531
rsh program, 255 SAF, , see Service Access Facility,
RT_DPTBL loadable module, 554, 555, 558, 561 sar command, 507, 528, 529, 531
rt_dptbl parameter table, 554, 555, 558, 561, options listed, 530, 531
562 overview, 473, 507, 529
rt_maxpri parameter, 558 -a option (file access), 507, 508
runacct command, 456, 461 -A option (overall performance), 528, 530
caution, 458 -a option (file access), 530
crontab entry that runs, 456 -b option (buffers), 508, 509, 530
diagnostics file, 456 -c option (system calls), 510, 530
error messages, 439 -d option (block devices), 511, 512, 530
error protection, 456
Index-689
-e option (ending time), 530 designating, 491, 492
-f option (file to extract data from), 530 displaying information on, 482, 490, 491
-g option (page-out/memory freeing), 513, priority levels and, 472, 473, 490 to 492,
514, 530 551, 552
-i option (interval), 530 scheduling policies and, 472, 473, 552, 553
-k option (kernel memory), 515, 516, 530 types of, 472, 473
-m option (interprocess scheduling one-time system events, 363, 413,
communication), 517, 530 425, 426, 430
-p option (page-in/page faults), 518, 519, scheduling repetitive system events, 363, 413,
530 422, 424
-q option (queue), 520, 521, 530 SCSI disk drives, 513
-r option (unused memory), 521, 522, 530 search path
-s option (starting time), 530 files for setting, 592
-u option (CPU usage), 522, 523, 530 searching
-v option (system tables), 523, 524, 530 files with setuid permissions, 277, 278
-w option (swapping/switching .rhosts files, 179
volume), 525, 526, 530 users logged in to remote system, 181
-y option (terminal activity), 530 secret key
saving changing, 305
crash dump information, 577 database, 305
failed login attempts, 294, 295 decrypting, 305
Schedule undefined for periodic invocation generating, 305
message, 354 secure access, 314
scheduler, 551, 563 secure NIS+, adding a user, 312
activation, 552 Secure RPC, 304
configuration of, 554, 563 implementation of, 305
global priorities and, 552, 555, 556 Secure RPC authentication, 258
overview, 551, 552 security, 169
scheduling classes and, 551 to 553 at command, 425
time slices used by, 553, 558, 560 copy operation issues, 191
tunable parameters, 556, 558 crontab command, 422
scheduler, , see print scheduler, DH authentication
scheduling ASET execution AUTH_DH client-server session, 305,
(PERIODIC_SCHEDULE), 332, 308
342, 346, 347, 351 /etc/[Link] file issues, 174
scheduling class tables, 558, 563 .rhosts file issues, 175, 179
maxclsyspri parameter and, 557 selectable character sets, 92, 93, 98, 99
overview, 558 seminfo_xxxxxx parameters, 377, 548
rt_dptbl parameter table, 554, 555, 558, serial port
561, 562 adapter board, 203
rt_maxpri parameter and, 558 defined, 202
ts_dptbl parameter table, 553, 555, 558, 560 Serial Port Manager, 204
ts_kmdpris table, 558, 563 Modify window field descriptions, 208
scheduling classes, 472, 473, 490, 495 prerequisites for running, 213
changing, 493, 494, 552 starting, 213
changing priority of, 490 to 492, 495 when to use, 204
defaults, 491, 553 serial printer, adding to system, 23
described, 472, 473
Index-690 System Administration Guide, Volume II ♦ October 1998
servers share command, 260
AUTH_DH client-server session, 305, 308 shared memory
displaying information about, 533, 540, increasing number of segments, 371, 377
542 interprocess communication
scheduling policies and, 553 parameters, 548
tracing client calls to, 533, 536 process virtual memory, 469
Service Access Controller, 225 shared memory record table, 523, 524
Service Access Facility sharing files (network security), 260
description, 204 shell, 452
files associated with (table), 239 shell programs, 245
overview of, 206, 223 ASET security level specification, 345
programs associated with (table), 224 ASET working directory specification, 345
services controlled by /etc/d_passwd file entries, 297, 298
states of (table), 242 shminfo_xxxxxx parameters, 377, 548
uses for, 206, 223 showing, , see displaying\x0d,
when to use, 204 shutacct command, 446, 447
service times, 505, 512 shutdown command, 447
set-group identification permissions, , see shutdowns, 446 to 448
setgid permissions\x0d, signal actions, 470, 484
set-user identification permissions, , see setuid simple file content type, 26
permissions\x0d, size
setenv command directory, 387, 389
ASET security level specification, 345 file, 384, 385, 387, 389
ASET working directory specification, 345 system table, 523, 524
setfacl command sleeping processes, 553, 560, 563
adding ACL entries, 286 slow print filters, 117
deleting ACL entries, 287 snoop command, 533, 536
described, 252 soft limit time
examples, 284, 287 changing, 407, 408
modifying ACL entries, 286 exceeding, 407
setting ACL entries, 283, 285 software administration
syntax, 283 adding packages
setgid permissions troubleshooting, 661
absolute mode, 272, 276 removing packages
described, 266 troubleshooting, 661
symbolic mode, 272 troubleshooting, 661
setting software locks, 518
alerts to mount font cartridges, 96 Solaris environment, 18
alerts to mount print wheels, 96 Solstice AdminSuite software, 258
alias for selectable character set, 98, 99 Solstice DiskSuite, 473
setuid permissions Solstice Printer Manager, 7
absolute mode, 272, 276 [Link] file, 456, 458
described, 265 space (disk)
finding files with permissions set, 278 amount of free, 381, 506
security risks, 266 optimizing usage, 381, 394
symbolic mode, 272 spooling directory
setuid programs, 250 creating for a printer, 616
sh program, 297, 298
Index-691
print service, 157 su file
spooling space required for print server, 20 displaying su command use on
spray command, 533 to 535 console, 301, 302
stack trace, 470, 484 monitoring su command, 301
standard printer interface program, 132 sulog file, 256, 301
starting SunOS 5.7, 18
Admintool, 35 SunOS operating systems, 18
ASET SVR4 LP print spooler, 53
initiating sessions from shell, 332 swap areas
running interactively, 350 adding, 475
lpd daemon, 612 defined, 475
print scheduler, 66 displaying information on, 498, 521, 522
startup command, 445 unused disk blocks, 521, 522
statefile file, 440, 456, 459 swapping
states, (runacct command), 456 defined, 475
status displaying information on, 501, 520, 522,
of print requests, 79 525, 526, 530
of printer, 63, 79 LWPs, 475, 520, 525
statvfs structure, 381 minimum memory to avoid deadlock, 549
sticky bit permissions priority of, 472
absolute mode, 272, 276 reducing, 473
described, 266 switching
symbolic mode, 272 displaying information on, 525, 526, 530
stopping symbolic links
dial-up logins temporarily, 300 file permissions, 264
ftp command interpreter, 184 latest directory (ASET), 337
print scheduler, 65 symbolic mode
printer, 81 changing file permissions, 272, 276, 277
processes temporarily, 470, 487 described, 271
strctlsz parameter, 546 synchronizing command-reply sequencing
STREAMS with remote ftp server, 184
KMA resources and, 515 synchronizing date and time with another
parameters, 546 system, 373
strmsgsz parameter, 546 syntax (crontab files), 416
strthresh parameter, 546 sys file, 415, 529, 531
structures sys login account, 253
process, 469, 482 sysadmin group, 35
quota, 476, 477 [Link] file, 334, 337, 338
statvfs, 381 sysdef command, 543
stty option, 123 [Link] file, 572
stty settings syslogd daemon, 571
customizing, 129 system activities
defaults, 122, 125, 621, 622 automatic collection of data on, 528, 531
suggestions for, 623, 626 list of activities tracked, 477
troubleshooting, 600 manual collection of data on, 507, 528,
su command 529, 531
displaying use on console, 301, 302
monitoring use, 256, 301
Index-692 System Administration Guide, Volume II ♦ October 1998
system authentication for remote logins, 172, special logins, 253, 254
173, 177 su command monitoring, 256, 301
system calls system tables
displaying information on, 498, 510, 530 checking status, 524, 530
system events space allocation for, 476
displaying information on, 500 sys_name parameter, 557
scheduling
one-time events, 363, 413, 425, 426,
T
430
repetitive events, 363, 413, 422, 424 tab settings, 601
system exit status, 454 tacct file, 439, 456, 460, 461
system logging (customizing), 572 [Link] file, 439, 456, 460
system messages [Link] file, 439
specifying storage location for, 571 tacctn file, 461
system mode (CPU), 500, 503, 522 tacctprev file, 460
system processes TASKS variable
described, 472 configuring ASET, 341, 347
priority of, 472, 473, 552, 553, 555, 557 described, 344
real-time processes and, 552 error messages, 354
scheduling policies for, 553, 555 taskstat utility (ASET), 333, 336
timesharing processes and, 552 TCP protocol, 537
system resources TCP/IP traffic, 533, 536, 537
allocating for print server, 20 technical support, 568, 578
critical, 563 templates (print filters), 139
monitoring, 362, 426 temporary directories, 389, 392
accounting, 433, 440, 443 terminal
accounting system for, 461 alphanumeric, 202
automatic, 363, 426 defined, 202
crashes, 572, 587 distinctions between types of, 202
quotas, 395, 405 terminal characteristics, 129
overview, 467, 476 terminals
system security, 252, 291, 301 displaying I/O information for, 503, 526,
dial-up passwords, 295, 298 528, 530
basic sequence, 296 line usage monitoring, 443, 444, 448, 449,
disabling dial-up logins 456, 459, 461
temporarily, 300 menu items in Serial Port Manager, 210
/etc/dialups file, 296 overview of Serial Port Manager, 207
/etc/d_passwd file, 296 to 298 process controlling, 482
displaying setting up, 214
user’s login status, 291, 292 tools for managing, 204
users with no passwords, 293 troubleshooting bad lines, 449, 461
login access restrictions, 253 terminfo database
overview, 247, 252 character set names, 92
passwords, 254 terminfo entry
restricted shell, 255 adding, 124
restricting root login to console, 300 for unsupported printer, 127
root access restrictions, 260, 300 list of required items, 124, 125
saving failed login attempts, 294, 295
Index-693
selectable character sets in, 92 total command summary, 447, 453, 460, 461
testing packet reliability, 533 TOTAL REAL-MIN column (daily command
tilde (~) summary), 452
abbreviated pathnames, 191, 192 tracing flags, 470, 484
rcp command syntax, 194, 197 TranScript filters, 101
time translation page faults, 518
changing, 371, 373 transmitter hardware interrupts, 526, 527
CPU usage, 450, 482, 496, 498, 503, 522, traps, 498
523, 530 trees, 470, 484, 486
disk slowdowns, 473, 523 troff filter to convert to PostScript, 143
displaying, 367, 370 Trojan horse, 249, 250
process timing, 484 troubleshooting, 601
processes accumulating large amounts of networks, 539, 542
CPU time, 496 printing problems, 597, 628
service, 505, 512 processes, 450, 496, 497
soft limit, 407, 408 software package
synchronizing with another system, 371, installation/removal, 661
373 tty lines, 449, 461
time slices, 553, 558, 560 trusted hosts, 258
timesharing parameter table, 558, 560 trusting network environment
default, 559 remote login
fields, 560 authentication process, 173
overview, 553, 558, 559 process after logging in, 178, 179
sample, 559 TS_DPTBL loadable module, 553, 555, 557,
scheduler configuration changes and, 555 558, 563
timesharing processes ts_dptbl parameter table, 553, 555, 558, 560
changing scheduling parameters, 492 ts_kmdpris parameter table, 558, 563
described, 472 ts_maxupri parameter, 557
overview, 473 tty lines
priority of displaying I/O information for, 503, 526,
changing, 492, 494, 495 528, 530
global, 555, 560 troubleshooting bad lines, 449, 461
overview, 472, 473, 490, 552 usage monitoring, 443, 444, 448, 449, 456,
parameters controlling, 560 459, 461
range of, 490, 557 ttyadm command, 230
real-time processes and, 552, 554 ttymon command, 228, 444
scheduling policies for, 472, 473, 552, 553, ttymon port monitor
555 adding, 231
sleeping, 560, 563 bidirectional modem service and, 228
system processes and, 552 disabling, 233
/tmp directory, clearing out, 389, 392 enabling, 234
/tmp file system, 383 (figure), 227
/tmp/[Link] file, 456 killing, 233
tmpfs file system, 266 listing, 231
tmpwtmp file, 456, 459, 461 overview of function of, 226
tools removing, 234
process, 470, 484 starting, 233
system performance monitoring, 478, 531
Index-694 System Administration Guide, Volume II ♦ October 1998
ttymon service UNIX systems (crash information), 577
adding, 235 unmounting
disabling, 239 font cartridges, 95
enabling, 238 forms, 108
listing, 236 print wheels, 95
ttys (pseudo) unsupported printers, 28, 124
changing number of, 371, 376 Usage: aset message, 354
number configured, 550 user
tune files (ASET) access to printer
described, 339, 342 ability to limit with Admintool, 22
example files, 348 limiting with Admintool, 75
format, 348 limiting with lpadmin command, 75
modifying, 342 canceling print requests for, 87
rules, 348 user accounts
[Link] file, 333, 337, 338 ASET check, 334
tune_t_flckrec parameter, 549 displaying login status, 291, 292
tune_t_fsflushr parameter, 549 user ACL entries
tune_t_gpgslo parameter, 549 default entries for directories, 282
tune_t_minarmem parameter, 549 described, 281
tune_t_minasmem parameter, 549 setting, 283, 285
tuning user allocation, 388, 389
daily command summary and, 451 user classes of files, 264
kernel parameters, 548, 550, 556, 558 user facility, 573
turnacct switch command, 446, 456 user fees, 437, 446, 450
turning off user logins
quotas, 398, 410 last login monitoring, 453, 456, 461
turning on number of logins, 450
quotas, 398, 402, 403 time monitoring, 443, 444, 450, 456
user mode (CPU), 499, 503, 522
user names
U
current user, 192
UDP protocol, 537 direct vs. indirect logins (rlogin), 176, 177
UFS file systems finding users logged in to remote
displaying information about system, 181
space usage, 383 user processes
user allocation, 388, 389 changing priority, 494, 495
UFS parameters, 476, 477, 545 CPU usage by, 450
ufs_ninode parameter, 476, 477, 545 in kernel mode, 553
uid_aliases file maximum per user-id, 476, 477
described, 339 number per user, 371, 375, 376
specifying, 342 priority of, 472, 473, 490
UID_ALIASES variable user quotas
aliases file specification, 342, 347 changing for individual users, 408, 409
described, 339, 344 checking for exceeded, 404
umask, 267 disabling for individual users, 409, 410
UMASK environment variable, 335 setting up, 400, 401
uname command, 368, 369 soft limit time, 407
UNIX processes (priority), 472
Index-695
user structure, 469 /var/adm/acct directory, 459
user-mode daemon for kerberos, 309 /var/adm/acct/fiscal directory, 461
user-mode priority, 490 /var/adm/acct/fiscal directory, 459
users (maximum number), 476 /var/adm/acct/nite directory, 459
usr cache name, 502 /var/adm/acct/nite/active file, 439, 456, 459
/usr/adm directory, 568, 571 /var/adm/acct/nite/[Link] file, 456,
/usr/adm/messages file, 568, 572 459
/usr/adm/messages.n file, 571 /var/adm/acct/nite/cms file, 456, 459
/usr/adm/sa directory, 528 /var/adm/acct/nite/[Link] file, 456,
/usr/aset directory, 332 459
/usr/aset/asetenv file /var/adm/acct/nite/ctmp file, 459
described, 340, 351, 354 /var/adm/acct/nite/daycms file, 456, 459,
/usr/aset/masters/tune files 461
described, 339, 342, 348 /var/adm/acct/nite/daytacct file, 450, 456,
/usr/aset/masters/uid_aliases file, 339 459, 461
/usr/aset/reports directory /var/adm/acct/nite/disktacct file, 445, 446,
structure, 336, 337 456, 459
/usr/aset/reports/latest directory, 337 /var/adm/acct/nite/[Link]
/usr/lib/acct/[Link] command, 456 file, 456
/usr/lib/acct/startup command, 445 /var/adm/acct/nite/fd2log file, 439, 456, 459
/usr/lib/lp directory, 101 /var/adm/acct/nite/lastdate file, 456, 459
/usr/lib/lp/model directory, 163 /var/adm/acct/nite/lineuse file, 456, 459, 461
/usr/lib/lp/model/netstandard file, 6 /var/adm/acct/nite/lock file, 439, 456, 459
/usr/lib/lp/postscript directory, 100, 162 /var/adm/acct/nite/lock1 file, 456
/usr/lib/sa/sa1 command, 528, 529 /var/adm/acct/nite/log file, 459
/usr/lib/sa/sa2 command, 528, 529 /var/adm/acct/nite/[Link] file, 459
/usr/lib/sa/sadc command, 528, 529, 531, 533 /var/adm/acct/nite/owtmp file, 460
/usr/proc/bin directory, 470, 484 /var/adm/acct/nite/reboots file, 456, 459
/usr/sbin/crash utility, 570, 581, 582 /var/adm/acct/nite/statefile file, 440, 456,
/usr/spool/cron/atjobs directory, 364 459
[Link] file /var/adm/acct/nite/tmpwtmp file, 456, 459,
described, 334, 337 461
example, 338 /var/adm/acct/nite/[Link] file, 438,
format, 338 456, 460
/usr/sbin/kerbd daemon, 309 /var/adm/acct/nite/wtmperror file, 459
utmp2wtmp command, 456 /var/adm/acct/nite/[Link]
uucico program, 297, 298 file, 459
uucp login account, 253 /var/adm/acct/nite/xwtmp file, 438
UUCP program, 253 /var/adm/acct/sum directory, 446, 459, 460
/var/adm/acct/sum/cms file, 456, 460, 461
/var/adm/acct/sum/cmsprev file, 460
V
/var/adm/acct/sum/daycms file, 456, 460,
validity faults, 518 461
/var partition, 20 /var/adm/acct/sum/loginlog file, 456, 460,
/var/adm directory 461
controlling size of, 391, 458 /var/adm/acct/sum/[Link] file, 446,
controlling size of, 568, 571 461
raw accounting data in, 445
X
xtacct file, 439