> From [EMAIL PROTECTED] Mon Dec 10 23:11:21 2001
> To: [EMAIL PROTECTED]
> Subject: Re: LPRng: checkpc speed
> Date: Tue, 11 Dec 2001 17:22:09 +1100
> From: "C. L. McAvaney" <[EMAIL PROTECTED]>
>
> G'day Patrick,
> Further to this, I added a few more debugs and the time consuming part seems
> to be a call to To_daemon() in Check_spool_dir(). I saw from your commentry
> that this function has been a bit of a headache in the past with portability.
> Is there anything in particular with Solaris (v8) that you know of?
Ahh...
int To_daemon(void)
{
Set_full_group( DaemonUID, DaemonGID );
To_daemon_called = 1;
return( seteuid_wrapper( DaemonUID ) );
}
Note that we are doing 'Set_full_group()' here...
This little gem is used so that we set all of the user and group
permissions to the 'correct' ones.
This calls: getpwuid(euid)
and then calls 'initgroups(user,pw->pw_gid)'
I suspect foul play here. You could instrument this and
see if this is the source of the problem.
There are two ways to solve this:
a) Violate the chastity of the permissions system and
brutally set only the EUID.
b) Find out what is slowing down 'To_daemon()' and fix it.
>
> Thanks,
> Christopher
>
> ------- Forwarded Message
>
> Date: Tue, 11 Dec 2001 15:40:46 +1100
> From: "C. L. McAvaney" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: LPRng: checkpc speed
>
>
> Date: Mon, 10 Dec 2001 19:56:31 -0800 (PST)
> From: Patrick Powell <[EMAIL PROTECTED]>
>
> > OK, then it is time for the BIG GUNS:
> >
> > checkpc -f -D2 2>&1 >/tmp/log
> >
> > and start looking... Sigh...
>
> hmm...I agree with the sigh.
>
> There is a 2 second pause between these lines:
>
> 2001-12-11-15:37:12.593 alfirk [18449] checkpc dalmation: Get_spool_control:
> file 'control.dalmation'
> 2001-12-11-15:37:12.593 alfirk [18449] checkpc dalmation: Setup_printer: print
> er now 'dalmation', spool dir '/var/spool/lpd/dalmation'
>
> 2001-12-11-15:37:14.721 alfirk [18449] checkpc dalmation: Scan_printer: file '
> control.dalmation'
> 2001-12-11-15:37:14.722 alfirk [18449] checkpc dalmation: Scan_printer: file '
> status.dalmation'
>
> ...
> Same pause for each printer.
>
> Christopher
>
> >
> > > From [EMAIL PROTECTED] Mon Dec 3 11:20:16 2001
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: LPRng: checkpc speed
> > > Date: Sun, 02 Dec 2001 13:24:57 +1100
> > > From: "C. L. McAvaney" <[EMAIL PROTECTED]>
> > >
> > >
> > > Date: Sat, 1 Dec 2001 10:06:06 -0800 (PST)
> > > From: Patrick Powell <[EMAIL PROTECTED]>
> > >
> > > > > From [EMAIL PROTECTED] Wed Nov 28 21:09:24 2001
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: LPRng: checkpc speed
> > > > > Date: Thu, 29 Nov 2001 14:45:55 +1100
> > > > > From: "C. L. McAvaney" <[EMAIL PROTECTED]>
> > > > >
> > > > > G'day all,
> > > > >
> > > > > I am wondering if checkpc is slow for everybody?
> > > > > I have noticed that it takes quite a long time (v3.8.1) to go throu
> >gh a
> > > > > printcap that I have here with 122 printer entries.
> > > > > Is it doing some network connections or something like that?
> > > > >
> > > > No, not that I am aware of... Try running:
> > > >
> > > > checkpc -D1
> > > >
> > > > This will put out timestamps on each line... see where the
> > > > delays (if any) are.
> > >
> > > The only noticable pause is:
> > > ...
> > > 2001-12-02-13:22:50.765 alfirk [24103] checkpc dalmation: Find_pc_info:
> >found name 'dalmation'
> > > 2001-12-02-13:22:50.765 alfirk [24103] checkpc dalmation: Select_pc_info
> >: returning 'dalmation'
> > > 2001-12-02-13:22:50.766 alfirk [24103] checkpc dalmation: Fix_Rm_Rp_info
> >: Printer 'dalmation', Queue 'dalmation', Lp 'lexmark-test.net.deakin.edu.au
> >%9100', Rp '<NULL>', Rh '<NULL>'
> > >
> > > ** Between here:
> > > 2001-12-02-13:22:50.767 alfirk [24103] checkpc dalmation: Setup_printer:
> > printer now 'dalmation', spool dir '/var/spool/lpd/dalmation'
> > >
> > > ** and here.
> > > 2001-12-02-13:23:07.415 alfirk [24103] checkpc dalmation: Make_write_fil
> >e 'control.dalmation'
> > >
> > > 2001-12-02-13:23:07.415 alfirk [24103] checkpc dalmation: Make_write_fil
> >e 'status.dalmation'
> > > 2001-12-02-13:23:07.415 alfirk [24103] checkpc dalmation: Make_write_fil
> >e 'status'
> > > ...
> > >
> > > The same pause seems to occur for each printer.
> > >
> > > Christopher
> > > ,,,
> > > (. .)
> > > /-----.oOO--(_)--OOo.-------------------------------------------------\
> > > | Christopher McAvaney [EMAIL PROTECTED] |
> > > | PhD Candidate [EMAIL PROTECTED] |
> > > | [EMAIL PROTECTED] |
> > > | phone: +61+3+52272960 [EMAIL PROTECTED] |
> > > | fax: +61+3+52272028 http://www.cm.deakin.edu.au/~chrismc |
> > > \---------------------------------------------------------------------/
> >
> >--
> >
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------