Hi Patrick,
            REF: Problem with page count in "acct" file
            ===========================================

I have installed LPRng-3.6.19 and ifhp-3.3.17 on my SGI Indigo2
as you suggested to me a few days ago.

I think I still have the same problem as with the previous
version. That is, the last end "END ..........." is still missing.
Also, the "file start" & "file end" still give '-p0'.
I have copied the "accounting.pl" from UTILS of LPRng-3.6.19 to
/usr/local/libexec/filters.

The printcap has "as" and "ae" specified as before.

The log details are as follows: 

sge 48# lpq -Plp lllll
Printer: lp@sge  'HP LaserJet 4MPlus printer'
 Queue: no printable jobs in queue
 Status: job 'root@sge+568' removed at 09:55:25.584
 Filter_status: (of) Process_job: done at 09:55:24.583
sge 49# lpq -Plp -llll
Printer: lp@sge  'HP LaserJet 4MPlus printer'
 Queue: no printable jobs in queue
 Status: ACCOUNTING_FILTER:  end '-b1' '-T25' '-q3335' '-p12781' 
'-t2000-06-19-10:04:21.355' at 09:55:25.393
 Status: ACCOUNTING_FILTER:  START 'A=root@sge+568' 'P=lp' 'n=root' 
'H=sge.eng.qmw.ac.uk' 'D=962355299' at 09:55:25.395
 Status: ACCOUNTING_FILTER:  start '-q29644' '-p12910' '-t2000-06-30-09:55:01.924' 
'-Aroot@sge+568' '-nroot' '-Plp' at 09:55:25.398
 Status: ACCOUNTING_FILTER:  end '-b1' '-T24' '-q29644' '-p12911' 
'-t2000-06-30-09:55:24.580' '-Aroot@sge+568' '-nroot' '-Plp' at 09:55:25.401
 Status: ACCOUNTING_FILTER: stack [5] 'end '-b1' '-T24' '-q29644' '-p12911' 
'-t2000-06-30-09:55:24.580' '-Aroot@sge+568' '-nroot' '-Plp'' at 09:55:25.404
 Status: ACCOUNTING_FILTER: stack [4] 'start '-q29644' '-p12910' 
'-t2000-06-30-09:55:01.924' '-Aroot@sge+568' '-nroot' '-Plp'' at 09:55:25.407
 Status: ACCOUNTING_FILTER: stack [3] 'START 'A=root@sge+568' 'P=lp' 'n=root' 
'H=sge.eng.qmw.ac.uk' 'D=962355299'' at 09:55:25.409
 Status: ACCOUNTING_FILTER: stack [2] 'end '-b1' '-T25' '-q3335' '-p12781' 
'-t2000-06-19-10:04:21.355'' at 09:55:25.412
 Status: ACCOUNTING_FILTER: stack [1] 'start '-q3335' '-p12780' 
'-t2000-06-19-10:03:58.708'' at 09:55:25.415
 Status: ACCOUNTING_FILTER: stack [0] 'START 'A=root@sge+333' 'P=lp' 'n=root' 
'H=sge.eng.qmw.ac.uk' 'D=961405436'' at 09:55:25.418
 Status: ACCOUNTING_FILTER: APPEND END 't=949863' 'p=1' 's=12780' 'q=12781' 
'D=962355299' 'A=root@sge+333' 'P=lp' 'n=root' 'H=sge.eng.qmw.ac.uk' 'S=961405436' at 
09:55:25.421
 Status: ACCOUNTING_FILTER: END 't=26' 'p=1' 's=12910' 'q=12911' 'D=962355325' 
'A=root@sge+568' 'P=lp' 'n=root' 'H=sge.eng.qmw.ac.uk' 'S=962355299' at 09:55:25.424
 Status: finished 'root@sge+568', status 'JSUCC' at 09:55:25.429
 Status: subserver pid 29587 exit status 'JSUCC' at 09:55:25.481
 Status: [EMAIL PROTECTED]: job 'root@sge+568' printed at 09:55:25.503
 Status: job 'root@sge+568' removed at 09:55:25.584
 Filter_status: (of) Current_pagecounter: write len 0 at 09:55:24.563
 Filter_status: (of) Current_pagecounter: Read_status_line_returned '29' at 
09:55:24.564
 Filter_status: (of) Current_pagecounter: page 1, pagecounter 12911 at 09:55:24.565
 Filter_status: (of) Do_pagecount: pagecounter 12911 at 09:55:24.565
 Filter_status: (of) Init_outbuf: Outbuf 0x1003a5b8, Outmax 10240, Outlen 0 at 
09:55:24.566
 Filter_status: (of) End_of_job: doing pjl at end at 09:55:24.566
 Filter_status: (of) Write_out_buffer: write len 34, read_fd 1, maxtimeout 0 at 
09:55:24.567
 Filter_status: (of) Write_out_buffer: timeout 0, len 34 at 09:55:24.567
 Filter_status: (of) Write_out_buffer: left to write 0, flag 0 at 09:55:24.568
 Filter_status: (of) Write_out_buffer: done, returning 0 at 09:55:24.569
 Filter_status: (of) Init_outbuf: Outbuf 0x1003a5b8, Outmax 10240, Outlen 34 at 
09:55:24.569
 Filter_status: (of) Do_accounting: pagecounter 12911, pages 1 at 09:55:24.580
 Filter_status: (of) Accounting: script '<NULL>', Accountfile 'acct', output 'end 
'-b1' '-T24' '-q29644' '-p12911' '-t2000-06-30-09:55:24.580'' at 09:55:24.581
 Filter_status: (of) Accounting: writing to 6, 'end '-b1' '-T24' '-q29644' '-p12911' 
'-t2000-06-30-09:55:24.580' '-Aroot@sge+568' '-nroot' '-Plp'' at 09:55:24.582
 Filter_status: (of) Process_job: ending OF mode passthrough at 09:55:24.582
 Filter_status: (of) Process_job: done at 09:55:24.583
sge 50# cd /var/spool/lpd/lp
sge 51# ls
acct  control.lp  log  lp  status  status.lp  unspooler.lp
sge 52# ls -al
total 6880
drwx------   2 daemon   daemon        118 Jun 30 09:55 .
drwx------   3 daemon   daemon         20 Jun 12 12:46 ..
-rw-------   1 daemon   daemon        752 Jun 30 09:55 acct
-rw-------   1 daemon   daemon          8 Jun 19 10:00 control.lp
-rw-------   1 daemon   daemon    7006143 Jun 30 09:55 log
-rw-------   1 daemon   daemon          0 Jun 30 09:55 lp
-rw-------   1 daemon   daemon      12158 Jun 30 09:55 status
-rw-------   1 daemon   daemon       9319 Jun 30 09:55 status.lp
-rw-------   1 daemon   daemon          6 Jun 30 09:54 unspooler.lp
sge 53# more acct
START 'A=root@sge+333' 'P=lp' 'n=root' 'H=sge.eng.qmw.ac.uk' 'D=961405436'
start '-q3335' '-p12780' '-t2000-06-19-10:03:58.708'
filestart '-q3337' '-p0' '-t2000-06-19-10:03:59.161'
fileend '-b0' '-T1' '-q3337' '-p0' '-t2000-06-19-10:03:59.247'
end '-b1' '-T25' '-q3335' '-p12781' '-t2000-06-19-10:04:21.355'
START 'A=root@sge+568' 'P=lp' 'n=root' 'H=sge.eng.qmw.ac.uk' 'D=962355299'
start '-q29644' '-p12910' '-t2000-06-30-09:55:01.924' '-Aroot@sge+568' '-nroot' '-Plp'
filestart '-q29617' '-p0' '-t2000-06-30-09:55:02.356' '-Aroot@sge+568' '-nroot' '-Plp'
fileend '-b0' '-T0' '-q29617' '-p0' '-t2000-06-30-09:55:02.440' '-Aroot@sge+568' 
'-nroot' '-Plp'
end '-b1' '-T24' '-q29644' '-p12911' '-t2000-06-30-09:55:24.580' '-Aroot@sge+568' 
'-nroot' '-Plp'sge 54# 

I shall be most grateful if you could check what's wrong with the
"acct" file PLEASE!

If the "acct" file is fixed later on, is there any other utility
or program around the process the "acct" file so that the output
would ONLY give a summary of how many pages each user have printed.
How to reset the "acct" file? Create an empty "acct" file 
immediately after having processed the accounts summary?

I look forward to hearing from you soon.


Many thanks,

Ray


Raymond Lam

Department of Engineering
Queen Mary and Westfield College
University of London
Mile End Road, London, E1 4NS, U.K.
Email: [EMAIL PROTECTED]  Tel.: 020 7882 3047  Fax: 020 8983 3052
>From outside U.K.  Tel.: +44 20 7882 3047    Fax: +44 20 8983 3052                    
>     





-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to