LPRng: Questions about accounting

2005-01-28 Thread Toby Blake
Hi there,

This goes back to a discussion of Jan 16 2004 with a subject of I'm
lost with accounting, in particular I'm replying to a post made by
Jamie Jennings...

 Also, you need to adjust the following lines in ifhp.conf to have
 appropriate settings for your environment. These lines affect how
 pagecounting will be done. 'pagecount_poll_start' specifies how many
 times to check the page counter when a job starts. In my case, I
 have it check once (ie. just get the number). Then it continues
 polling the pagecounter at 15 second intervals
 ('pagecount_interval') until it gets 2 ('pagecount_poll_end')
 consecutive values that match. Again, adjust these values based on
 testing with your printers (ie. the speed of your printers and the
 amount of delay you want/need between jobs).

 ##pagecount_poll=5
 pagecount_poll_end=2
 pagecount_poll_start=1
 pagecount_interval=15
 pagecount_timeout=0

I've been experimenting with various values for these variables with
an HP2300.  I'm using ifhp as an output filter *only*, purely in an
attempt to get it to write start/end pagecounts to the acct file.

However, on experimenting with the above variables, I find the results
to be unsatisfactory purely on the grounds that to get accurate start
and end pagecounts, I have to slow down the printing process to an
unnacceptable degree.  For instance, I've found that I have to have a
pagecount_poll_start value of 2, as otherwise it will sometimes come
back with a value of 0.  Also, I seem to need a pagecount_interval of
at least 10 and a pagecount_poll_end value of at least 3 for the end
pagecount to be logged correctly.  All this means that every print job
has a delay of at least 10 seconds at the start and at least 20
seconds at the end.  This is unacceptable for a busy printer.

I was wondering if other people have come up across this kind of
problem and what they do to overcome it?

Cheers
Toby Blake
University of Edinburgh


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRng MAILING LIST
The address you post from or your Reply-To address 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.
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,  call Patrick Powell or one of the friendly
staff at Astart Technologies for help.  Astart also does support for LPRng.
Also, check the Web Page at: http://www.lprng.com for any announcements.
Astart Technologies  (LPRng - Print Spooler http://www.lprng.com)
6741 Convoy Court
San Diego, CA 92111
858-874-6543 FAX 858-751-2435
-


Re: LPRng: ifhp and Xerox 4400

2004-09-13 Thread Toby Blake
This is resurrecting an old thread...

  Following various debates here about the virtues of proper postscript
  vs HP emulated postscript, we've bought a Xerox Phaser 4400 printer
  for testing.  It doesn't seem to play nicely with our hand-made print
  filters, so I've just downloaded ifhp to have a look at it.
 
  What do other people who use Xerox 4400s use as the printer model in
  ifhp.conf?
 
  And also, a very minor question, does ifhp use ppd files in any way -
  there is no mention in the howto of the text 'ppd' at all, which
  surprised me slightly.
 
  Cheers
  Toby Blake
  University of Edinburgh
 
 
 You might just try ifhp with the default printer first.  The newer versions
 of the phasers seem to be quite civilized.
 
 Patrick
 
 lp:filter=/usr/libexec/filters/ifhp
   :ifhp=status@ # try with no status FIRST
   :
 
 If this works, try turning on the 'status' or 'backchannel' stuff:
 
 lp:filter=/usr/libexec/filters/ifhp
   :

I've tried with the default printer as Patrick suggested and although
the job is printed, I get a '^L%%[ Error: undefined; OffendingCommand:
^D^[ ]%%' error in the status file.

Is anyone else using LPRng/ifhp to print to a Xerox Phaser 4400DT (or
any other Xerox Phaser) and can recommend the correct ifhp commands?

Also, in another reply to my mail, Patrick said...

 As of the next release of ifhp,  you will be able to use foomatic-rip
 and the associated ppd files with ifhp:

 lp:filter=/path/to/ifhp --ppd=/path/to/ppdfile

 OR

 lp:filter=/path/to/ifhp
   :ppd_file=/path/to/ppdfile

Has this been implemented yet?  These options aren't mentioned in even
the LPRng or ifhp reference manuals.

I'm using LPRng 3.8.27 and ifhp-3.5.17

Cheers
Toby Blake
University of Edinburgh


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRng MAILING LIST
The address you post from or your Reply-To address 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.
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,  call Patrick Powell or one of the friendly
staff at Astart Technologies for help.  Astart also does support for LPRng.
Also, check the Web Page at: http://www.lprng.com for any announcements.
Astart Technologies  (LPRng - Print Spooler http://www.lprng.com)
6741 Convoy Court
San Diego, CA 92111
858-874-6543 FAX 858-751-2435
-


LPRng: More on runaway lpd processes under RH9

2004-08-24 Thread Toby Blake
Hi all,

This is in connection with fairly frequent runaway lpd processes that
we're seeing using LPRng-3.8.27 under RH9 - by fairly frequent, I
mean 5 or more a week on 5 print servers, serving about 60 printers
between them.  A description of the problem is attached at the end of
this message from my previous mail to the list.  It's definitely not
connected with futexes, as I orginally thought, as I see the same
symptoms when running without futexes.

I have turned on debugging to level 3 on a queue to try and get some
information, this is the end part of the log for the most recent one
I've seen this problem on:

2004-08-24-17:19:56.177 cessnock [14080] (Server)  at3: cleanup: done,
exit(0)
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:
Update_spool_info: file 'control.pr'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:
Get_spool_control:  file 'control.pr'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3: Get_file_image:
'control.pr', maxsize 0
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3: Checkread: file
'control.pr'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3: Checkread:
'control.pr' fd 5, size 73
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3: Get_fd_image: fd
5
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3: Get_fd_image:
len 73 'debug=3
printing_aborted=0x0
pr'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3: ***
Dump_subserver_info: 'Do_queue_jobs - after setup' - 1 subservers
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:  server 0 -
0x80c4498, count 7, max 102, list 0x80c6c80
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:   [ 0] 0x80c5e80
='debug=3'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:   [ 1] 0x80c3fb8
='printer=at3'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:   [ 2] 0x80c5eb0
='printing_aborted=0x0'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:   [ 3] 0x80c3f78
='printing_disabled=0x0'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:   [ 4] 0x80c73b8
='queue_control_file=control.pr'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:   [ 5] 0x80c7660
='spooldir=/var/spool/lpd/at3'
2004-08-24-17:21:13.051 cessnock [14089] (Server)  at3:   [ 6] 0x80c76b8
='spooling_disabled=0x0'

.. at this point nothing more gets logged to the log file.  Other
runaway processes show the same.

I've also debugged the runaway process with gdb a couple of times and
it's been stuck at the same point each time, namely after the call to
'opendir (.)' in Scan_queue in getqueue.c (line 82).  Here's the
backtrace from gdb:

(gdb) bt
#0  0x4023697b in malloc_consolidate () from /lib/i686/libc.so.6
#1  0x40236007 in _int_malloc () from /lib/i686/libc.so.6
#2  0x40235a34 in calloc () from /lib/i686/libc.so.6
#3  0x4026bdc7 in opendir () from /lib/i686/libc.so.6
#4  0x0804fa53 in Scan_queue (spool_control=0x80bc640,
sort_order=0x80bc0b4, 
pprintable=0xbfff97bc, pheld=0xbfff97c0, pmove=0xbfff97c4, 
only_queue_process=1, perr=0xbfff97c8, pdone=0xbfff97cc, 
remove_prefix=0x0, remove_suffix=0x0) at common/getqueue.c:82
#5  0x0806280b in Do_queue_jobs (name=0x11 Address 0x11 out of bounds,

subserver=0) at common/lpd_jobs.c:566
#6  0x080714dc in Receive_secure (sock=0xbfffa330, 
input=0x808ab58 U\211åWVS\203ì\024\213}$\213u ÇEð)
at common/lpd_secure.c:247
#7  0x080617d5 in Service_lpd (talk=-1, 
from_addr=0xbfffa360 129.215.45.134 port 43234)
at common/lpd_dispatch.c:341
#8  0x080614d0 in Service_connection (args=0xbfffa360)
at common/lpd_dispatch.c:310
#9  0x0805d8c5 in Do_work (name=0x809fd68 server, args=0xbfffa490)
at common/linelist.c:3847
#10 0x0805d676 in Make_lpd_call (name=0x809fd68 server,
passfd=0xbfffa4a0, 
args=0xbfffa490) at common/linelist.c:3820
#11 0x0805d9e7 in Start_worker (name=0x809fd68 server,
parms=0xbfffa500, 
fd=14) at common/linelist.c:3876
#12 0x0804d3a7 in Accept_connection (sock=8, lpd_socket=0,
unix_socket=0)
at common/lpd.c:1008
#13 0x0804be3a in main (argc=1, argv=0xbfffa7b4, envp=0x1) at
common/lpd.c:687
#14 0x401d7a67 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)

But I'm a bit stuck as to what I can do next to try and work out what
is happening to these proceses to make them run away.  I can't debug
into the system calls.  Where is . when the opendir is called?

I'd very much appreciate any advice on what I can do next - is it a
RH9 problem or an LPRng problem?  What can I try next, etc?

Cheers
Toby Blake
University of Edinburgh

 I'm running LPRng-3.8.27.
 
 However, I'm still seeing runaway lpd processes - it's always the
 'server' process and it consumes as much CPU as it can - an lpc kill
 fixes the problem, but obviously this impacts on the overall
 reliability of the printing system - it's happened twice in the last
 day or so.
 
 I was wondering if anyone else has seen this problem at all.  Here's
 an example of it happening:
 
 [kant]toby: lpq -Pat8
 Printer: [EMAIL PROTECTED] 'HP Laserjet

LPRng: Re: lpd multithreaded? futex lockups under RH9

2004-06-03 Thread Toby Blake
Hi all,

Replying to my own email here.  I think this might have been related
to Redhat 9 kernel stuff, as I suspected in my orginal email.  I found
this in the RH9 release notes:

 If an application does not work properly with NPTL, it can be run using
 the old LinuxThreads implementation by setting the following
 environment variable:

 LD_ASSUME_KERNEL=kernel-version

 The following versions are available:

 - 2.4.1 - Linuxthreads with floating stacks

 - 2.2.5 - Linuxthreads without floating stacks-- 

So, I've been running lpd with LD_ASSUME_KERNEL=2.4.1.

I'm running LPRng-3.8.27.

However, I'm still seeing runaway lpd processes - it's always the
'server' process and it consumes as much CPU as it can - an lpc kill
fixes the problem, but obviously this impacts on the overall
reliability of the printing system - it's happened twice in the last
day or so.

I was wondering if anyone else has seen this problem at all.  Here's
an example of it happening:

[kant]toby: lpq -Pat8
Printer: [EMAIL PROTECTED] 'HP Laserjet 8150DN in 5.05 (Level 5 West Lab) AT'
 Queue: 7 printable jobs
 Server: pid 8178 active
 Status: job '[EMAIL PROTECTED]' removed at 16:02:46.028
 Rank   Owner/ID   Pr/Class Job Files Size Time
1  [EMAIL PROTECTED]A   372 print.ps224344 16:04:36
[kant]toby:

.. with the 8178 process chewing up all CPU, until an lpc kill kills
this process and gets the queue moving again.  Note that strace
doesn't reveal anything at all - not a single line of output.  I have
enabled debugging on this queue, so will hopefully get some
information if/when I get the next runaway.

I'd appreciate any advice that people can offer, or if anyone has seen
similar problems.  Also, if people are successfully running LPRng
under RH9.  It's interesting that I see runaways both before and after
setting the LD_ASSUME_KERNEL env variable.

Thanks
Toby 

On Tue, 11 May 2004, Toby Blake wrote:

 Date: Tue, 11 May 2004 13:28:06 +0100 (BST)
 From: Toby Blake [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: lpd multithreaded? futex lockups under RH9
 
 Hi all,
 
 Firstly, I should point out that my knowledge of kernel type things is
 very limited, so some of this may make little sense.
 
 Firstly, is lpd a multithreaded application?  I ask because I'm seeing
 the occasional runaway lpd process (it's always the queue server
 process) which I think might be connected with multithreading under
 Redhat 9.  This process uses up close to 100% of CPU time and prevents
 the queue it serves from doing anything.  It will stop doing this if I
 do an 'lpc kill' of the process.
 
 What I see when doing a strace of the process is...
 
 [monotype]root: ps -ef|grep 24016
 lp   24016 13270 18 May09 ?07:31:54 lpd (Server) 'bp8'
 [monotype]root: strace -p 24016
 futex(0x42133220, FUTEX_WAIT, 2, NULL unfinished ...
 [monotype]root:
 
  which some web searching reveals to be connected with NPTL,
 futexes, multithreading, etc, under Redhat 9, which is where the limit
 of my kernel knowledge is comfortably surpassed.
 
 Has anyone else seen this and, more importantly, can they suggest a
 fix?
 
 Many thanks in advance
 Toby Blake
 University of Edinburgh
 
 


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


LPRng: How to stop a print queue accepting jobs (yet still continue printing)

2004-05-25 Thread Toby Blake
Hi there,

I'd always assumed that 'lpc disable' would stop new jobs being added
to the print queue, yet continue to print all jobs currently in the
queue.  This doesn't seem to be the case - it stops new jobs being
added, but doesn't print anything once the currently printing job has
finished.

Is there any way of doing this?

Cheers
Toby Blake
University of Edinburgh


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


LPRng: lpd multithreaded? futex lockups under RH9

2004-05-11 Thread Toby Blake
Hi all,

Firstly, I should point out that my knowledge of kernel type things is
very limited, so some of this may make little sense.

Firstly, is lpd a multithreaded application?  I ask because I'm seeing
the occasional runaway lpd process (it's always the queue server
process) which I think might be connected with multithreading under
Redhat 9.  This process uses up close to 100% of CPU time and prevents
the queue it serves from doing anything.  It will stop doing this if I
do an 'lpc kill' of the process.

What I see when doing a strace of the process is...

[monotype]root: ps -ef|grep 24016
lp   24016 13270 18 May09 ?07:31:54 lpd (Server) 'bp8'
[monotype]root: strace -p 24016
futex(0x42133220, FUTEX_WAIT, 2, NULL unfinished ...
[monotype]root:

 which some web searching reveals to be connected with NPTL,
futexes, multithreading, etc, under Redhat 9, which is where the limit
of my kernel knowledge is comfortably surpassed.

Has anyone else seen this and, more importantly, can they suggest a
fix?

Many thanks in advance
Toby Blake
University of Edinburgh


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


LPRng: Re: Bug reports

2004-05-04 Thread Toby Blake
Hi there,

The bugs that I referred to in my message below, concerning data
coming from a program, rather than a static file still seem to be in
the new version of LPRng.

To reiterate, I'm happy to do whatever debugging is required.

Thanks
Toby Blake
University of Edinburgh

  Post it to the LPRng mailing list.
 
 OK, thanks.
 
  I try to read the list as often as I can and I always fix the bugs
  or apply patches that are there.
 
 I'm afraid I can't offer patches, but can I point you towards a couple
 of threads?
 
 Firstly, this one, dealing with checkpc giving an error when getting
 data from a program:
 
 http://groups.yahoo.com/group/lprng/message/12749
 
 Secondly, this thread dealing with using 'lpc -a status':
 
 http://groups.yahoo.com/group/lprng/message/12385
 
 ... noting...
 
 http://groups.yahoo.com/group/lprng/message/12442
 
 I'm happy to do any further debugging.
 
 Cheers
 Toby
 
 


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


LPRng: Re: Bug reports

2004-04-26 Thread Toby Blake
 Post it to the LPRng mailing list.

OK, thanks.

 I try to read the list as often as I can and I always fix the bugs
 or apply patches that are there.

I'm afraid I can't offer patches, but can I point you towards a couple
of threads?

Firstly, this one, dealing with checkpc giving an error when getting
data from a program:

http://groups.yahoo.com/group/lprng/message/12749

Secondly, this thread dealing with using 'lpc -a status':

http://groups.yahoo.com/group/lprng/message/12385

... noting...

http://groups.yahoo.com/group/lprng/message/12442

I'm happy to do any further debugging.

Cheers
Toby



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


LPRng: Bug reports

2004-04-23 Thread Toby Blake
I've asked this question before, but generally buried in other posts,
so this one gets a post of its own.

How and where do I submit what I think are bugs in LPRng?

For instance, I think that LPRng is a bit broken in some respects when
dealing with getting printcap information from a program, rather than
a file.  For the interested, see previous posts of mine about lpc -a
status and more recently about checkpc failing.

Toby


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


Re: LPRng: waiting for subserver to exit

2004-04-02 Thread Toby Blake
Hi there,

 Sometimes the queue stalls, it seems that there is a sub server that
 doesn't die as it should. After a while in this state the sub server
 dies and next job gets processed and then stalled. This time a
 little bit longer. Each job thereafter get stalled and the time
 waiting for the sub server to die is a little bit longer.

 The behaviour is pretty much the same as described here:
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg06137.html

Yes, this does sound like the same problem that I see - do you see a
relationship between the number of jobs in the queue and the length of
delay?

Looking at the Changelog for 3.8.23 it appears that issues to do with
'chooser' were addressed, which might fix this problem.  Unfortunately
I've been unable to test it myself in detail as the later versions of
LPRng seem to have problems with getting printcap information from a
program (which I posted about here last week).

Speaking of which, is there a way of submitting bug reports for LPRng?
I've mailed here and to Patrick in person, but I don't know if he
reads either.

Toby


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


LPRng: Re: Upgrade to 3.8.26, checkpc gives me Init_tempfile: bad tempdir

2004-03-26 Thread Toby Blake
I've been doing a bit more testing on this...

 Slightly more information on this.  There definitely seems to be
 some sort of problem with LPRng getting printcap info from a file.

Oops, that should have read from a program.

A bit more information here...

Digging through the code a bit, I can see that the cause of this...

2004-03-24-15:38:32.443 pancakes Init_tempfile: bad tempdir '/var/spool/lpd/%P'

... is in Init_tempfile in linelist.c:

if( Is_server ){
if( dir == 0 )  dir = Spool_dir_DYN;  -
if( dir == 0 )  dir = Server_tmp_dir_DYN;
} else {
dir = getenv( LPR_TMP );
if( dir == 0 ) dir = Default_tmp_dir_DYN;
}

So, 'dir' is being set to the value of Spool_dir_DYN, which has been
set to '/var/spool/lpd/%P', which obviously isn't a valid directory
name.

If I just comment out this line then LPRng seems to work OK with
getting data from a program, at least initially, but obviously this
isn't an ideal long-term solution.

Toby


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


LPRng: Upgrade to 3.8.26, checkpc gives me Init_tempfile: bad tempdir

2004-03-24 Thread Toby Blake
Hi there,

I'm experiencing fairly major problems after upgrading from
LPRng-3.8.21 to LPRng-3.8.26.

I have a print queue named bptest which was working fine under 3.8.21.
I've now upgraded the server to 3.8.26 (nothing else except the
version of LPRng has changed) and it doesn't seem to work at all:

[kant]toby: lpq -Pbptest
Printer '[EMAIL PROTECTED]' - 
error 'ERROR TRANSFERRING DATA' sending '^Hbptest C toby kerberos' to [EMAIL PROTECTED]
¨´ÿ¿°Â
[kant]toby:

On further investigation on the server side, I did note that checkpc
on the server is now giving me an error.  I have completely removed
the spool dir and tried to get checkpc to create it again but it still
gives me the error and doesn't create any dirs or files:

[pancakes]root: checkpc -f -V -Pbptest
LPRng-3.8.26, Kerberos5, Copyright 1988-2003 Patrick Powell, [EMAIL PROTECTED]
Checking for configuration files '/etc/lpd/lpd.conf'
  found '/etc/lpd/lpd.conf', mod 0100644
Checking for printcap files '| -$ /usr/bin/pcap-query'
Checking for lpd only printcap files '/etc/lpd/lpd_printcap'
2004-03-24-15:38:32.443 pancakes Init_tempfile: bad tempdir '/var/spool/lpd/%P'
[pancakes]root:


For info, the printcap information for this printer on the server side
is:

[pancakes]root: echo bptest|pcap-query 
bptest|testing:tc=.hpcommon_nohpdriver:tc=.krbserver
.hpcommon_nohpdriver|tc entry for HP printers (uses socket interface on 
printer):lp=%P.inf.ed.ac.uk%9100:sd=/var/spool/lpd/%P:sh:mx=0:mc=0:if=/usr/share/printing/psif:stalled_time#600:ac=acct
.krbserver|kerberos server-side auth data:kerberos_keytab=/etc/lpd.keytab
[pancakes]root:


Although what the connection between a tempdir and the spool directory
is, I don't know.

Can anyone offer any advice?

Many thanks in advance
Toby Blake
University of Edinburgh


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


LPRng: Re: Upgrade to 3.8.26, checkpc gives me Init_tempfile: bad tempdir

2004-03-24 Thread Toby Blake
As an addendum to my previous message...

I've just done a very small test, specifically dumped the printcap
data into a file...

echo bptest|pcap-query  /etc/printcap

...  and told lpd.conf to use this.

And now everything works fine.

So, it seems to me that since LPRng-3.8.21, something has changed such
that it won't get its printcap data from our program correctly.  I
should restate that as far as I'm aware this program behaves exactly
as it should - it's passed a queuename on STDIN and outputs the
printcap data on STDOUT.  Versions 3.8.21 and before worked OK with
it.

I'd be interested in hearing the experiences of other LPRng users who
use a program to distribute printcap data, rather than a static file.
I've seen other problems relating to this (see a previous post of
mine about lpq -a status not working correctly.)

Cheers
Toby


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


LPRng: Re: Upgrade to 3.8.26, checkpc gives me Init_tempfile: bad tempdir

2004-03-24 Thread Toby Blake
Slightly more information on this.  There definitely seems to be some
sort of problem with LPRng getting printcap info from a file.

 echo bptest|pcap-query  /etc/printcap
 
 ...  and told lpd.conf to use this.
 
 And now everything works fine.

As a further test, I put the contents of the everything-working-OK
/etc/printcap above into a program which merely cats it to STDOUT:

[pancakes]toby: cat ~/tmp/pcap-query.test
cat EOF
bptest|testing:tc=.hpcommon_nohpdriver:tc=.krbserver
.hpcommon_nohpdriver|tc entry for HP printers (uses socket interface on 
printer):lp=%P.inf.ed.ac.uk%9100:sd=/var/spool/lpd/%P:sh:mx=0:mc=0:if=/usr/share/printing/psif:stalled_time#600:ac=acct
.krbserver|kerberos server-side auth data:kerberos_keytab=/etc/lpd.keytab
EOF
[pancakes]toby:

... and changed lpd.conf, so it looks here for printcap information:

[pancakes]root: grep printcap_path /etc/lpd/lpd.conf
#printcap_path=| -$ /usr/bin/pcap-query
#printcap_path=/etc/printcap
printcap_path=| -$ /home/toby/tmp/pcap-query.test

... and it's broken again, with the same error from checkpc.

Note that this is testing the exact same printcap information in
/etc/printcap (works OK) and coming from a program (doesn't work).

Should I submit this as a bug and if so, how do I do it?

Cheers
Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2004-03-15 Thread Toby Blake
Hi there,

 Couldn't this be that your server is short on memory and spend all
 its time swapping memory ?
 
 What does the 'top' command says wrt memory usage ?

Definitely not memory - there's plenty free.

Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2004-03-15 Thread Toby Blake
Hi there,

 What kind of chooser are you running? Old versions of LPRng would
 run the chooser script/program once for every job in the queue,
 every time it checked. This meant the longer the queue, the longer
 the load, the longer the time to run the chooser, the more the queue
 growing and so on..

Sorry, i'm not sure what you mean by 'chooser' - can you clarify?

Cheers
Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2004-03-15 Thread Toby Blake
 It is the same problem we and quite a few other people are having.
 If you have the HP 8150 printers there is a new firmware upgrade for
 them that might solve the problem. Otherwise I really don't know
 what to tell you.

Is it this problem?  I'd thought that was a printer side problem,
which could be consistently replicated, not a server side problem
which only happened with a large queue.

Cheers
Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2004-03-12 Thread Toby Blake
Hmmm, going back to this problem we see when print queues get large
and the print server load is extremely high, can anyone explain why
this happens (for technical info see previous messages in this thread
- I won't repost it all here).

We run student labs and times like today, where assignments are due
in, result in printers running extremely slowly, but the delay is
between the jobs (i.e. the printer is doing nothing between each
printed job, the delay is at the server side) and is definitely
related to the size of the queue, e.g.

[kant]toby: lpq -s -Pat3
[EMAIL PROTECTED] 49 jobs
[kant]toby: lpq -s -Pat8
[EMAIL PROTECTED] 36 jobs
[kant]toby:

[dickinson]lp: uptime
  4:03pm  up 119 days, 22:49,  1 user,  load average: 9.64, 9.18, 7.20

The delay between jobs right now, with this load and these queues is
14 minutes.  This delay occurs here:

finished '[EMAIL PROTECTED]', status 'JSUCC' at 2004-03-12-15:42:49.171 ## [EMAIL 
PROTECTED] number=712 process=16602
waiting for subserver to exit at 2004-03-12-15:56:16.463 ## A=NULL number=0 
process=14349
subserver pid 16602 exit status 'JSUCC' at 2004-03-12-15:56:16.463 ## A=NULL 
number=0 process=14349

... so after the job has successfully printed, it waits for an lpd
process to exit, which takes 14 minutes.

What are the lpd processes doing in the time that chews up so much CPU
- this is very much related to the size of the queue - if I removed
half the jobs in the queue, the delay between jobs would significantly
decrease (I know this because I've tried it).

Note that our print servers are currently running RH7.1 - I'll be
upgrading them to RH9 soon, although I'm not sure this will have any
effect.  They're running either LPRng 3.8.10 or 3.8.21 -  this happens
with both.

I'd appreciate any help or advice as to what we can do to stop this
happening - note again that it only happens when there are a lot of
print jobs in the queue, so 99.9% of the time we have no problems
whatsoever - I have watched the load increase and the delay between
jobs increase as more are added to the queue.

Many thanks in advance
Toby Blake
University of Edinburgh


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


LPRng: recommended way to print to Xerox Phaser 4400

2004-03-04 Thread Toby Blake
Hi there,

I've been running some tests on a Xerox Phaser 4400 and am seeing
delays of more than a minute when printing to the Socket API port,
i.e. port 9100.

At first I thought it might be a problem with LPRng or our filters,
but this doesn't seem to be the case, as sending postscript directly
to the port also produces the same delays, whereas printing to
[EMAIL PROTECTED] is instantaneous.  Here's an example of what I mean:

Sending job directly to port 9100 of the xerox printer takes over a
minute:

[host]lp: time nc xerox_printer 9100  ~toby/linux/SOURCES/LPRng-3.8.21/UTILS/one.ps

real1m15.754s
user0m0.010s
sys 0m0.000s

... but the same command to an HP printer is immediate

[host]lp: time nc hp_printer 9100  ~toby/linux/SOURCES/LPRng-3.8.21/UTILS/one.ps

real0m0.022s
user0m0.010s
sys 0m0.000s
[sybies]lp:

lpr [EMAIL PROTECTED] is also instantaneous.

Has anyone else seen this kind of problem?  What do others use in the
lp= part of printcaps for Xerox Phasers?

Thanks in advance
Toby Blake
University of Edinburgh


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


LPRng: append_z being done twice

2004-02-16 Thread Toby Blake
Hi there,

I'm seeing the same problem as mentioned in the email below.  I'm
using LPRng-3.8.21.  I can't see anything in the CHANGES file that
suggests it's been fixed since.

Cheers
Toby

* From: Anthony Thyssen
* Subject: LPRng: BUG append_z is done twice!
* Date: Fri, 01 Nov 2002 00:29:25 -0800 

I added addend_z=fmt=3 to my /etc/printcap entry for a printer
and it was added to the control file twice!!!

Eg:   Zuser_input
becameZuser_input,fmt=3,fmt=3

Most annoying, and obviously a bug.

this happenes some time before the incoming_control_filter is run as
the modified CF file with the doubled Z option is passed to it.  --


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2004-02-03 Thread Toby Blake
 50% of CPU used by lpd certainly looks like a problem to me.  This
 is definitely not typical.  Are you also seeing a lot of disk
 activity?

No, nothing unusual.

 Have you posted your printcap yet?

Hmm, difficult to do as it gets printcap data out of ldap.  Here's the
printcap data for the one printer in use, in the example I posted
(note that it includes two tc entries...

[printhost]toby: echo jc3|pcap-query 
jc3|jc1619|day|lj16|hp16|HP LaserJet 8150DN in 1619 
JCMB:tc=.hpcommon_nohpdriver:tc=.krbserverjcmb
.hpcommon_nohpdriver|tc entry for HP printers (uses socket interface on 
printer):lp=%P.inf.ed.ac.uk%9100:sd=/var/spool/lpd/%P:sh:mx=0:mc=0:if=/usr/share/printing/psif:stalled_time#600:ac=acct
.krbserverjcmb|kerberos server-side auth data for JCMB:kerberos_keytab=/etc/lpd.keytab
[printhost]toby:

Cheers
Toby


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


Re: LPRng: lpc -a status doesn't seem to work, but lpc -Pname status does

2004-02-03 Thread Toby Blake
Hmmm, this does seems to be broken, as far as I can see - we need this
for Java, as a strace reveals it does an lpc -a status to find
available printers.

Just to reiterate, lpc doesn't seem to be properly querying the
printcap for 'all'

[locke]toby: lpc -a status
Printer '[EMAIL PROTECTED]' - cannot open connection - No such file or directory
Make sure the remote host supports the LPD protocol
and accepts connections from this host and from non-privileged (1023) ports
[locke]toby:

It seems to think there's an [EMAIL PROTECTED], instead of looking up the
printcap.  Whereas, if I pipe 'all' to our printcap-lookup utility:

[locke]toby: echo all|pcap-query 
fh2|fh-c25|hpfh2|HP Laserjet 4100DTN [1200dpi] in C25 FH:[EMAIL 
PROTECTED]:tc=.krbclienfh
.a big long list of printers.

And getting an 'lpc status' of a specific printer works fine:

[kant]toby: lpc -Pfh2 status
 Printer   Printing Spooling Jobs  Server Subserver Redirect Status/(Debug)
[EMAIL PROTECTED] enabled  enabled0nonenone
[kant]toby:

Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2004-01-30 Thread Toby Blake
Hi again,

 What is causing the load such that the main lpd process is so busy?
 Does the size of the queues affect how much lpd does?  This machine
 is only serving 8 printers and when the load has been really high,
 it has only ever been one or two printers with large queues - the
 other queues have been empty.

Here's an example of the load being driven up, when only one printer
has a queue, note that the delay betweeb jobs is proportional to the
length of the queue.

The load here is 2.50, this top output is displaying all processes for
the 'lp' user, the processes are:

5639 - the 'main' lpd process
6121 - the 'server' process for this queue
7214 - the process for the job that has just printed

  2:05pm  up 25 min,  2 users,  load average: 2.50, 2.02, 1.27
68 processes: 64 sleeping, 3 running, 1 zombie, 0 stopped
CPU states: 94.4% user,  5.5% system,  0.0% nice,  0.0% idle
Mem:   513192K av,  245952K used,  267240K free,   0K shrd,5928K buff
Swap:  530136K av,   0K used,  530136K free  186672K cached

  PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 6121 lp25   0  6776 6776  2108 R50.1  1.3   4:43 lpd
 5639 lp15   0  1792 1792  1600 S 0.0  0.3   0:00 lpd
 7214 lp16   0 00 0 Z 0.0  0.0   0:00 lpd defunct

And here is the actual queue at the time of the above top output (with
usernames and hostnames changed).  Is having this number of jobs in
the queue enough to cause the load to be this high, or is this
symptomatic of some problem?  This machine only does print serving.

[kant]toby: lpq -Pjc1
Printer: [EMAIL PROTECTED] 'HP Laserjet 8150DN in Room1, South Machine Halls JCMB'
 Queue: 13 printable jobs
 Server: pid 6121 active
 Unspooler: pid 7214 active
 Status: finished '[EMAIL PROTECTED]', status 'JSUCC' at 14:05:44.470
 Filter_status: job completed for [EMAIL PROTECTED]
 Rank   Owner/ID   Class Job Files Size Time
active [EMAIL PROTECTED] A   838 (STDIN) 122948 13:51:50
2  [EMAIL PROTECTED] A   997 (STDIN) 379322 13:53:12
3  [EMAIL PROTECTED] A   419 /tmp/AcroLTZVI7 340854 13:55:31
4  [EMAIL PROTECTED] A   438 /tmp/Acroq0ollh 402637 13:56:49
5  [EMAIL PROTECTED] A   468 /tmp/AcroslEQ0m 257239 13:57:08
6  [EMAIL PROTECTED] A   485 /tmp/AcroyYZa42 309569 13:57:22
7  [EMAIL PROTECTED] A   501 /tmp/Acro6tgCRQ 416470 13:57:37
8  [EMAIL PROTECTED] A41 (STDIN) 112610 13:59:57
9  [EMAIL PROTECTED]  A48 (STDIN)  96567 14:00:48
10 [EMAIL PROTECTED] A   541 /tmp/AcroGuOyb8 463561 14:02:16
11 [EMAIL PROTECTED] A   557 /tmp/Acro0sRYDv 120374 14:02:48
12 [EMAIL PROTECTED] A   749 delete.pdf   58779 14:04:31
13 [EMAIL PROTECTED] Z   753 delete.pdf   58779 14:05:23
[kant]toby:

Note that I'm running LPRng-3.8.10 - I haven't had a chance to test
newer versions properly, but will do so soon.

Cheers
Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2004-01-30 Thread Toby Blake
 Note that I'm running LPRng-3.8.10 - I haven't had a chance to test
 newer versions properly, but will do so soon.

I've just looked through the CHANGES file and see that a fair bit of
stuff related to this was changed in 3.8.20.  I'll upgrade as soon as
I can and see if this makes a difference.

Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2004-01-29 Thread Toby Blake
Hi,

Can I just ask a further question about this

What is causing the load such that the main lpd process is so busy?
Does the size of the queues affect how much lpd does?  This machine is
only serving 8 printers and when the load has been really high, it has
only ever been one or two printers with large queues - the other
queues have been empty.

Cheers
Toby

 These processes are 'zombies' waiting for the main LPD process to
 harvest (wait) for them.  The LPD code is waiting in a select
 loop for either a process to exit or for a connection.
 
 Setup_waitpid_break();
 errno = 0;
 fd_available = select( max_socks,
 FD_SET_FIX((fd_set *))readfds,
 FD_SET_FIX((fd_set *))0,
 FD_SET_FIX((fd_set *))0, timeout );
 err = errno;
 Setup_waitpid();
 
 plp_signal_t sigchld_handler (int signo)
 {
 signal( SIGCHLD, SIG_DFL );
 write(Lpd_request,\n, 1);
 }
 
 void Setup_waitpid (void)
 {
 signal( SIGCHLD, SIG_DFL );
 }
 
 void Setup_waitpid_break (void)
 {
 (void) plp_signal_break(SIGCHLD, sigchld_handler);
 }
 
 So under load, the LPD server will probably wait in the select for 
 a while.
 
 Patrick


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


Re: LPRng: lpc -a status doesn't seem to work, but lpc -Pname status does

2004-01-26 Thread Toby Blake
Hi there,

   'echo all|pcap-query' works as specified too.
 
 Maybe you could show us the output, too?
 
 And what exactly are the error messages you're getting?

I did have them in my original post.  I'll include a small bit of
output later in this post.

 When I do something like lpc status all, I get:
 
   Printer '[EMAIL PROTECTED]' - cannot open connection - No such file or directory
   Make sure the remote host supports the LPD protocol
   and accepts connections from this host and from non-privileged (1023) ports
Aha, I too get this from machines that don't have an lpd running...

[locke]toby: lpc -a status
Printer '[EMAIL PROTECTED]' - cannot open connection - No such file or directory
Make sure the remote host supports the LPD protocol
and accepts connections from this host and from non-privileged (1023) ports
[locke]toby:

... but for a machine which does have an lpd running (for a locally
attached printer), I get what I posted originally:

[kant]toby: lpc -a status 
 Printer   Printing Spooling Jobs  Server Subserver Redirect Status/(Debug)
[EMAIL PROTECTED]  enabled  enabled0nonenone
[EMAIL PROTECTED]: spool queue for 'fh2' does not exist on server kant.inf.ed.ac.uk
   non-existent printer or you need to run 'checkpc -f'
[EMAIL PROTECTED]: spool queue for 'jc4' does not exist on server kant.inf.ed.ac.uk
   non-existent printer or you need to run 'checkpc -f'


And doing my printcap lookup of 'all' on either of these machines
gives me:

[kant]toby: echo all|pcap-query |head -5
local:lp=/dev/lp0:if=/usr/share/printing/psif:sd=/var/spool/lpd/%P:sh:mx=0:mc=0
fh2|fh-c25|hpfh2|HP Laserjet 4100DTN [1200dpi] in C25 FH:[EMAIL 
PROTECTED]:tc=.krbclientfh
sb2|sb-c1|hpsb2|HP Laserjet 4050N [1200dpi] in C1 SB:[EMAIL PROTECTED]:tc=.krbclientsb
jc4|HP Laserjet 4500 in KB:[EMAIL PROTECTED]:tc=.krbclientjcmb
...

As I said, this printcap output is fine for lpr, lpq, lpd...  lpc
doesn't seem to be taking noticed of the [EMAIL PROTECTED]
part which directs it to the correct print server.

 but if I specify lpc status [EMAIL PROTECTED], then it works.  Maybe
 your problem is related?

This isn't really an option as we have five print servers.

All this is because a java program that we need to support finds out
about local printers by doing 'lpc -a status'.

Toby


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


Re: LPRng: lpc -a status doesn't seem to work, but lpc -Pname status does

2004-01-25 Thread Toby Blake
  printcap_path=| -$ /usr/bin/pcap-query
 
  So, for some reason the lpc -a is failing, although it's clearly
  getting the list of queuenames correctly as I get a message for them
  all.
 
  'echo all|pcap-query' works as specified too.
 
  Can anyone help here?
...
 
 Ummm... perhaps this is the problem?  You may need to fix up the
 printcap information returned.

Can you clarify what you mean by this?  I'm pretty sure the
'pcap-query' program is returning the printcap information as it
should - lpr, lpq and lpd all behave as they should with the same
information.

Cheers
Toby


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


Re: LPRng: lpc -a status doesn't seem to work, but lpc -Pname status does

2004-01-23 Thread Toby Blake
 How about 
 
 lpc status all

Nope, same result.

Cheers
Toby


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


LPRng: lpc -a status doesn't seem to work, but lpc -Pname status does

2004-01-22 Thread Toby Blake
Hi there,

I am seeing a problem where 'lpc -a status' doesn't work, but
referring to printers individually does.  Here's an example to
clarify:

[kant]toby: lpc -a status
[EMAIL PROTECTED]: spool queue for 'fh2' does not exist on server kant.inf.ed.ac.uk
   non-existent printer or you need to run 'checkpc -f'
[EMAIL PROTECTED]: spool queue for 'jc4' does not exist on server kant.inf.ed.ac.uk
   non-existent printer or you need to run 'checkpc -f'

... and so on and on for all the printers in our printcap.

Whereas if I refer to them individually

[kant]toby: lpc -Pfh2 status
 Printer   Printing Spooling Jobs  Server Subserver Redirect Status/(Debug)
[EMAIL PROTECTED]  enabled  enabled0nonenone
[kant]toby: lpc -Pjc4 status
 Printer   Printing Spooling Jobs  Server Subserver Redirect Status/(Debug)
[EMAIL PROTECTED]   enabled  enabled0nonenone jc4c

Firstly, it's probably important to note that our printcap entry is
actually a program (all our printcap details are stored in LDAP).  So
in our lpd.conf, we have:

printcap_path=| -$ /usr/bin/pcap-query

So, for some reason the lpc -a is failing, although it's clearly
getting the list of queuenames correctly as I get a message for them
all.

'echo all|pcap-query' works as specified too.

Can anyone help here?

Many thanks
Toby Blake
University of Edinburgh


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2004-01-15 Thread Toby Blake
Hi there,

Thanks for the reply.

 These processes are 'zombies' waiting for the main LPD process to
 harvest (wait) for them.  The LPD code is waiting in a select
 loop for either a process to exit or for a connection.
 
 Setup_waitpid_break();
 errno = 0;
 fd_available = select( max_socks,
 FD_SET_FIX((fd_set *))readfds,
 FD_SET_FIX((fd_set *))0,
 FD_SET_FIX((fd_set *))0, timeout );
 err = errno;
 Setup_waitpid();
 
 plp_signal_t sigchld_handler (int signo)
 {
 signal( SIGCHLD, SIG_DFL );
 write(Lpd_request,\n, 1);
 }
 
 void Setup_waitpid (void)
 {
 signal( SIGCHLD, SIG_DFL );
 }
 
 void Setup_waitpid_break (void)
 {
 (void) plp_signal_break(SIGCHLD, sigchld_handler);
 }
 
 So under load, the LPD server will probably wait in the select for a
 while.

So, this is purely a load issue?  Looks like I'll need to set up
another print server then.

As a side-issue, is there a way to stop a queue from accepting new
print jobs, while it clears away the backlog?  I had always thought
that 'lpc disable' did this, but it stops anything after the current
job from printing.

Cheers
Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2003-12-15 Thread Toby Blake
 If you are using your own filters,  then make sure you close
 the STDOUT/STDIN, etc., and make sure you exit.

I'm almost 100% certain that the problem is *not* related to our
filters.  As you can see below, the psif filter happily finishes at
15:27:59, however there is a further delay of 7 minutes while lpd is
waiting for the subserver to exit:

IF filter 'psif' filter finished at 2003-12-09-15:27:59.884 ## [EMAIL PROTECTED] 
number=602 process=23168
printing finished at 2003-12-09-15:27:59.884 ## [EMAIL PROTECTED] number=602 
process=23168
accounting at end at 2003-12-09-15:27:59.910 ## [EMAIL PROTECTED] number=602 
process=23168
finished '[EMAIL PROTECTED]', status 'JSUCC' at 2003-12-09-15:27:59.910 ## [EMAIL 
PROTECTED] number=602 process=23168
waiting for subserver to exit at 2003-12-09-15:34:58.800 ## A=NULL number=0 
process=23164
subserver pid 23168 exit status 'JSUCC' at 2003-12-09-15:34:58.800 ## A=NULL 
number=0 process=23164

Note that these subserver lpd processes appear in output from top as
'defunct' and won't be killed even by a kill -9 but are killed somehow
after the delay above.

I also only seem to see this problem when there are a lot of jobs in
the queue - in this case, in excess of 40 on one printer and 20+ on
another printer, both served by this server - as the queue sizes go
down, the delay goes down too.  Can the size of the queue be affecting
this?

Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2003-12-04 Thread Toby Blake
Hi there,

Firstly, thanks for your reply.

 Check lpq -L between jobs and find out if ifhp or lpd is causing
 the delay.  If you have a long waitend delay or high waitend repeat
 (number of times to keep polling the printer for pagecount or status
 until the response stablizes), you will see such delays.

I did include the output from the log file in my original message.
Here it is again:

--
Here's some (edited for clarity) information from status.pr:

# here's a job that's just finishing...

printing finished at 2003-11-27-14:33:14.630 ##
accounting at end at 2003-11-27-14:33:19.411 ##
finished '[EMAIL PROTECTED]', status 'JSUCC' at 2003-11-27-14:33:19.411 ##

# at this stage, the job has printed out, but there's a lengthy
# delay

waiting for subserver to exit at 2003-11-27-14:37:19.605 ##

# there's a wait of approximately 4 minutes before this (above) appears, and
# immediately the next job starts going...

subserver pid 23697 exit status 'JSUCC' at 2003-11-27-14:37:19.605 ##
printer%9100: job '[EMAIL PROTECTED]' printed at 2003-11-27-14:37:19.605 ##
job '[EMAIL PROTECTED]' removed at 2003-11-27-14:37:19.606 ##
subserver pid 23825 starting at 2003-11-27-14:37:29.897 ##
--

There are a couple of important things to note:

- we run our own print filters, not ifhp, in the example above the
last message from the filter immediately precedes the ...

printing finished at 2003-11-27-14:33:14.630 ##

... line.

So, I'm pretty sure it's nothing to do with the filtering process.

- lpd talks directly to the printer on the Socket API port (9100),
  i.e. the lp= line is ip.of.printer%9100

 If ifhp is causing the delay, you many want to give some serious
 thought to changing your printcap to use an SNMP-based waitend
 rather than using HP's PJL implementation.

What is used in the above case where lpd talks directly to the
printer?

 If ifhp is clearly exiting but the queue still sits waiting, you
 have other problems to work with.  Perhaps a shortage of file
 descriptors or similar system resource.  You'd be best to
 strace/truss the main lpd process and watch for errors there, or
 enable some lpd debugging and see what you get.

We didn't get anything useful from lpd debugging, or at least nothing
I could see - the crucial point is that it seems to be waiting for the
subserver to exit.  How can I debug the subserver - is it just another
lpd process?  I seem to recall it is, so perhaps I could strace this
and see if that gives me any info as to why it's waiting.

Cheers
Toby


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


Re: LPRng: lengthy delay between one job finishing and another one starting

2003-12-04 Thread Toby Blake
 I didn't realize you were using your own filter for this...

Yep, I mentioned it in my original email, as people tend to assume
we're using ifhp.

 Can you run your filter on the command line without such delays?

Usually, yes.  The trouble is that I can't do any testing now, as I
can obviously only debug things when the problem is still there.

I am (almost completely) confident that the filtering process isn't
the problem.

 If lpd speaks directly to the printer, there is no end-of-job
 detection done.  The job is handed off to the internal lpd server on
 the printer, and you hope for the best at that point.

Sure, well the Socket API interface anyway.  Can anyone with a bit
more knowledge of HP printers suggest a way of talking to the printer
at this stage to find out whether it is causing the delay or whether
it's lpd?

 To capture more debugging info of subserver processes, you should be
 able to crank-up the debugging level for the printer using lpc
 debug printer debug_value and watch lots of output show up in
 the log file (defined in the printcap) for that printer.

Yes, I did this, but I don't think there was anything that
particularly jumped out at me as being the cause of the problem.

Anyway, thanks for your assistance with this - I've got a bit more to
be going on the next time this happens.

Cheers
Toby


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


LPRng: lengthy delay between one job finishing and another one starting

2003-11-28 Thread Toby Blake
Hi there,

We're seeing a problem whereby a printer (in this example, an
HP8150DN, but other HP printers have also shown the same symptoms)
shows significant delays between the completion of one job printing
and the next one in the queue starting.

lpc -kill queue or restarting lpd doesn't fix the problem, neither
does power-cycling the printer.

We're running LPRng 3.8.21 with our own print filters.  Communication
is direct to port 9100 (e.g. printcap contains
lp=printer.inf.ed.ac.uk%9100)

Here's some (edited for clarity) information from status.pr:

# here's a job that's just finishing...

printing finished at 2003-11-27-14:33:14.630 ##
accounting at end at 2003-11-27-14:33:19.411 ##
finished '[EMAIL PROTECTED]', status 'JSUCC' at 2003-11-27-14:33:19.411 ##

# at this stage, the job has printed out, but there's a lengthy
# delay

waiting for subserver to exit at 2003-11-27-14:37:19.605 ##

# there's a wait of approximately 4 minutes before this appears, and
# immediately the next job starts going...

subserver pid 23697 exit status 'JSUCC' at 2003-11-27-14:37:19.605 ##
printer%9100: job '[EMAIL PROTECTED]' printed at 2003-11-27-14:37:19.605 ##
job '[EMAIL PROTECTED]' removed at 2003-11-27-14:37:19.606 ##
subserver pid 23825 starting at 2003-11-27-14:37:29.897 ##

So, what seems to happen is that lpd is waiting for a process to
return and say that the job has printed, and this process is taking a
long time to come back - long after the job has been printed.

It seems like this problem is much worse when there are lots of jobs
in the queue - in the case today, when there were 50+ jobs in the
queue, the wait was between 4 and 5 - now that the queue is down to 18
jobs, the wait is a little over a minute.  Could this be the cause?  I
haven't been able to verify this bit because I've only ever been
notified about it when there are a lot of jobs in the queue.

Can anyone suggest any solutions or even things to try?  I'm a bit
stumped as to what to do next.

Thanks in advance
Toby Blake
University of Edinburgh


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


Re: LPRng: Windows LPR protocol issues

2003-10-28 Thread Toby Blake
 I would like a high quality alternative to Microsoft's LPR.  Since
 our out-of-band Kerberos authentication method is likely to go away
 soon (because of NATs), I would _really_ like to have Kerberized
 LPR.
 
 Any suggestions?

Sorry Rick, I can't offer any help myself, just a fervent me-too - I
would love to have kerberised LPR from Windows and also a Windows LPR
that will show me the contents of the actual queue on the print server
itself, not just a 'local' one.

Toby


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


LPRng: ifhp and Xerox 4400

2003-09-09 Thread Toby Blake
Hi all,

Following various debates here about the virtues of proper postscript
vs HP emulated postscript, we've bought a Xerox Phaser 4400 printer
for testing.  It doesn't seem to play nicely with our hand-made print
filters, so I've just downloaded ifhp to have a look at it.

What do other people who use Xerox 4400s use as the printer model in
ifhp.conf?

And also, a very minor question, does ifhp use ppd files in any way -
there is no mention in the howto of the text 'ppd' at all, which
surprised me slightly.

Cheers
Toby Blake
University of Edinburgh




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


LPRng: extracting postscript from a PPD file

2003-08-27 Thread Toby Blake
Hi all,

I'd like some general advice on the correct way to extract bits of
postscript from a PPD file.  We have our own home-grown filters which
do this, and have worked fine up until now with all HP printers,
however it doesn't seem to work quite as well with a Xerox Phaser
4400DT that I'm playing with.

Specifically, I want users to be able to force the job to be
single-sided (the printer itself defaults to duplex).  Looking in the
ppd file for the Xerox Phaser 4400DT, we have:

*Duplex None/Off: 
 /Duplex false /Tumble false xerox$pagedevice copy pop


... so if the user specifies -Zsimplex, this translates into the
following line being extracted and put into the output postscript:

 /Duplex false /Tumble false xerox$pagedevice copy pop

However, the job still comes out duplex.  I note that printing from a
Mac or PC produces the correct result (they both put the above line
surrounded by %%BeginFeature and %%EndFeature - although simply
hacking this bit in doesn't seem to work).  Is there something else I
should be doing in my filter?

Can anyone suggest what I'm doing wrong here?

Thanks
Toby Blake
University of Edinburgh


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


Re: LPRng: program to validate postscript?

2003-08-18 Thread Toby Blake
Hi there,

 My experience is that when we started using Xerox printers, which
 use a licensed Adobe PostScript interpreter, many of our printing
 problems disappeared.

Yes, this is precisely the reason why we've bought a Xerox printer for
test purposes, to see if I can pin down problems to HPs PS emulation.

Thanks (and to everyone else for their replies).

Toby


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


Re: LPRng: program to validate postscript?

2003-08-15 Thread Toby Blake
 In a word - Haa (no offense intended)

 What you are asking for is a bug-free postscript interpreter.
 I suppose one could take the attitude that postscript is
 whatever Adobe says it is and therefore by definition one of
 their postscript chips is it - do you buy that?

 The problem is that Postscript isn't a simple, straight forward,
 context free language like Perl (humour intended) - it must be
 interpreted.  There's not even any assurance that it's internally
 consistent.

 If you find one let us all know.

Hmmm, yes, fair enough.  I suppose what I'm trying to work out is
whether the postscript interpreter in certain printers is at fault or
if the actual postscript that I'm printing is.  I realise it's a
difficult thing to tell.

Toby


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


LPRng: program to validate postscript?

2003-08-14 Thread Toby Blake
Is there such a thing?

We're having problems with some (HP) printers complaining about the
postscript in certain files (generally generated by acroread), but
other (also HP) printers print the same file OK.

So, what I want to do, for any particular file, is be able to run it
through something that will at least be able to tell me whether it's a
valid PS file, so I can get some idea whether it's the printers
postscript emulation or the file that's the problem.

Thanks
Toby Blake
University of Edinburgh


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


Re: LPRng: terminating postscript jobs

2003-03-19 Thread Toby Blake
 %%EOF is a PostScript Document Structuring Convention comment; printers
 ignore it.  PostScript end-of-job is a control-D.

Thanks (and also to Patrick for his reply).

So, should I get my filter to add a ^D to the end of all PS jobs?

Toby


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


LPRng: terminating postscript jobs

2003-03-18 Thread Toby Blake
Hi all,

What is the correct way to terminate a postscript job (i.e. tell the
printer that it's definitely finished).

We have had issues with jobs following on from each other, or on a
locally attached HP2200, not printing until another job is sent.  The
postscript seems absolutely fine to me - it finishes with %%EOF.  I
have noted that I can send the UEL command ESC%-12345X after the
postcript job and this seems to fix things.

My question is, is this the correct way to do this, or is there a
postscript command that I should use?

Toby Blake
University of Edinburgh


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


LPRng: 2 printed files concatenating onto same paper

2003-03-04 Thread Toby Blake
Hi there,

I have two single-page postscript files, file1.ps and file2.ps.

If I print these using the command:

lpr file1.ps file2.ps

... then they come out on the same piece of paper (on different
sides).

However, if I print them like this:

lpr file1.ps; lpr file2.ps

... then they come out on separate sheets, as I would want.

I have a couple of questions arising from this:

(1) What is it in the postscript in file1.ps that causes this to
happen?  What is needed to properly terminate a postscript
job/page?

(2) My understanding is that even if they are passed to lpr in the
same command, they should still be filtered and processed
separately, so why does lpr file1.ps file2.ps produce a different
result from lpr file1.ps; lpr file2.ps.  I suppose I'd like to
know what happens differently in each case.

I'm using LRRng-3.8.10

Thanks for any info

Toby Blake
University of Edinburgh


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


Re: LPRng: 2 print servers both spooling to one physical printer

2002-11-21 Thread Toby Blake
 I think I have good news for you :-)

 There is a somehow not documented failover feature in LPRNG which
 works just perfect for your case I think (I use it with 2500 UNIX
 clients and have no problems). You can put a list of servers in the
 client printcap: 'rm=spooler1, spooler2, spooler3' if
 spooler1 is not available, spooler2 will be tried and so
 on... Of course it will not work if spooler1 is somehow internally
 'broken' but still accepts jobs, but as soon as it does not accept a
 job the failover will take place...

Thanks for this info Christoph - to work this way I would need to
re-implement certain parts of our printing system, but it certainly
looks like something I should consider when I get the chance.

Also, thanks to everyone else who replied to my mails on this, in the
short term I will just let two servers handle the same queues, for the
couple of hours that maintenance requires.  Note that all our print
servers run the same version of LPRng.

Cheers
Toby


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



LPRng: kerberos_id value - do I need it?

2002-11-13 Thread Toby Blake
Hi all,

I've previously been including the kerberos_id value in both the
server and client printcap information, e.g.

client:
auth=kerberos5:[EMAIL PROTECTED]

server:
[EMAIL PROTECTED]:kerberos_keytab=/etc/lpd.keytab

I don't like having to include the host-specific information here, for
local reasons which it's probably not worth going into.

So, I've been experimenting with taking the kerberos_id value out so I
just have:

client:
auth=kerberos5

server:
kerberos_keytab=/etc/lpd.keytab

... and this seems to work OK - the server gets the service principal
name from the keytab file and everything works nicely kerberised.

So, I suppose my question is, is there any reason why this is a bad
idea?

Cheers
Toby


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



Re: LPRng: 2 print servers both spooling to one physical printer

2002-11-13 Thread Toby Blake
I'd like to say thanks for all the replies to this, it seems to me
that this is probably not the sort of thing that I would like to do on
a long term basis, but would be fine in the short term.  I'll explain
why I want to do this.

We have a system whereby I would like to easily swap one print server
in to take the place of another one, for maintenance, upgrade or
whatever.  This could be done in one of two ways - either change the
printcap information held in LDAP, or change the print server alias to
point to another machine, e.g. host1 has an alias of print1, host2 has
an alias of print2 - if I want to take host2 down, I can change the
print2 alias to point to host1.

The trouble is, our system uses ldap and dns servers on every local
machine which sync with the masters every hour (different machines
will sync at different times to reduce the load).  This means that any
changes made to ldap or dns will take between 1 and 60 minutes to
propagate to any one host.

So, in the example above, in the one-hour period after changing the
alias, I need both host1 and host2 to be able to spool to the same
printers, as various clients will resolve print2 differently.

Phew.

Cheers
Toby


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



Re: LPRng: 2 print servers both spooling to one physical printer

2002-11-01 Thread Toby Blake
 It is a bad idea for the same reason a printer spooler was invented
 in the first place: a printer cannot print two things at the same
 time and iterleaving two printjobs isn't particular useful. This was
 for a unix systems with many logged in users, each of which needs to
 print something. Things doesn't change very much with network
 printers and printing from multiple workstations; the printer can
 still only print one thing at a time, and for that reason having
 only one spooler being in charge of the printer will ensure
 everything runs smoothly. All other systems will then submit their
 print jobs to that spooler instead of directly to the printer.

 For a set of spooler systems to access one single printer there must
 be a protocol to coordinate that access. In the LPD protocol there
 is no such mechanism.

I should probably comment that I plan to operate like this for a very
short period of time, basically it's a way of getting one print server
to serve another print server's queues while it's being upgraded, but
because of the nature of our ldap propagation mechanism (ldap is the
source of the princap information) there's no way of being entirely
sure which of our clients will be looking at the correct server at any
one time - update propagation to clients takes up to an hour, unless
manually enforced.

I have run some simple experiments with two lprng print servers
serving the same printer and they seem to operate OK - if the printer
is busy, lprng on either machine waits until it's free, effectively
queueing jobs in both print servers.

Toby


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



LPRng: 2 print servers both spooling to one physical printer

2002-10-31 Thread Toby Blake
Very quick question: is there any reason why this shouldn't be done?
I seem to recall somebody saying that it's a bad idea, but my brief
tests seem to indicate it works OK.

Thanks
Toby Blake
University of Edinburgh


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



Re: LPRng: SAMEHOST directive in perms file

2002-10-11 Thread Toby Blake

As a bit of further info concerning this problem, the SAMEHOST value
seems to be evaluated correctly if the job is sent/removed from a
machine within the same domain as the print server, e.g.

job sent from host.inf.ed.ac.uk to printserver.inf.ed.ac.uk can be
removed from the same machine, but...

job sent from host.cogsci.ed.ac.uk to printserver.inf.ed.ac.uk can
*not* be removed from the same machine.

I can see in the logs for the first example that it correctly compares
HOST to REMOTEHOST and therefore doesn't attempt to compare it with
with either the IP of the print server or 127.0.0.1:

Same_host: comparing [host 'a.inf'] to [host 'a.inf'], result 0

(contrast this with the example below where it doesn't even print out
a message for comparing with anything but print server IP and
localhost.

Toby

 I'm using LPRng-3.8.10 under RH Linux 7.1 and am having trouble
 getting the SAMEHOST directive to work, i.e. it doesn't.  I submit a
 job from host 'a' to print server 'b' and then try and remove it, also
 from host 'a' - this fails.

 The relevant line in lpd.perms is:

 ACCEPT SERVICE=M SAMEHOST SAMEUSER

 If I change the line to just...

 ACCEPT SERVICE=M SAMEUSER

 ... then the job can be removed.

 I have turned the debugging up as high as necessary to try and see
 what is happening, and I do get two messages of the form...

 Same_host: comparing [host 'a'] to [host b], result -1
 Same_host: comparing [host 'a'] to [localhost], result 1

 This suggest to me the line

 m = Same_host(check-host, check-remotehost); in permission.c

 ...is not producing a successful match, as I believe it should.

 Can anyone suggest a sensible course of action to follow next?  Also,
 has anyone tried debugging lpd with gdb?  I can't seem to get it to
 work.

 Thanks in advance for any advice.

 Cheers
 Toby Blake
 University of Edinburgh


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



LPRng: SAMEHOST directive in perms file

2002-10-09 Thread Toby Blake

Hi there,

I'm using LPRng-3.8.10 under RH Linux 7.1 and am having trouble
getting the SAMEHOST directive to work, i.e. it doesn't.  I submit a
job from host 'a' to print server 'b' and then try and remove it, also
from host 'a' - this fails.

The relevant line in lpd.perms is:

ACCEPT SERVICE=M SAMEHOST SAMEUSER

If I change the line to just...

ACCEPT SERVICE=M SAMEUSER

... then the job can be removed.

I have turned the debugging up as high as necessary to try and see
what is happening, and I do get two messages of the form...

Same_host: comparing [host 'a'] to [host b], result -1
Same_host: comparing [host 'a'] to [localhost], result 1

This suggest to me the line

m = Same_host(check-host, check-remotehost); in permission.c

...is not producing a successful match, as I believe it should.

Can anyone suggest a sensible course of action to follow next?  Also,
has anyone tried debugging lpd with gdb?  I can't seem to get it to
work.

Thanks in advance for any advice.

Cheers
Toby Blake
University of Edinburgh



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



Re: LPRng: server forwarding jobs to another server

2002-08-09 Thread Toby Blake

Hi there,

Rephrasing my question somewhat, to get one LPRng print server to
forward jobs to another LPRng print server, do I need to do anything
other than just have an entry like this on the old server...

oldqueue:[EMAIL PROTECTED]

?

Thanks
Toby

  Now what happens is it gets queued in the local (old server) queue,
  but is never transferred to the remote one:
 
  % lpq -Pdicehp1@maclaren
  Printer: dicehp1@maclaren (dest [EMAIL PROTECTED])
   Queue: 1 printable job
   Rank   Owner/ID  Class Job Files Size Time
  stalled(2325sec) toby@sorley+679X   679 /home/toby/one-page 218533 15:21:49
  Printer: dicehp1@printbp 'DICE test printer in BP Xerox Room'
   Queue: no printable jobs in queue
  %

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



LPRng: debugging lpc and permissions

2002-05-14 Thread Toby Blake

Hi all,

Can anyone give me a pointer on getting some debugging information on
why lpc commands are being refused?

I'm trying to do an lpc reread on the print server itself but get 'no
permission to control server', even if the only line in lpd.perms is
DEFAULT ACCEPT (example at bottom of email).  I thought that the
following in printcap would give me some debugging info about the
permissions checking process:

:db=lpc+3,database+3 

... but it doesn't

Toby

[host]root: grep -v '^#' /etc/lpd.perms
 
DEFAULT ACCEPT
 
ACCEPT SERVICE=C
 
[host]root: ps -ef|grep lpd
lp5356 1  0 16:49 ?00:00:00 lpd Waiting
[host]root: kill -HUP 5356
[host]root: /usr/sbin/lpc reread
no permission to control server
[host]root:

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



[no subject]

2002-04-25 Thread Toby Blake

Hi,

 I have put stuff into a script:
...

Thanks for looking into this.  I've tested it using the same script as
you and it still hangs for me:

host1: cat /tmp/getstuff
#!/usr/bin/perl
 
print STDERR starting\n;
read STDIN, $magic, 80;
print STDERR done\n;
exit 0
[sybies]toby:
...

host1: echo testing|lpr -Pdicehp1 

And here's the status:

subserver pid 23731 starting at 2002-04-25-10:16:28.514 ## A=toby@host1+794 number=794 
process=23731
accounting at start at 2002-04-25-10:16:28.514 ## A=toby@host1+794 number=794 
process=23731
opening device '|$- /usr/libexec/printing/hpdriver $h $n $P $-a' at 
2002-04-25-10:16:28.514 ## A=toby@host1+794 number=794 process=23731
waiting for subserver to exit at 2002-04-25-10:16:28.518 ## A=NULL number=0 
process=23730
printing job 'toby@host1+794' at 2002-04-25-10:16:28.526 ## A=toby@host1+794 
number=794 process=23731
processing 'dfA794host1.inf.ed.ac.uk', size 218533, format 'f', IF filter 'getstuff' 
at 2002-04-25-10:16:28.526 ## A=toby@host1+794 number=794 process=23731
IF filter 'getstuff' filter msg - 'starting' at 2002-04-25-10:16:28.540 ## 
A=toby@host1+794 number=794 process=23731


and that's it, it hangs there.


H, any ideas?  Any debugging suggestions to get to the bottom of
this?

Toby

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



LPRng: Re: LPRng-3.8.10 hanging when using program as filter or printcap_path

2002-04-25 Thread Toby Blake

 host1: cat /tmp/getstuff
 #!/usr/bin/perl
  
 print STDERR starting\n;
 read STDIN, $magic, 80;
 print STDERR done\n;
 exit 0

OK, I've been looking into this in a bit more detail, using the above
program as the :if filter.

I've traced through this with gdb and it hangs in Read_fd_len_timeout
(line 219 in utilities.c), which is called by this line in printjob.c
(line 987):

count = Read_fd_len_timeout( left, of_error, msg+msglen, msgmax-msglen
);

The first time it encounters this line it successfully reads
starting\n from the filter.  However, the second time, the read call
in Read_fd_len_timeout just hangs:

(gdb) s
Read_fd_len_timeout (timeout=6000, fd=7, msg=0xbfffb9a0 , len=511)
at ./common/utilities.c:222
222 if( timeout  0 ){
(gdb) n
223 if( Set_timeout() ){
(gdb) n
224 Set_timeout_alarm( timeout  );
(gdb) n
225 i = read( fd, msg, len );
(gdb) p fd
$10 = 7
(gdb)  p msg
$11 = 0xbfffb9a0 
(gdb) p len
$12 = 511
(gdb) s

Any ideas as to why this could be happening?  Is there any more
debugging information that would be useful?

Thanks
Toby

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



Re: LPRng: LPRng 3.8.9

2002-03-12 Thread Toby Blake

  Thanks for fixing this Patrick.  However, would you be able to
  change things so that the other AUTH* data is also stored and used
  later (i.e. authtype and authfrom):
 
  2002-03-07-12:15:19.325 host1 [29066] RCVSEC  lp:  authtype 
  'kerberos', authfrom '[EMAIL PROTECTED]', authuser '[EMAIL PROTECTED]'
  ...
  2002-03-07-12:15:19.347 host1 [29066] (Server)  lp:  authtype 
  'NULL', authfrom 'NULL', authuser '[EMAIL PROTECTED]'
 
  Thanks
  Toby
 
 Just use the 'R' check and drop the 'P' check.

This isn't particularly feasible as I prefer to have a permissions
setup where everything is rejected by default and I specify what is
allowed.  Therefore I need to include permissions for the 'P' service
as sending a job via lpr results in a permissions check for the 'P'
service, which I currently cannot validate against the AUTHTYPE and
AUTHFROM values.

Cheers
Toby

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



Re: LPRng: Re: more on kerberos and permissions

2002-03-05 Thread Toby Blake

  It appears that the 'authentication' information is being tossed and
  not stored.  I will look at this in a bit of detail.
 
  Patrick
 
 Fixed in next release.
 
 Version LPRng-3.8.9 - Sat Mar  2 15:02:11 PST 2002
 
 
   The AUTHUSER information received at job submission time was not
   not being stored and used later when printing permissions were checked.
   (Discovered by: Toby Blake [EMAIL PROTECTED])

Great, thanks Patrick.  Can you give any indication on when you'll be
making this release available?

I'm assuming from this and from the relative silence that not many
people are using LPRng with kerberos.

Toby

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



LPRng: kerberos and debugging the permissions process

2002-02-26 Thread Toby Blake

Hi all,

Can anyone suggest the best way to debug permissions problems?  I am
testing LPRng 3.8.6 with kerberos 5 and can't seem to get it to behave
at all with regard to permissions.

Basically what I'd really like to see is what the various AUTH* values
are set to when the server processes the job, so I can determine why
requests are being rejected.  I have tried debugging with
/usr/sbin/lpd -F -D10  /tmp/lpd.out 21 but this doesn't really
offer anything useful, at least to my eyes.

Searching through the archives of this list, I can't find a lot of
information relating to kerberos use, which makes me wonder whether
many people are using LPRng with kerberos.

I have set up the server printcap with these options for the queue:

   :[EMAIL PROTECTED]
   :kerberos_keytab=/etc/lpd.keytab

.. and the client side with:

   :auth=kerberos5
   :[EMAIL PROTECTED]

This certainly seems to work OK, as if I do an lpq from the client
machine, I successfully obtain a [EMAIL PROTECTED]
ticket.

I can happily set permissions for USER, etc. values on the server side
and everything works as I would expect, but as soon as I try to use
any of the AUTH* values, I run into problems.  For instance, with a
perms file of simply:

DEFAULT ACCEPT
REJECT NOT AUTH

... which I would think would reject any non-authenticated operations,
lpq reports ERROR: no permission to print after using lpr to send a
job.  Why does lpq succeed though?  Additionally, why does lprm also
succeed?

I have tried setting more complex values, e.g.

ACCEPT AUTH SERVICE=XCMRP [EMAIL PROTECTED]

.. with a similar complete lack of success.

I'd be very grateful if anyone with experience of getting LPRng to
play nicely with kerberos authentication could offer me some
pointers.  Or as I've mentioned, a better way of debugging the
permissions process.

Many thanks in advance
Toby Blake
Division of Informatics
University of Edinburgh

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



Re: LPRng: lpr - direct to remote server, use of :direct?

2002-02-22 Thread Toby Blake

I can answer my own question here.  If I specify it in the printcap
like this:

lp:
:rp=lp:rm=host1:client

...then it works as I would expect, but this:

lp:
:lp=lp@host1:client

...doesn't work (I'd thought they were basically one and the same).  I
have tried specifying force_localhost@ in the printcap entry, but this
makes no difference.

Toby

 Hi All,
 
 I'm trying to test kerberos/lprng interaction, but before I can do
 that I need to have a simple client/server setup.
 
 Basically what I have is:
 
 host1 running lpd with printer 'lp' set up (all is fine here)
 host2 not running lpd, printing to remote queue on host1 via printcap
 entry:
 
 lp:
 :lp=lp@host1:client
 
 This doesn't work at all however:
 
 [host2]toby: lpq -Plp
 Printer 'lp@localhost' - cannot open connection - Connection refused
 Make sure the remote host supports the LPD protocol
 [host2]toby:
 
 Doing lpq -Plp@host1 is OK.
 ... although what I'm trying to do does work OK under an old version
 of LPRng (3.6.12).
 
 However, if I include the :direct keyword on the client-side printcap
 entry, I can print to the remote queue OK, although I get no feedback:
 
 [host2]toby: lpq -Plp
 Printer: lp - direct connection to device 'lp'
 [host2]toby:
 
 So, this (and the parts in the HOWTO relating to :direct) suggests to
 me that I'm not doing this the correct way - is this the case?
 
 If so, what is the correct way to use print clients to a remotely
 hosted printer?
 
 I can't help thinking that I must be missing something blindingly
 obvious, but really have no idea what it could be.  Any help
 gratefully received.
 
 Thanks
 Toby Blake
 University of Edinburgh

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



LPRng: lpr - direct to remote server, use of :direct?

2002-02-21 Thread Toby Blake

Hi All,

I'm trying to test kerberos/lprng interaction, but before I can do
that I need to have a simple client/server setup.

Basically what I have is:

host1 running lpd with printer 'lp' set up (all is fine here)
host2 not running lpd, printing to remote queue on host1 via printcap
entry:

lp:
:lp=lp@host1:client

This doesn't work at all however:

[host2]toby: lpq -Plp
Printer 'lp@localhost' - cannot open connection - Connection refused
Make sure the remote host supports the LPD protocol
[host2]toby:

Doing lpq -Plp@host1 is OK.

... although what I'm trying to do does work OK under an old version
of LPRng (3.6.12).

However, if I include the :direct keyword on the client-side printcap
entry, I can print to the remote queue OK, although I get no feedback:

[host2]toby: lpq -Plp
Printer: lp - direct connection to device 'lp'
[host2]toby:

So, this (and the parts in the HOWTO relating to :direct) suggests to
me that I'm not doing this the correct way - is this the case?

If so, what is the correct way to use print clients to a remotely
hosted printer?

I can't help thinking that I must be missing something blindingly
obvious, but really have no idea what it could be.  Any help
gratefully received.

Thanks
Toby Blake
University of Edinburgh

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



LPRng: running lprng as non-root user

2002-02-14 Thread Toby Blake

Hi, 

Quick question - is it possible to run lprng (both client and server
parts) as a non-root user?

Obviously I'd need to change the lpd port number and directories 
used.

I need to do this on a temporary basis in order to test some things
out on a machine that's already running lpd, etc.

Thanks
Toby Blake
University of Edinburgh

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



LPRng: kerberos and group-based permissions

2002-02-10 Thread Toby Blake

Hi all,

I'd be interested to know if anyone has implemented a group 
based permissions system in LPRng, using kerberos.

I'll explain what I mean by this.  We are developing a new 
computing infrastructure, with authorisation based around 
kerberos but also including an LDAP addition to this, allowing for 
authorisation by groups and so on, e.g. this group of people is 
allowed to use a certain service, and so on.  There will be a 
netgroup style interface provided with this, which leads to...

I would like to use this system in the LPRng permissions file so 
that I can say that, e.g. GROUP @special_users can print to 
particular printers.  However, the GROUP value in LPRng is 
evaulated in the context of USER (which comes from the job 
control file) and I obviously need it evaluated in the context of 
AUTHUSER - the kerberos principals.

Has anyone attempted this kind of approach, or has any ideas 
on how to implement it?

Many thanks for any comments.

Toby Blake
University of Edinburgh


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



LPRng: log and status files

2001-02-02 Thread Toby Blake

Hi,

I have a couple of questions regarding logging.

Firstly, what do other people do in terms of status file
rotation/truncation?  I ask this because I noticed lpq was running
very very slowly the other day, but couldn't figure out why.  I
eventually worked out that it was due to the sizes of the
status.printer files and making these very small cured the problem.
Obviously it's better to keep these files as short as possible to
prevent this slowness, but I want to keep the information around.  I
just wondered what other people did regarding this.

Secondly, I have the log file specified in my lpd.conf file using
'default lf=...'  However, I notice that this file hasn't been updated
since Dec 8, which is when I think I stopped running lpd in debug
mode.  Should I expect this file to log server activity during the
normal course of things?  Running checkpc doesn't report any problems.

Thanks in advance for any info.

Toby Blake
University of Edinburgh

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



LPRng: ghostview under Solaris *always* prints to default printer

2001-01-16 Thread Toby Blake

Hi,

We have recently moved from Solaris lp to LPRng.

We're seeing a problem where ghostview 1.5 under Solaris will ignore
whichever printer name you enter and instead print to the default
printer (defined by the PRINTER environment variable).

Has anyone else seen this problem?  I have searched and have only
managed to find something that suggested setting

Ghostview*printCommand: /usr/local/bin/lpr

in ~/.Xdefaults and then doing an xrdb -merge, but this makes no
difference.

Thanks in advance
Toby Blake
University of Edinburgh

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



LPRng: Re: ghostview under Solaris *always* prints to default printer

2001-01-16 Thread Toby Blake

As is often the case, I found a solution to the problem shortly after
posting to the mailing list.

I was failing to understand how ghostview uses the PRINTER env
variable - it looks like if changes this *before* sending the job, and
so specifying to ghostview that PRINTER was indeed the env variable
used fixed the problem.  I put the following two lines in the system
wide Xdefaults file:

Ghostview*printCommand: lpr
Ghostview*printerVariable: PRINTER

Cheers
Toby

 We have recently moved from Solaris lp to LPRng.
 
 We're seeing a problem where ghostview 1.5 under Solaris will ignore
 whichever printer name you enter and instead print to the default
 printer (defined by the PRINTER environment variable).
 
 Has anyone else seen this problem?  I have searched and have only
 managed to find something that suggested setting
 
 Ghostview*printCommand: /usr/local/bin/lpr
 
 in ~/.Xdefaults and then doing an xrdb -merge, but this makes no
 difference.

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