System Administration Guide: Advanced Administration

Managing Printers and the Print Scheduler

This section provides instructions for day-to-day tasks you perform to manage printers and the print scheduler.

Deleting Printers and Printer Access

If a printer needs to be replaced or you want to move the printer to a different location, you must delete the printer information from the LP print service before you physically remove it from the print server. You should also make sure that all the current print requests on the printer are printed or moved to another printer to be printed.

Not only does the printer information need to be deleted from the print server, but it also needs to be deleted from the print clients or network name service. If you delete a local printer from a print server, you should delete the remote printer entry from the print clients or network name service. If you move a printer to another print server, you need to delete the old remote print entry from the print clients or network name service and add access to the remote printer in its new location.

For detailed information on how to delete a local and remote printer, see How to Delete a Printer and Remote Printer Access. You can use Solaris Print Manager to delete a local or remote printer. However, Solaris Print Manager does not enable you to move queued print requests to another printer.

How to Delete a Printer and Remote Printer Access

Use this procedure when you a removing a printer from service and you want to remove the printer access from the print clients and remove the printer information from the print server.

  1. Log in as superuser, lp, or assume an equivalent role on a print client that has access to the printer you want to delete.

  2. Delete information about the printer from the print client.


    print-client# lpadmin -x printer-name
    

    -x

    Deletes the specified printer. 

    printer-name

    Name of the printer you want to delete. 

    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.


    print-client# lpsystem -r print-server
    

    -r

    Removes the specified print server. 

    print-server

    Name of the print server you want to delete. 

    The print server is deleted from the print client's /etc/lp/Systems file.

  4. Repeat Step 2 through Step 3 on each print client that has access to the printer.

  5. Log in as superuser or lp or assume an equivalent role on the print server.

  6. Stop accepting print requests on the printer.


    print-server# reject printer-name
    

    reject printer-name

    Rejects print requests for the specified printer. 

    This step prevents any new requests from entering the printer's queue while you are in the process of removing the printer. For a detailed description, see How to Accept or Reject Print Requests for a Printer.

  7. Stop the printer.


    print-server# disable printer-name
    

    This step stops print requests from printing. For a detailed description on how to stop printing, seeHow to Enable or Disable a Printer.

  8. Move any print requests that are still in the queue to another printer.

    For a detailed description on how to move print requests to another printer, see How to Move Print Requests to Another Printer.

  9. Delete the printer from the print server.


    print-server# lpadmin -x printer-name
    

    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-server# lpsystem -r print-client1[,print-client2 ...]

    -r

    Removes the specified print client. 

    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.

  11. Verify that the printer information has been deleted:

    1. Confirm that the printer information has been deleted on the print client.


      print-client$ lpstat -p printer-name -l
      

      You should receive an error indicating that the printer does not exist in the output of the above command.

    2. Confirm that the printer information has been deleted on the print server.


      print-server$ lpstat -p printer-name -l
      

      You should receive an error indicating that the printer does not exist in the output of the above command.

Example—Deleting a Printer and Remote Printer Access

The following example shows how to delete the printer luna from the print client terra and from the print server jupiter, and also delete the print client terra from the print server.


terra# lpadmin -x luna
Removed “luna”.
terra# lpstat -p luna -l 
jupiter# lpadmin -x luna
jupiter# lpsystem -r terra
Removed “terra”.
jupiter# lpstat -p luna -l 

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 and examine the characteristics of those printers. You can use the lpstat command to find out status information about the LP print service or a specific printer.

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 lpstat(1).


    $ 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 it was enabled or disabled, and whether it 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 quotes. 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: whether they are active and whether they are accepting print requests. 

Examples—Checking the Status of Printers

The following example shows how to displays 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 Jul 12 11:35 2001. available.
unable to print: paper misfeed jam

Description: Printer by break room
printer luna is idle. enabled since Jul 12 11:36 2001. 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 ...
        Form mounted: 
        Content types: postscript
        Printer types: PS
        Description:
        Connection: direct
        Interface: /usr/lib/lp/model/standard
        After fault: continue
        Users allowed:
                (all)
        Forms allowed:
                (none)
        Banner not required
        Character sets:

        Default pitch:
        Default page size: 80 wide 66 long
        Default port settings:  

Restarting the Print Scheduler

The print scheduler, lpsched, handles print requests on print servers. However, there might be times when the print scheduler stops running on a system, so print requests stop being accepted or printed.

The following section describes how to 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. Log in as superuser, lp, or assume an equivalent role on the print server.

  2. Check to see if the print scheduler is running.


    # lpstat -r
    

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

  3. If the print scheduler is running, stop it.


    # /etc/init.d/lp stop
    

How to Restart the Print Scheduler

  1. Log in as superuser, lp, or assume an equivalent role on the print server.

  2. Check to see if the print scheduler is running.


    # lpstat -r
    

    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.


    # /etc/init.d/lp start