Date: Fri, 4 Sep 1998 17:45:39 -0500 (CDT) From: Jim Dutton <jimd@dutton3.it.siu.edu> To: freebsd-doc@FreeBSD.ORG Subject: New Handbook section suggestion: Advanced Printing - Print Server Message-ID: <199809042245.RAA24130@dutton3.it.siu.edu>
next in thread | raw e-mail | index | archive | help
Most of the necessary set up steps for standalone workstations is already covered in the Handbook:Printing chapter. In setting up a (simple) "print server" I found that there wasn't anything explicit about setting up a "print server", so thought that something along the following might be of value to new "print managers". It would be in a new section that explicitly states "print server" and would (eventually) refer to all of the other pertinent sections. This is rough draft #1. ========================================================================= The function of a "print server" is to collect (input) print requests (jobs), store (enqueue) them somewhere while they are waiting to be printed, send the print jobs to the desired printer, and possibly do data transformations on the print data and/or record information for accounting purposes. Since printers can only print one "job" at a time, multiple requests for printing must be enqueued somewhere: either on the local hosts sending print "jobs" or a "print server". In many cases where a "print server" is established, the server (host) may be given more disk space than a user workstation, or it may have more disk space available for printing use (than a user workstation) since it may not have all of the other applications or data files that a user workstation might have. For a standalone (Unix) host with a directly attached printer - it, itself, is a "print server" since the LPD on that standalone host does the input spooling and output transmission for all print requests. Nothing needs to be done to define or set up the "print server" since it already exists in the local LPD. For a standalone (Unix) host connected to a printer via a network interface on the printer (ie; a "networked printer"), the standalone host may or may not be "the print server". If the "networked printer" has an LPD function with spooling capability, then the "networked printer" may be the "print server". Otherwise, the standalone host will be the "print server" (via its local LDP). For multiple hosts connected via a network where the printer is locally attached to a network host, that network host is oftentimes the "print server", but this is not necessary. Another host could act as the "print server" (performing the input spooling, printer transmission, and any input filtering required), sending the final output to the host with the printer which then sends the data to the printer. The "print host" will spool the data for each print job, but it will normally be for only one print job at a time. For multiple hosts connected via a network where the printer is a "networked printer", either the printer itself will be the "print server" (as mentioned above), or another network host will be the "print server", depending, mostly, upon the capabilities of the printer. In any scenario where the printer itself is a (full fledged) "print server", no other special configuration needs to be be done (see sections .... about defining a "networked printer"). Where a host with an attached printer is the "print server", the same basic rules applly (ie; all "print jobs" are sent to the "print host" which does the spooling, et cetera). In the case where a different network host is to be the "print server", a couple of possible implementations are offered: 1) the "print server" does nothing to the print data other than storing it and forwarding it on to the print host - no input filter is used or required 2) the "print server" needs to do input filter processing/work (ie; data transformation from ASCII to Postscript) before sending the print data to a "networked printer". ============================================================================ Example 1: no input filter on "print server", "print host" with attached printer and a "default" input filter (note that the user workstation could have used a different name for its LOCAL print queue name than what is shown) In this particular instance, the printer is a non-Postscript printer. [user workstation] --> ["print server"] --> ["print host"] --> [printer] --------------------- "print host" PRINTCAP --------------------- ##------ HP DeskJet Plus attached to this machine on port 0 ##------ DeskJet filters: what's-his-name's package generic_dphp|Draft Hewlett-Packard DeskJet 500 on Port 0:\ :lp=/dev/lpt0:mx0:\ :sd=/var/spool/lpd:lf=/var/log/lpd-errs:sh:\ :df=/usr/libexec/lpr/djdvipf.sh:\ :cf=/usr/libexec/lpr/djpspf.sh:\ :af=/var/account/lp.printacct:\ :if=/usr/libexec/lpr/djlpf: #### >>> this is the the default printer: lp|dhp|ddj|Draft Hewlett-Packard DeskJet (Portrait, 80 Columns):\ :pw#80:\ :pl#63:\ :tc=generic_dphp: ----------------------- "print server" PRINTCAP ----------------------- hp|lp:\ :rm=prthost.our.net:rp=dhp:lf=/var/log/lpd-errs:mx0:\ :sd=/var/spool/lpd/hp:af=/var/account/lp.printacct: ------------------------- user workstation PRINTCAP ------------------------- hp|lp:\ :rm=prtsrvr.our.net:rp=hp:lf=/var/log/lpd-errs:mx0: ============================================================================ Example 2: ASCII to Postscript input filter on "print server", printer is "network attached" (has its own, limited, LPD + network card); only simple accounting is done (no line counts at this point) The actual printer in this case is an HP5 Postscript. Note the NULL device for the "print server" lp definition. Without this, the LPD on the "print server" would not execute the input filter. a2ps was used to do the actual ASCII to Postscript transformation. [user workstation] --> ["print server"] --> ["networked" printer] ----------------------- "print server" PRINTCAP ----------------------- hplj5sid:\ :rm=hp5si.our.net:rp=hplj5si:af=/var/account/lp.printacct:\ :lf=/var/log/lpd-errs:mx0:rw: hplj5:\ :lp=/dev/null:af=/var/account/lp.printacct:mx0:\ :lf=/var/log/lpd-errs:\ :if=/usr/local/libexec/hplj5.sh:sd=/var/spool/lpd/hplj5: ------------------------- user workstation PRINTCAP ------------------------- hplj5:\ :rm=prtsrvr.our.net:rp=hplj5:af=/var/account/lp.printacct:\ :lf=/var/log/lpd-errs:mx0:sd=/var/spool/lpd/hplj5: --------------------------- "print server" LP.PRINTACCT --------------------------- Sep 3 19:00:00 prtsrvr newsyslog[1299]: logfile turned over VMuser mainframe.our.net Fri Sep 4 11:00:33 CDT 1998 VMuser mainframe.our.net Fri Sep 4 11:04:58 CDT 1998 -------- hplj5.sh -------- #!/bin/sh # today=`date` # # save remote user/host in accounting file - no line counting is done # result=`echo $5 $7 $today >> $8` read first_line length=`echo $first_line | wc -c` first_two_chars=`expr "$first_line" : '\(..\)'` # # PostScript job, print it directly # if [ "$first_two_chars" = "%!" ]; then (echo $first_line && cat && printf "\004") | lpr -h -Phplj5sid && exit 0 exit 2 # # mainframe print by Lowell - Focus reports - requires Landscape # elif [ $5 = "LOWELLW" ]; then (echo $first_line; cat) | /usr/local/bin/a2ps -1 -ni -nL -v -F7.2| lpr -h -Phplj5sid && exit 0 # # Plain text, convert it, then print it Landscape # elif [ $length -gt 81 ]; then (echo $first_line; cat) | /usr/local/bin/a2ps -1 -ni -nL -v | lpr -h -Phplj5sid && exit 0 # # Plain text, convert it, then print it "Stand Up" (Portrait) # else (echo $first_line; cat) | /usr/local/bin/a2ps -1 -p -ni -nL -v | lpr -h -Phplj5sid && exit 0 exit 2 fi ============================================================================== -- [what I USED to be ...] ________________________________________________________________________ SIU.EDU - DNS Admin, Postmaster, SMTP Admin, Netnews Admin SIUCVMB.SIU.EDU - DNS Admin, Postmaster, SMTP Admin, Sr TCP/IP Sys Prog SIUCMVSA.SIU.EDU - DNS Admin, Postmaster, SMTP Admin, Sr TCP/IP Sys Prog SIUCVMB, SIUCMVSA- Senior RSCS, VTAM, NCP Systems Programmer Systems Admin - Solaris, AIX, FreeBSD, NetBSD LDAP Admin - FreeBSD, Solaris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809042245.RAA24130>