Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
5.  Administering Printers (Tasks) Managing Print Requests How to Cancel a Print Request From a Specific User Examples--Canceling a Print Request From a Specific User  Previous   Contents   Next 
   
 

Moving a Print Request

If you plan to change the way a printer is used or decide to take a printer out of service, you should set up the LP print service to reject additional print requests, and then move or cancel any requests that are currently queued to the printer. You can use the lpmove command to move individual or all print requests to another local printer.

Request IDs are not changed when you move print requests, so users can still find their requests. Print requests that have requirements (such as file content type or forms) that cannot be met by the newly specified printer cannot be moved. They must be canceled.

How to Move Print Requests to Another Printer

To move all print requests from one printer to another, you do not need to know the request IDs. However, it is a good idea to see how many print requests are affected before you move them.

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

  2. (Optional) Check the request IDs of the print requests on the original printer.

    # lpstat -o printer-name1
  3. (Optional) Check to see if the destination printer is accepting print requests.

    # lpstat -p printer-name2

    -p printer-name2

    Name of the printer to which you are moving the print requests.

  4. Move all the print requests from the original printer to the destination printer.

    # lpmove printer-name1 printer-name2

    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.

    For more information, see lpmove(1M).

    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.

  5. Start accepting print requests on the original printer.

    If you move all the print requests to another printer, the lpmove command automatically stops accepting print requests for the printer. This step is necessary if you want to begin accepting new print requests for the printer.

    # accept printer-name1
  6. Check for any remaining print requests in the original printer's queue.

    $ lpstat -o printer-name1

    Make sure all specified print requests were moved to the destination printer's queue by using the following command.

    $ lpstat -o printer-name2

Example--Moving Print Requests to Another Printer

The following example shows how to move print requests from the printer luna to the printer terra, and then tells the original printer luna to resume accepting print requests.

# lpmove luna terra
# accept luna

Changing the Priority of Print Requests

After a user has submitted a print request, you can change its priority in the print server's queue by:

  • 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.

  • 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.

  • 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.

How to Change the Priority of a Print Request

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

  2. Determine the request IDs of the print requests whose priority you want to change.

    # lpstat

    For more information, see "How to Check the Status of Print Requests".

  3. Change the priority of a print request.

    # lp -i request-id -H change-priority

    -i request-id

    Request ID of a print request you want to change.

    You can specify multiple request IDs with this command. Use a space or a comma to separate request IDs. If you use spaces, enclose the list of request IDs in quotes.

    -H change-priority

    One of the three ways to change the priority of a print request: hold, resume, immediate.

    For detailed information about valid values for change-priority, see Table 5-6.

    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.

Example--Changing the Priority of a Print Request

The following example shows how to change a print request with the request ID asteroid-79, to priority level 1.

# lp -i asteroid-79 -q 1
 
 
 
  Previous   Contents   Next