We have now seen all essential printer commands, but how can we find out what printers there are and what they are doing.
UNIX provides the lpc command to do exactly that. Additionally it offers the printer administrator the options to start and stop printing and queueing of new jobs. The administrator can also rearrange the order of the jobs in the queue.
The lpc command can either be run as an interactive program or by supplying lpc with commands on the command line:
$lpc lpc> help Commands may be abbreviated. Commands are: abort enable disable help restart status topq ? clean exit down quit start stop up lpc> status ascii: queuing is enabled printing is enabled 1 entry in spool area waiting for ascii to become ready (offline ?) lp: queuing is enabled printing is enabled 1 entry in spool area lp is ready and printing raw: queuing is enabled printing is enabled no entries no daemon present lpc> quit $lpc status ascii: queueing is enabled printing is enabled 1 entry in spool area waiting for ascii to become ready (offline ?) lp: queueing is enabled printing is enabled 1 entry in spool area lp is ready and printing raw: queueing is enabled printing is enabled no entries no daemon present $
We can see which printers there are on the system, if they are printing and accepting jobs, how many jobs there are in the print queue and what the printers status is. The additional commands displayed by the help command are only available to the administrator.