HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 54

Stopping and Restarting the lp Spooler

Page 54 highlights

Printers # reject -r"Use alternate printer." laser1 4. (Optional.) Determine if there are any jobs in the printer's queue. For example: # lpstat -o laser1 5. (Optional.) Move all pending print requests in the request directory for the printer class to another printer or printer class. For example: # lpmove laser1 laser2 6. Remove the printer class. For example: # lpadmin -xlaser1 7. Restart the lp spooler: # lpsched 8. When you remove a printer class, the printers in the class are not removed; you can still use them as individual printers. But, if you remove all individual printers from a class, that printer class is automatically removed. Stopping and Restarting the lp Spooler Typically, the lp spooler is started during the boot process. (To change the boot-up procedure by not starting the scheduler, edit the file /etc/rc.config.d/lp and set the shell environment variable lp to 0). The spooler must be stopped whenever the spooling system needs modification (such as when adding or removing a printer). Subsequently, the spooler must be restarted after the modification has been made. You can use either SAM or HP-UX commands to stop or start the lp spooler. If you use HP-UX commands to stop the lp spooler, follow these steps: 1. Become superuser with the su command or login as root. 2. Check for requests printing or being sent to a remote printer (it is best to wait until requests finish printing before stopping the lp spooler). # lpstat -o -i In the above command, the -i option inhibits the reporting of remote requests (that is, lpstat will only show local requests). 3. Stop the lp spooler: # lpshut When lpshut is executed, all requests will be stopped, but will remain in the print queues. 4. Restart the lp spooler: # lpsched 5. When the spooler is restarted, the requests in the print queue will be completely reprinted, regardless of how much of the request was printed prior to the shutdown. 49

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

Printers
49
# reject -r"Use alternate printer."
laser1
4.
(Optional.)
Determine if there are any jobs in the printer±s queue. For
example:
# lpstat -o
laser1
5.
(Optional.)
Move all pending print requests in the request directory for the printer class to another
printer or printer class.
For example:
# lpmove
laser1 laser2
6.
Remove the printer class. For example:
# lpadmin –x
laser1
7.
Restart the
lp
spooler:
# lpsched
8.
When you remove a printer class, the printers in the class are not removed; you can still use them as
individual printers. But, if you remove all individual printers from a class, that printer class is
automatically removed.
Stopping and Restarting the lp Spooler
Typically, the lp spooler is started during the boot process. (To change the boot-up procedure by not
starting the scheduler, edit the file
/etc/rc.config.d/lp
and set the shell environment variable
lp
to
0
).
The spooler must be stopped whenever the spooling system needs modification (such as when
adding or removing a printer).
Subsequently, the spooler must be restarted after the modification has been
made.
You can use either SAM or HP-UX commands to stop or start the
lp
spooler.
If you use HP-UX
commands to stop the
lp
spooler, follow these steps:
1.
Become
superuser
with the
su
command or login as
root
.
2.
Check for requests printing or being sent to a remote printer (it is best to wait until requests finish
printing before stopping the lp spooler).
# lpstat -o -i
In the above command, the
-i
option inhibits the reporting of remote requests (that is,
lpstat
will only
show local requests).
3.
Stop the
lp
spooler:
# lpshut
When
lpshut
is executed, all requests will be stopped, but will remain in the print queues.
4.
Restart the
lp
spooler:
# lpsched
5.
When the spooler is restarted, the requests in the print queue will be completely reprinted, regardless of
how much of the request was printed prior to the shutdown
.