Вы находитесь на странице: 1из 4

SOP Start Stop printer spooler services on Solaris

#/usr/lib/lpshut -Stop print services


#usr/lib/lpsched -Print services start
Example 52 Checking the Status of Printers
The following example shows how to display the system's default printer.
$ lpstat -p
$ lpstat -p -D
$ lpstat -p printer-name
$ 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:
Default pitch:
Default page size: 80 wide 66 long
Default port settings:

(none)

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. Log in as superuser, lp, or assume an equivalent role on the print server.
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. Log in as superuser, lp, or assume an equivalent role on the print server.
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:
By modifying option values only for the duration of a call.
Use the /usr/lib/lpsched command with the appropriate options when you only want to
pass options to the print scheduler for the duration of a call. Before setting options, see the
lpsched(1M) man page for more information about these default values and reasons for
changing them.
By maintaining option values over a system reboot, or if the print scheduler is restarted.
The SMF manifest for the print server contains properties that are utilized by the print server
start-up script. These property values are passed on to the print scheduler and represent the
options, which are set by using the svccfg command.
The properties are as follows:
lpsched/num_filters
lpsched/num_notifiers
lpsched/fd_limit
lpsched/reserved_fds
Any options that are not set with the svccfg command will use the default values that are in
the print scheduler. For more information about using the svccfg command, see the
svccfg(1M) man page.
Start printing print requests.

# enable printer-name

1. Verify that the printer is enabled.

# lpstat -p printer-name

Example 514 Enabling or Disabling a Printer

The following example shows how to stop the current job on the printer luna, save the job to print
later, and provide a reason why the printer has stopped printing print requests.

# disable -r "changing the form" luna

The following example shows how to start printing print requests on the printer luna.

# enable luna
printer "luna" enabled

Вам также может понравиться