> From [EMAIL PROTECTED] Thu Jun 22 09:41:25 2000
> Subject: LPRng: Broken accounting in latest version
> To: [EMAIL PROTECTED]
> Date: Thu, 22 Jun 2000 16:24:22 +0100 (BST)
> From: Jonathan Knight <[EMAIL PROTECTED]>
>
>
>
> 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.
Yes. The problem here is that some filters INSISTED on an AF file
and they broke hard, big time. I spent 2 weeks working on this stuff
before I gave up.
>
> 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:
OOOPPPPSSS!!! The following have been added to the ifhp output.
-Pprinter
-Raccounting_name
-nname
-Aauthid
Do you need others? There is now an option, 'accounting_info'
that you can use to define additional ones you might need. It is currently
set to "AnPR", which passes the -Aid, -nuser, -Pprinter, and -Raccountinfo
values to the filter.
Version 3.3.17 Thu Jun 22 07:49:35 PDT 2000
The accounting information written to the accounting file did
not include user and printer name. The 'accounting_info' option
now allows you to specify the additional command line options you
want added to the line written to the accounting file.
(Reported by: Jonathan Knight <[EMAIL PROTECTED]>)
>
> 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.
See above.
>
> 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.
See the 'LPRng/UTILS/accounting.pl' script.
>
>
> 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.
Same thing...
>
> --
> ______ 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.
-----------------------------------------------------------------------------