I notice that the accounting has been radically changed since the version I
was using. In particular:
1. The 'af' printcap option can no longer be a filter. The remnants
of the code on accounting.c have no chance of working now because
firstly there's no check for a | symbol on the af option (only on
the as and ae options). There are bits of code to read the
"accept" message and such but I cannot see how they would ever be
invoked. Obviously using "ae" as a filter is pointless because it never
knows how many pages were printed.
2. The ifhp filter no longer outputs the printer and username on its
log lines. I used to rely (for psfilter and CTI-ifhp) on getting
one line from the log file which would give me:
a. the printer
b. the username
c. the number of pages
that no longer seems to be possible. This is sad because I get all
my printers to log into one file and then I just grab out the
lines I want to calculate the printer usage. Obviously now I have
to process a sequence of lines to get the same effect. I notice that
the output format of ifhp is hard coded which means I shall have to
go hacking to achieve what I want.
I assume these changes were made to make accounting better in some way and I
assume my problem is that I can't see what that way is. My old "af" filter
used to get started at the beginning and wait for the "jobstart" line. It
would then respond with "accept" or whatever and then it would sit back
until the "end" line arrived where it would then parse out the printer,
username and the number of pages and log that to a remote printer accounting
daemon. If someone can tell me how I use the new facilities to the same end
then I'd be happy to adapt my code.
For the other type of printer where we just want to know who used it and
we're not bothered about money I have a shell script that reads "end" lines
and parses the username, pages and printer from that. It then write a colon
seperated summary file of the usage which can be shown via CGI on a web
page. All the printers log to the same file. We use the results to claim
costs from research grants.
--
______ Internet :[EMAIL PROTECTED] Jonathan Knight,
/ Department of Computer Science
/ _ __ Telephone : +44 1782 583437 University of Keele, Keele,
(_/ (_) / / Fax : +44 1782 713082 Staffordshire. ST5 5BG. U.K.
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------