On 22 Mar 2000 [EMAIL PROTECTED] wrote:
> Suppiluliuma <[EMAIL PROTECTED]> writes:
>
> > Hello!
>
> Hello,
>
> > I'm looking for solution to my problem. The problem is that I want
> > to know who uses printer and how much paper/ink my users waste. I've
> > learned that adding line:
> > :af=/var/log/printeracc:
> > to /etc/printcap is not enough. This line only describes parameter
> > passed to print filter to be used as accounting file. However standard
> > filter that comes with distribution does not know about
> > accounting. Therefore I have a couple of questions:
> > 0. Am I doing something wrong?
> > 1. Where can I find printing filter that does accounting?
> > 2. If above is not possible then where can I find info on accounting
> > data format that filter should write to accounting file? (so I can use
> > standard tools like pac)
> > 3. Is there any other solution to the problem?
> >
> > Thanks in advance
>
> This seems to be necessary to hack directly into "if" as it seems not to check
> for parameters provided by lpd. check with "man printcap".
>
> "if" is copied from /var/lib/rhs/rhs-printfilters/master-filter on each
it is /usr not /var
> spool directory. by default when using SMB, NCP or DIRECT printing, this filter
> assume a hard accouting file of acct in the spool directory
> (/var/spool/lpd/<lp>/).
Looking in master-filter I've only found this:
if [ "$PRINTER_TYPE" = "SMB" ]; then
bestpath="$bestpath | ${FPIDIR}/smbprint ${SPOOLDIR}/acct"
elif [ "$PRINTER_TYPE" = "NCP" ]; then
bestpath="$bestpath | ${FPIDIR}/ncpprint ${SPOOLDIR}/acct"
fi
and no similiar entry for plain local printer. Samba is obvious, but I'm
not sure about NCP (what does it state for?) Anyway, ncpprint uses
nprint which is not installed on my system. I investigated further only
to find out that accounting file name is used in SMB and NCP print filters
to extract spool directory (!!!) name from it. No accounting information
is written to accounting file (at least in smbprint filter).
Since I can't find any info on format of accounting data i can't write
my own hack to master-filter.
Regards
Suppiluliuma
--
Registered Linux user #166697
visit http://counter.li.org to register
Sign the petition at http://www.libranet.com/petition.html
Help bring us more Linux Drivers