> From [EMAIL PROTECTED] Tue Sep 30 22:45:18 2003
> Date: Wed, 1 Oct 2003 09:03:19 +1000
> To: [EMAIL PROTECTED]
> Subject: LPRng: [EMAIL PROTECTED]: Bug#213195: lprng: lpd calculates free disk space 
> incorrectly]
> From: [EMAIL PROTECTED] (Craig Small)
>
> Hello Patrick and list,
>   I'm trying to do some more diagnostics on this problem.  I've
> suggested a lpr -D5 which can show the minfree value, but I cannot see
> which magic -D flag to show what value minfree is being compared
> against.
>
> I still haven't got a reply from him yet, so this bug is still
> tentative, but some debugging suggestions would help.
>
> http://bugs.debian.org/213195
>
>   - Craig

The 'Check_space' routine is used to find the space on the drive:

int Check_space( double jobsize, int min_space, char *pathname )
{
    double space = Space_avail(pathname);
    int ok;

    jobsize = ((jobsize+1023)/1024);
    ok = ((jobsize + min_space) < space);

    DEBUGF(DRECV1)("Check_space: path '%s', space %0.0f, jobsize %0.0fK, ok %d",
        pathname, space, jobsize, ok );

    return( ok );
}

You can set:

lp:
  :... usual options
  :db=lpr
  :log=log

Run:
checkpc -f
lpr -Plp /tmp/somefile

And look in log:

2003-10-10-13:15:18.293 h110 [35674] RECV  t1: Receive_job:
       from localhost.private- getting file transfer line
2003-10-10-13:15:18.293 h110 [35674] RECV  t1: Receive_job:
       read from localhost.private- status 0 read 23 bytes '^B143 cfA673h110.private'
2003-10-10-13:15:18.293 h110 [35674] RECV  t1: Check_space:
        path '/var/tmp/LPD/t1', space 3645904, jobsize 1K, ok 1

                                      ^^^^^^^
df /var/tmp/LPD/t1
Filesystem  1K-blocks  Used   Avail Capacity  Mounted on
/dev/ad0s1e   4058062 87686 3645732     2%    /var

                            ^^^^^^

                               These two should be close.

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

Reply via email to