Howdy LPRngers,
I am setting up LPRng and ifhp to do accounting. I have not been able
to get the filters to record the pagecount. Any help would be much
appreciated.
##### Versions
OS: Linux 2.2.5-15 Redhat 6.0
LPRng: 3.7.4 (compiled with --disable-gdbm)
ifhp: 3.4.4
accounting.pl: 5.5 2000/06/09
##### /etc/printcap
test:cm=Spool for testing, use at your own risk
:[EMAIL PROTECTED]
:ifhp=model=hp4plus,status@
:sd=/var/spool/lpd/%P
:sh
:force_localhost
:filter=/usr/local/libexec/filters/ifhp
:of=/usr/local/libexec/filters/ifhp
:as=|/usr/local/libexec/filters/accounting.pl start
:ae=|/usr/local/libexec/filters/accounting.pl end
##### /usr/local/etc/lpd.conf
[ no uncommented entry ]
##### /usr/local/etc/ifhp.conf]
[ standard ifhp.conf plus the following line at the end ]
pagecount
##### Description of problem
1) First, I printed a test page using ifhp only:
[root@emily test]# /usr/local/libexec/filters/ifhp
-Tmodel=hp4plus,dev=123.45.67.89%9100,trace,debug=0 < /tmp/one.txt
ifhp 16:03:07.373 [3966] main: using model 'hp4plus'
ifhp 16:03:08.389 [3966] Check_pagecount: pagecount using 'pjl info pagecount'
ifhp 16:03:08.390 [3966] Process_job: setting up printer
ifhp 16:03:08.391 [3966] Do_sync: getting sync using 'pjl echo'
ifhp 16:03:12.776 [3966] Do_sync: sync done
ifhp 16:03:12.784 [3966] Do_pagecount: pagecounter 606509 after 1 attempts
ifhp 16:03:12.785 [3966] Do_accounting: pagecounter 606509
ifhp 16:03:12.788 [3966] Process_job: sending job file
ifhp 16:03:12.789 [3966] Send_job: starting transfer
ifhp 16:03:12.809 [3966] Use_file_util: file program = '/usr/bin/file -'
ifhp 16:03:12.812 [3966] Filter_file: started FILE_UTIL- 'file'
ifhp 16:03:12.921 [3966] Use_file_util: file information = 'ascii_text'
ifhp 16:03:12.922 [3966] Send_job: initial job type 'ascii_text'
ifhp 16:03:12.924 [3966] Send_job: decoded job type 'PCL'
ifhp 16:03:12.925 [3966] Send_job: job type 'PCL'
ifhp 16:03:12.927 [3966] Send_job: transferring 2 bytes
ifhp 16:03:12.928 [3966] Send_job: 100 percent done
ifhp 16:03:12.929 [3966] Send_job: data sent
ifhp 16:03:12.930 [3966] Process_job: sent job file
ifhp 16:03:12.932 [3966] Do_waitend: getting end using 'pjl job/eoj'
ifhp 16:03:36.025 [3966] Do_waitend: end of job detected
ifhp 16:03:37.772 [3966] Do_pagecount: pagecounter 606512 after 1 attempts
ifhp 16:03:37.774 [3966] Do_accounting: pagecounter 606512, pages 3
ifhp 16:03:37.775 [3966] Process_job: done
This shows that ifhp and the printer are capable of page counting.
2) Then I printed something using lpr and checked the logs :
cavatina@emily ~ 0> echo "1\n2\n3" | lpr -Ptest
[root@emily test]# lpq -llll -Ptest
Printer: test@emily 'Spool for testing, use at your own risk' (dest [EMAIL PROTECTED])
Queue: no printable jobs in queue
Status: Filter_file: pgm '|/usr/local/libexec/filters/accounting.pl start' exited
with status 'JSUCC' at 16:08:15.703
Status: processing 'dfA035emily.engr.twsu.edu', size 6, format 'f', IF filter 'ifhp'
at 16:08:15.704
Status: IF filter 'ifhp' filter finished at 16:08:17.207
Status: sending job 'cavatina@emily+35' to [EMAIL PROTECTED] at 16:08:17.210
Status: connecting to '123.45.67.89', attempt 1 at 16:08:17.210
Status: connected to '123.45.67.89' at 16:08:17.225
Status: requesting printer [EMAIL PROTECTED] at 16:08:17.225
Status: sending control file 'cfA035emily.engr.twsu.edu' to [EMAIL PROTECTED] at
16:08:17.238
Status: completed sending 'cfA035emily.engr.twsu.edu' to [EMAIL PROTECTED] at
16:08:17.265
Status: sending data file 'dfA035emily.engr.twsu.edu' to [EMAIL PROTECTED] at
16:08:17.266
Status: completed sending 'dfA035emily.engr.twsu.edu' to [EMAIL PROTECTED] at
16:08:17.284
Status: done job 'cavatina@emily+35' transfer to [EMAIL PROTECTED] at 16:08:17.284
Status: Filter_file: pgm '|/usr/local/libexec/filters/accounting.pl end' exited with
status 'JSUCC' at 16:08:18.008
Status: subserver pid 4037 exit status 'JSUCC' at 16:08:18.011
Status: [EMAIL PROTECTED]: job 'cfA035emily.engr.twsu.edu' printed at
16:08:18.013
Status: job 'cfA035emily.engr.twsu.edu' removed at 16:08:18.016
Filter_status: setting up printer at 16:08:15.817
Filter_status: pagecounter 0 at 16:08:15.817
Filter_status: sending job file at 16:08:15.819
Filter_status: starting transfer at 16:08:15.819
Filter_status: file program = '/usr/bin/file -' at 16:08:15.820
Filter_status: started FILE_UTIL- 'file' at 16:08:15.822
Filter_status: file information = 'ascii_text' at 16:08:17.194
Filter_status: initial job type 'ascii_text' at 16:08:17.195
Filter_status: decoded job type 'PCL' at 16:08:17.197
Filter_status: job type 'PCL' at 16:08:17.198
Filter_status: transferring 6 bytes at 16:08:17.202
Filter_status: 100 percent done at 16:08:17.203
Filter_status: data sent at 16:08:17.203
Filter_status: sent job file at 16:08:17.203
Filter_status: pagecounter 0, pages 0 at 16:08:17.206
Filter_status: done at 16:08:17.206
JetDirect lpd: no jobs queued on this port
[root@emily test]# cat acct
[ ... ]
START 'A=cavatina@emily+35' 'P=test' 'n=cavatina' 'H=emily.engr.twsu.edu' 'D=985126095'
filestart '-q4039' '-p0' '-t2001-03-20-16:08:15.817' '-Acavatina@emily+35'
'-ncavatina' '-Ptest'
fileend '-b0' '-T2' '-q4039' '-p0' '-t2001-03-20-16:08:17.206' '-Acavatina@emily+35'
'-ncavatina' '-Ptest'
END 't=2' 'p=0' 's=0' 'q=0' 'D=985126097' 'A=cavatina@emily+35' 'P=test' 'n=cavatina'
'H=emily.engr.twsu.edu' 'S=985126095'
Here the logs show the pagecounter to be zero.
I am very new at this, and days of RTFMing hasn't helped. Your help is
greatly appreciated. Thanks in advance!
----------------------------------------------------------------------
This opinions expressed here do not represent those of my computer.
----------------------------------------------------------------------
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------