Re: Is lpr outdated, unsupported?, ie. lpr or lp?

From: Greg Andrews (gerg_at_panix.com)
Date: 05/14/03


Date: Wed, 14 May 2003 18:51:49 +0000 (UTC)

Thanks for the kind words, Michael. If I can clear up some of the
mysteries of the Solaris/SVR4 printing system, then I'm happy.

"Michael Vilain <vilain@spamcop.net>" writes:
>
>In this thread you made the distinction between a network printer and
>what I call a server or network spooler. These systems are distinct in
>my mind from printers that are attached via serial or parallel
>connections.
>

Yes, they are distinct from each other in my mind also.

>
>What I'm not clear about is the JetDirect Server software in the printer
>or HP JetDirect 3-port Box. Can this beasty "queue" accesses from
>multiple systems?
>

In a manner of speaking, yes.

I'm talking specifically about the HP Jetdirect print server boxes
and network cards here. Other brands probably (but not necessarily)
function the same way.

The standalone Jetdirect print server boxes come in 3-port and 1-port
versions. The Jetdirect network card that installs in HP printers is
pretty much a 1-port standalone unit on a plug-in card that has a
different interface to the printer. The standalone and plug-in units
lack a hard disk to spool print jobs as a true print server computer
would. Instead, they act much like an ethernet-to-parallel adapter
with RAM buffer. There is firmware that supports the TCP/IP stack
and the "lpd" (RFC 1179) printing protocol, as well as the Microsoft
and Apple networking/printing protocols. The firmware provides one
type of filtering: Unix text files can have their line endings changed
to the type the printer likes best.

So, finally getting around to the question you actually asked, how
does a non-spooling print server work? It has limited multitasking
capabilities and no way to spool simultaneous connections to feed
the files one at a time to the printer.

I didn't design them, and haven't seen any white papers describing
the internals, but based on working with them, I think I know what
they do.

Since there's no spooling and little buffering, the only way to handle
simultaneous connections is to suspend all but one of them. With TCP
printing connections, the way to suspend a connection is to withold
either the TCP ack packet, or the LPD protocol reply to the first
command. One of the connections gets responses and transfers its
file through the unit to the printer. When it's finished and the
connection closed, the next connection gets its responses. And so
on, until none of the connections are left.

>
>How is a network printer queue different from a server printer queue on
>Solaris?
>

I assume you are talking about the queue for a printer attached to a
parallel or serial port when you say "server printer queue". I use
the term "local printer" or "locally attached printer", myself.

There is very little difference between them in Solaris. The queue is
a true FIFO queue under /var/spool/lp, and managed by lpsched. A device
file is given, even though it's usually /dev/null for network printers.
The difference appears when you get to the printer interface program
that is invoked when each job reaches the front of the queue.

The standard interface is a shell script that expects to write the print
file to its stdout, which was opened on the device file. It's used for
printers on parallel or serial ports (or other devices with a local device
file). The netstandard interface is a shell script that ignores its
stdout (also opened on the device file). Instead, it invokes a program
named "netpr" to make a network connection to the printer and transfer
the file. Truthfully, there are probably a dozen other differences
between the standard and netstandard scripts, but the above is the major
difference that divides the men from the boys (network printers from the
local printers).

Queues set up by software from the printer manufacturer, like the
Jetdirect software from HP, MarkVision from Lexmark, or the unnamed
software from Xerox, work the same way. No difference until the
custom interface is run. The interface invokes the programs needed
to deliver the file to the printer through the network. Usually those
programs are the ones installed as part of the software package.

Hope this answered your question,

  -Greg

-- 
Do NOT reply via e-mail.
Reply in the newsgroup.


Relevant Pages

  • Re: make printer network available
    ... available for my Laptop using ubuntu dapper drake. ... attached any printer to my laptop or the network. ... other users using an USB print server which connects to the network ... switch/printserver has a logical queue for its first printer called "L1", ...
    (comp.os.linux.networking)
  • Re: XP Workstation as Print Server
    ... The printers do have network card attached and is connected to the network. ... I would not bother setting up a system to function as your print server, ... I would like to know what is the meaning of only 10 connections? ...
    (microsoft.public.windowsxp.general)
  • Printing over network from win98 to XP
    ... home network with my 98 machine. ... Printing and I cannot get rid of it. ... queue but I haven't found it yet. ... connections, so it seems to be on the OS side. ...
    (microsoft.public.windowsxp.print_fax)
  • Re: Printer problem please help
    ... You mentioned that it was a network printer, ... to a print server, ... To set up a generic ASCII text printer as a network, ... Here is the way we make the queue: ...
    (comp.unix.aix)
  • Re: Jetdirect Print Server General Question
    ... Incorrectly operating printer or network hardware. ... from a print queue, because none exists. ... JetDirect cards are cheap these days, ... Before I got this print server, I used to use a file server (A ...
    (comp.sys.hp.hardware)