System Administration Guide: Solaris Printing

ProcedureHow to Check the Basic Functions of the LP Print Service

This procedure uses the printer luna as an example of checking basic LP print service functions.

  1. On the print server, make sure that the LP print service is running.

    1. Check whether the LP scheduler is running by using one of the following methods.

      • Use the lpstat command.


        % lpstat -r
        scheduler is running

        A message is displayed, indicating whether the LP scheduler is running.

      • Use the svcs command.


        % svcs application/print/server
        

        The following output is displayed if the scheduler is running.


        STATE		STIME			FMRI
        online		Oct_24		svc:/application/print/server:default

        The following output is displayed if the scheduler is not running.


        STATE			STIME			FMRI
        disabled		14:27:48		svc:/application/print/server:default

      
      
    2. If the scheduler is not running, become superuser, lp, or assume an equivalent role. Start the scheduler by using one of the following methods.

      • Use the lpsched command.


        # /usr/lib/lpsched
        Print services started.

        A message is displayed, indicating the print services have been started.

      • Use the svcadm command.


        # svcadm enable application/print/server
        

        When you use the svcadm command, no message indicating whether the print services have been started is displayed. To determine if the print services are online, run the svcs application/print/server command again.

      If you have trouble starting the scheduler, see How to Unhang the LP Print Service.

  2. On both the print server and print client, make sure that the printer is accepting requests.

    1. Check that the printer is accepting requests.


      # lpstat -a
      mars accepting requests since Jan 12 14:23 2004
      luna not accepting requests since Jan 12 14:23 2004
      unknown reason

      This command verifies that the LP system is accepting requests for each printer configured for the system.

    2. If the printer is not accepting requests, become superuser, lp, or assume an equivalent role, and allow the printer to accept print requests.


      # accept luna
      

      The specified printer now accepts requests.

  3. On both the print server and print client, make sure that the printer is enabled to print submitted print requests.

    1. Check that the printer is enabled.


      # lpstat -p luna
      printer luna disabled since Jan 12 14:25 2004.
      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.

    2. If the printer is disabled, become superuser, lp, or assume an equivalent role, and enable the printer.


      # enable luna
      printer "luna" now enabled.

      The specified printer is enabled to process print requests.

  4. On the print server, make sure that the printer is connected to the correct serial port.

    1. Check that the printer is connected to the correct serial port.


      # lpstat -t
      scheduler is running
      system default destination: luna
      device for luna: /dev/term/a

      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.

    2. Become superuser, lp, or assume an equivalent role.

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

    4. Change the permissions on the printer port device file.


      # chmod 600 device-filename
      

      This command allows only superuser, lp, or an equivalent role to access the printer port device file.

  5. On both the print server and print client, make sure that the printer is configured properly.

    1. Check that the printer is configured properly.


      # lpstat -p luna -l
      printer luna is idle. enabled since Jan 12 14:24 2004. 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.

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


      # lpadmin -p printer-name -T printer-type -I file-content-type
      
  6. On the print server, make sure that the printer is not faulted.

    1. Check that the printer is not waiting because of a printer fault.


      # lpadmin -p printer-name -F continue 
      

      This command instructs the LP print service to continue if it is waiting because of a fault.

    2. Force an immediate retry by re-enabling the printer.


      # enable printer-name 
      
    3. (Optional) Instruct the LP print service to enable quick notification of printer faults.


      # lpadmin -p printer-name -A 'write root'
      

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


    Note –

    It is easy to mistakenly set up a printer as a login terminal, so be sure to check this possibility even if you think it does not apply.


    1. 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 19:30:47 ?        0:02 /usr/lib/lpsched
          root   859   858  0 19:18:54 term/a   0:01 /bin/sh -c \ /etc/lp
      /interfaces/luna
      luna-294 rocket!smith “passwd\n##
      #

      In the output from this command, look for the printer port entry. In the above example, port /dev/term/a is set up incorrectly as a login terminal. You can tell by the "passwd\n## information at the end of the line. If the port is set correctly, skip the last steps in this procedure.

    2. Cancel the print request(s).


      # cancel request-id
      

      In this command, request-id is the request ID number for a print request to be canceled.

    3. Set the printer port to be a nonlogin device.


      # lpadmin -p printer-name -h
      
    4. 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.