JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Printing     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

1.  Introduction to Printing in the Oracle Solaris Operating System

2.  Planning for Printing (Tasks)

3.  Setting Up and Administering Printers by Using CUPS (Tasks)

4.  Setting Up and Administering Printers by Using Print Manager for LP (Tasks)

5.  Setting Up and Administering Printers by Using Oracle Solaris Print Manager (Tasks)

6.  Setting Up Printers by Using LP Print Commands (Tasks)

7.  Administering Printers by Using LP Print Commands (Tasks)

8.  Customizing LP Printing Services and Printers (Tasks)

9.  Administering the LP Print Scheduler and Managing Print Requests (Tasks)

Administering the LP Print Scheduler (Task Map)

Checking Printer Status

How to Check the Status of Printers

Stopping and Restarting the Print Scheduler

How to Stop the Print Scheduler

How to Restart the Print Scheduler

Starting the Print Scheduler With Options

How to Set Print Option Values Only for the Duration of a Call

How to Set Printer Option Values That Remain Over a System Reboot

Administering Print Requests by Using LP Print Commands (Task Map)

How to Check the Status of Print Requests

Enabling or Disabling a Printer From Printing

How to Enable or Disable a Printer

Accepting or Rejecting Print Requests

How to Accept or Reject Print Requests for a Printer

Canceling a Print Request

How to Cancel a Print Request

How to Cancel a Print Request From a Specific User

Moving a Print Request

How to Move Print Requests to Another Printer

Changing the Priority of Print Requests

How to Change the Priority of a Print Request

10.  Administering Printers on a Network (Tasks)

11.  Administering Character Sets, Filters, Forms, and Fonts (Tasks)

12.  Administering Printers by Using the PPD File Management Utility (Tasks)

13.  Printing in the Oracle Solaris Operating System (Reference)

14.  Troubleshooting Printing Problems in the Oracle Solaris OS (Tasks)

Glossary

Index

Administering the LP Print Scheduler (Task Map)

Task
Description
For Instructions
Check the status of printers.
Use the lpstat command to check the status of all printers or a specific printer. This command allows you to determine which printers are available for use and enables you to examine the characteristics of those printers.
Stop the print scheduler.
If the print scheduler stops accepting print requests, you might need to stop and restart the print scheduler.
Restart the print scheduler.
After you stop the print scheduler, you will need to restart the print scheduler, so the printer can begin accepting requests.
Start the print scheduler with options.
There are two ways to pass options to the print scheduler under the Service Management Facility (SMF). You can set options for the duration of a call, or you can set options to remain over a system boot.

Checking Printer Status

Many routine printer administration tasks require information about the status of the LP print service or a specific printer. For example, you can determine which printers are available for use. You can also examine the characteristics of those printers. You can use the lpstat command to find status information about the LP print service or a specific printer.

If a PPD file was used to create or modify a print queue, the specific PPD file is listed in the lpstat output. If a PPD file was not specified when the print queue was created, the PPD entry in the lpstat output is none.

How to Check the Status of Printers

  1. Log in to any system on the network.
  2. Check the status of printers.

    Only the most commonly used options are shown here. For other options, see thelpstat(1) man page.

    $ lpstat [-d] [-p] printer-name [-D] [-l] [-t]
    -d

    Shows the system's default printer.

    -p printer-name

    Shows if a printer is active or idle, when the printer was enabled or disabled, and whether the printer is accepting print requests.

    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 quotation marks. If you don't specify printer-name, the status of all printers is displayed.

    -D

    Shows the description of the specified printer-name.

    -l

    Shows the characteristics of the specified printer-name.

    -t

    Shows status information about the LP print service, including the status of all printers, such as whether they are active and whether they are accepting print requests.

Example 9-1 Checking the Status of Printers

The following example shows how to display the system's default printer.

$ lpstat -d
system default destination: luna

The following example shows how to display the status of the printer luna.

$ lpstat -p luna
printer luna is idle. enabled since Jul 12 11:17 2001. available.

The following example shows how to display the description of the printers asteroid and luna.

$ lpstat -p "asteroid luna" -D
printer asteroid faulted. enabled since Jan 5 11:35 2004. available.
unable to print: paper misfeed jam

Description: Printer by break room
printer luna is idle. enabled since Jan 5 11:36 2004. available.
Description: Printer by server room.

The following example shows how to display the characteristics of the printer luna.

$ lpstat -p luna -l
printer luna is idle. enabled since Thu Jul 12 15:02:32 PM PDT
        Form mounted: 
        Content types: postscript
        Printer types: PS
        Description:
        Connection: direct
        Interface: /usr/lib/lp/model/standard
                PPD: none
        After fault: continue
        Users allowed:
                (all)
        Forms allowed:
                (none)
        Banner not required
        Character sets:
                             (none)
                Default pitch:
        Default page size: 80 wide 66 long
        Default port settings:

Stopping and Restarting the Print Scheduler

The print scheduler, lpsched, handles print requests on print servers. However, the print scheduler might sometimes stop running on a system, so print requests stop being accepted or printed. The lpadmin command automatically enables the lpsched service when local printers are added to the system and disables it when the last local printer is removed. The following procedures describe how to stop and restart the print scheduler. If a print request was printing when the print scheduler stopped running, the print request will be printed in its entirety when you restart the print scheduler.

How to Stop the Print Scheduler

  1. Become superuser.
  2. Determine if the print scheduler is running.
    # svcs application/print/server

    You can also use the lpstat -r command to determine if the print scheduler is running.

    If the print scheduler is not running, the message scheduler is not running is displayed.

  3. If the print scheduler is running, stop it.
    # svcadm disable application/print/server

    You can also use the lpshut command to stop the print scheduler.

How to Restart the Print Scheduler

  1. Become superuser.
  2. Determine if the print scheduler is running.
    # svcs application/print/server

    You can also use the lpstat -r command to determine if the print scheduler is running.

    If the print scheduler is not running, the message scheduler is not running is displayed.

  3. If the print scheduler is not running, start it.
    # svcadm enable application/print/server

    You can also use the /usr/lib/lpsched command to start the print scheduler. For more information about the difference between starting the print scheduler by using the /usr/lib/lpsched command or by using the svcadm enable application/print server command, see Starting the Print Scheduler With Options.

Starting the Print Scheduler With Options

There are two ways to pass options to the print scheduler by using SMF:

How to Set Print Option Values Only for the Duration of a Call

  1. Become superuser.
  2. Set option values.
    # /usr/lib/lpsched option value
    -f num_filters

    Specifies the number of concurrent slow filters that can be run on a print server.

    -n num_notifiers

    Specifies the number of concurrent notification processes that can run on a print server.

    -p fd_limit

    Specifies the file descriptor resource limit for the lpsched process.

    -r reserved_fds

    Specifies the number of file descriptors that the scheduler reserves for internal communications under heavy load.

Example 9-2 Setting Option Values Only for the Duration of a Call

This example shows how to set the number of filters to 2. The remaining options will use the defaults that are in the print scheduler.

# /usr/lib/lpsched -f 2

To use the default options that are in the print scheduler, run the /usr/lib/lpsched command without any options.

Note that starting the print scheduler by using the /usr/lib/lpsched command does not utilize the values that are set with the svccfg command.

How to Set Printer Option Values That Remain Over a System Reboot

  1. Become superuser.
  2. Set one or all options.
    # svccfg svc:> select svc:/application/print/server svc:/application/print/server> setprop property = value . . . svc:/application/print/server> quit

    For each option that you want to set, repeat the setprop property = value command on a separate line.

  3. Verify that the option has been correctly set by displaying the current values of the print server properties.
    # svcprop svc:/application/print/server
  4. Restart the print scheduler.
    • If the print scheduler is not running, use the following commands:

      # svcadm refresh svc:/application/print/server
      # svcadm enable svc:/application/print/server
    • If the print scheduler is running, use the following commands:

      # svcadm refresh svc:/application/print/server
      # svcadm restart svc:/application/print/server

    To determine if the print scheduler is running, run the svcs application/print/server command.

Example 9-3 Setting Printer Option Values That Remain Over a System Reboot

This example shows how to set the number of filters to 1. This option will remain set over a system reboot, or if you restart the print scheduler.

# svccfg svc:> select svc:/application/print/server svc:/application/print/server> setprop lpsched/num_filters = count: 1 svc:/application/print/server> quit

This example shows how to set all options.

# svccfg svc:> select svc:/application/print/server svc:/application/print/server> setprop lpsched/num_filters = count: 1 svc:/application/print/server> setprop lpsched/num_notifiers = count: 1 svc:/application/print/server> setprop lpsched/fd_limit = count: 4096 svc:/application/print/server> setprop lpsched/reserved_fds = count: 2 svc:/application/print/server> quit

The following is a sample script that sets all options.

#!/bin/ksh

svccfg <<-EOF
select svc:/application/print/server
setprop lpsched/num_filters = count: 1
setprop lpsched/num_notifiers = count: 1
setprop lpsched/fd_limit = count: 4096
setprop lpsched/reserved_fds = count: 2

EOF