Hi, I'm attempting to do printer accounting with LPRng+ifhp. The printers in use are all HP4000 series (be it 4000, 4050 or 4100). The Page Description Language we are using is PCL (5 i think).
Currently, our print jobs from NT workstations are sent via samba to our unix server. From here the job is then forwarded onto a smaller linux box that is attached to the printer's parallel port. The smaller boxes run ZipSlack (7.1, 2.2.16 Linux kernel) and LPRng (3.8.1) and ifhp (3.4.7). We've had to go this route since not all our HP4000's have JetDirect cards installed, some currently use NetGear PS110 print servers, which I'm told can't do bi-directional communications, although I haven't tested it for myself, and really don't have the time. Anyway, I've got things setup relatively smoothly so far, and printing from an NT workstation through to the HP is working. However the *big* problem I'm having is getting a page count back from the printer. I've toyed with the printcap entry for LPRng to no end, and still can't get a page count back. If anyone out there has a working printcap/ifhp.conf/anything else I need, could you please, please please send me a copy/snippet of the relevant code? I'm to the stage where I really need to get things working before this project gets scrapped. I've read (and printed) the ifhp-howto, and read through bits of the LPRng-howto, but I've found the parts on accounting to be a bit thin, I think I really need dumbed down step-by-step instructions on how to get it working, and working examples would be a good place to start. At present most of my printcap has been pieced together from bits and pieces I've read between the two howto's. I just came across a section of interest in the ifhp-howto, section 4.9 - PS,PCL,PJL Printer with Parallel Port Connection. From what I can tell I should probably have ":rw" defined in my printcap to get the parallel port opened read-write. I had assumed this would have happened by default, but perhaps it could be why I'm not getting a pagecount? We had a mild success today in getting a pagecount to work, basically we followed through the ifhp readme to test it's working, and dumped the one.ps file through ifhp out to a file. We then cut just the top part of the PJL commands out, and inserted our own line, "@PJL INFO PAGECOUNT", which I found looking through the ifhp.c source, then echoed the file out to /dev/lp0, and cat'd back /dev/lp0 and we got the magic page count number back. Yet I'm still unable to get LPRng+ifhp to get me this figure, and can't figure out what I'm doing wrong, so I'll post our most recent printcap we've been using and see if someone can point me in the right direction. The ifhp.conf file is (to the best of my knowledge) the one that came with ifhp, I don't think I modified it, as I'm sure it had more or less everything correct. The accounting.pl is the one that shipped with LPRng (or was it ifhp?), and I simply copied it to the /usr/local/libexec/filters directory since the examples had it that way. # B10 JetDirect HP Printer # b10-lp :sh :ml=0 :mx=0 :lp=/dev/lp0 :sd=/var/spool/lpd :af=acct :ps=status :as=|/usr/local/libexec/filters/accounting.pl start :ae=|/usr/local/libexec/filters/accounting.pl end :filter=/usr/local/libexec/filters/ifhp :of=/usr/local/libexec/filters/ifhp :ifhp=model=hp4000,of_options=status pagecount waitend # :ifhp=model=default # :of=/usr/local/libexec/filters/ifhp # :ifhp=model=hp6p,of_options=sync pagecount waitend Any help with this would be greatly appreciated :-) PS: Does anyone know where to find a PJL Technical Reference from HP? We have the PCL 5e technical reference in PDF from HP, but even though the cover says PCL/PJL it barely mentions PJL, and "pagecount" and "page count" certainly don't exist anywhere in the document. Regards, Chris Lee ----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST The address you post from MUST be your subscription address If you need help, send email to [EMAIL PROTECTED] (or lprng-requests or lprng-digest-requests) with the word 'help' in the body. For the impatient, to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] with: | example: subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] If you have major problems, send email to [EMAIL PROTECTED] with the word LPRNGLIST in the SUBJECT line. -----------------------------------------------------------------------------