9.B: Text Documents | 9: Printing Files | 9: Printing Files |
Unix permits multiple users to have access to the same printer, even if the users are on different computers. This is done by having the print commands route the file you want printed to an active program ("process"), the print queue. The print queue stores this and other files, and sends them to the appropriate printer one-at-a-time.
If the printer is not working, the print queue holds the files until the printer is "up". Sometimes the print queue "goes down" if the printer malfunctions. In that case, the queue must be brought "up", possibly with an explicit software command before printing will resume.
It is generally a good idea to check the status of the print queue. If the queue is very long, or if it is down, it's probably a good idea not to send anything to it.
The line printer queue command lpq
tells you the
status of the print queue. The -d
option, followed by the
print queue name, is optional.
Some of the print queues on the Department cluster are
ps | PostScript laser printer in Weniger 497 |
ps2 | PostScript laser printer in Weniger 412 |
Depending on the way the computers are configured, you can get a
variety of responses from an lpq
command. As you become more
accustomed to print queues, the responses will become clearer:
daphy: Sun Jul 21 11:49:54 1996:
Sun Jul 21 13:09:32 1996:
no entries
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- ----- --- ---
ps2 @goop READY
ps2: Fri Jul 26 12:26:45 1996:
ps2 ps2 READY
In both cases the reponse means the print queue has no jobs in it.
When the user rubin has the file cp05.ps in a print queue, a DEC reponse may look like:
daphy: Fri Jul 26 14:47:49 1996:
Fri Jul 26 14:46:58 1996: Attempting to print dfA601daphy
Rank Pri Owner Job Files Total Size
active 0 rubin 601 cp05.ps 375122 bytes
An IBM reponse may look like:
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- ----- --- ---
ps2 @goop READY
ps2: Fri Jul 26 14:46:58 1996: Attempting to print dfA601daphy
ps2 ps2 RUNNING 0 601 0 0 0 1 1 0
Now it's time for you to try the line printer queue command and check the status of the default printer queue:
> lpq
-d
option followed by the print queue name. How does the the
queue for ps
look?
> lpq
-P ps
Often a printer is out of paper, and you can do something about that. If jobs are not printing, talk to someone in the administration group about fixing the printer or queue.
9.B: Text Documents | 9: Printing Files | 9: Printing Files |