How to 100% flush lp's buffers? I've rm'd spool-files, lp stop, lp start

How to 100% flush lp's buffers? I've rm'd spool-files, lp stop, lp start

Post by David Com » Sat, 08 May 2004 14:38:35



I stupidly tried to lp a .pfd instead of its .ps; pile of paper
with one line of garbage per page, til I noticed it and
empied the paper-tray to stop at least wasting the paper.

I then did a cancel on the print-job id -- BUT, again
probably stupidly, it didn't come back to a prompt, so
after a couple of minutes, I hit ^C.

Hooray, I now have a (shell) prompt.  (but I may have
screwed myself?)

Tried an "lp t.foo", tiny ascii-text file, nothing happened
(yes, I'd replaced the paper by now).

A few more cancels, etc, no good result, no output from
hp laserjet.

Since I'm on sunservice, I called them, got a newbie

   <aside>
   What's with sunservice?  The waiting time, sitting on
   the phone listening to admittedly-nice music, was approaching
   what I hear about MS!
   </aside>

who after asking some people for help, sent me these instructions:

Quote:>  ***************************************************************************
>  1. Stop the printer daemon from running (/usr/lib/lpshut or
>  /etc/init.d/lp stop)

>  2. (a) For a local printer:
>      Manually remove any entries from the /var/spool/lp directory
>       (1 file in /var/spool/lp/tmp/system-name
>    and 1 file in /var/spool/lp/requests/system-name
>        ).

>   (b_ For a remote printer, the directories of interest are the
>  /var/spool/lp/tmp/system-name (which contains two files) and the
>  /var/spool/lp/requests/system name contains another file.

>  3. Re-start the printer daemon (either /usr/lib/lpsched or
>  /etc/init.d/lp start)
>  **************************************************************************

I have now done all that.

However, until I again by-hand empty the paper-tray,
I'm *still* getting those same 1-line-of-garbage per page
wasted-paper.

QUESTION: who knows *how much* still reamains queued-up --
this is my first (and hopefully last) time sending a .pdf
file to my printer!   How to totally get rid of all
that stuff -- hopefully without having to open up my blade100
and physically pull it all out, hand over hand, like some
hugely long eel!

Suggestions?

Thanks!

David

 
 
 

How to 100% flush lp's buffers? I've rm'd spool-files, lp stop, lp start

Post by Richard Skelto » Sat, 08 May 2004 18:23:56



>I stupidly tried to lp a .pfd instead of its .ps; pile of paper
>with one line of garbage per page, til I noticed it and
>empied the paper-tray to stop at least wasting the paper.

>I then did a cancel on the print-job id -- BUT, again
>probably stupidly, it didn't come back to a prompt, so
>after a couple of minutes, I hit ^C.

>Hooray, I now have a (shell) prompt.  (but I may have
>screwed myself?)

>Tried an "lp t.foo", tiny ascii-text file, nothing happened
>(yes, I'd replaced the paper by now).

>A few more cancels, etc, no good result, no output from
>hp laserjet.

>Since I'm on sunservice, I called them, got a newbie

>   <aside>
>   What's with sunservice?  The waiting time, sitting on
>   the phone listening to admittedly-nice music, was approaching
>   what I hear about MS!
>   </aside>

>who after asking some people for help, sent me these instructions:

>> ***************************************************************************
>> 1. Stop the printer daemon from running (/usr/lib/lpshut or
>> /etc/init.d/lp stop)

>> 2. (a) For a local printer:
>>     Manually remove any entries from the /var/spool/lp directory
>>      (1 file in /var/spool/lp/tmp/system-name
>>   and 1 file in /var/spool/lp/requests/system-name
>>       ).

>>  (b_ For a remote printer, the directories of interest are the
>> /var/spool/lp/tmp/system-name (which contains two files) and the
>> /var/spool/lp/requests/system name contains another file.

>> 3. Re-start the printer daemon (either /usr/lib/lpsched or
>> /etc/init.d/lp start)
>> **************************************************************************

>I have now done all that.

>However, until I again by-hand empty the paper-tray,
>I'm *still* getting those same 1-line-of-garbage per page
>wasted-paper.

>QUESTION: who knows *how much* still reamains queued-up --
>this is my first (and hopefully last) time sending a .pdf
>file to my printer!   How to totally get rid of all
>that stuff -- hopefully without having to open up my blade100
>and physically pull it all out, hand over hand, like some
>hugely long eel!

>Suggestions?

>Thanks!

>David

Hi David,
Did you turn the printer off to clear it's buffers?

--

Cheers

Richard Skelton

Infineon Technologies UK Ltd
Infineon House
Great Western Court
Hunts Ground Road
Stoke Gifford
Bristol
BS32 8HP
Tel +44(0)117 9528808

 
 
 

How to 100% flush lp's buffers? I've rm'd spool-files, lp stop, lp start

Post by David Com » Sat, 08 May 2004 21:20:30


Quote:

>Hi David,
>Did you turn the printer off to clear it's buffers?

I have now!  (thanks to your suggestion).

This hp-1200: the only way to turn it off is to *unplug* it;
no off-on switch.

Well, that sure solved the paper from being wasted.

Then I tried "lp <name-of-very-short-ascii-file".

And, unfortunately, NOTHING is coming out.

  (yes, it will print the hp test-page)

So, any other ideas (that last one was a good one!)

David

 
 
 

How to 100% flush lp's buffers? I've rm'd spool-files, lp stop, lp start

Post by ML Starke » Sat, 08 May 2004 21:41:37




>> I stupidly tried to lp a .pfd instead of its .ps; pile of paper
>> with one line of garbage per page, til I noticed it and
>> empied the paper-tray to stop at least wasting the paper.

>> I then did a cancel on the print-job id -- BUT, again
>> probably stupidly, it didn't come back to a prompt, so
>> after a couple of minutes, I hit ^C.

>> Hooray, I now have a (shell) prompt.  (but I may have screwed myself?)

>> Tried an "lp t.foo", tiny ascii-text file, nothing happened
>> (yes, I'd replaced the paper by now).

>> A few more cancels, etc, no good result, no output from
>> hp laserjet.

>> Since I'm on sunservice, I called them, got a newbie

>>   <aside>
>>   What's with sunservice?  The waiting time, sitting on
>>   the phone listening to admittedly-nice music, was approaching
>>   what I hear about MS!
>>   </aside>

>> who after asking some people for help, sent me these instructions:

>>> ***************************************************************************

>>> 1. Stop the printer daemon from running (/usr/lib/lpshut or
>>> /etc/init.d/lp stop)

>>> 2. (a) For a local printer:     Manually remove any entries from the
>>> /var/spool/lp directory      (1 file in /var/spool/lp/tmp/system-name
>>>   and 1 file in /var/spool/lp/requests/system-name
>>>       ).
>>>  (b_ For a remote printer, the directories of interest are the
>>> /var/spool/lp/tmp/system-name (which contains two files) and the
>>> /var/spool/lp/requests/system name contains another file.

As of Solaris 2.6, this is incorrect and will have no effect as remote
printers use /var/spool/print.

- Show quoted text -

Quote:

>>> 3. Re-start the printer daemon (either /usr/lib/lpsched or
>>> /etc/init.d/lp start)
>>> **************************************************************************

>> I have now done all that.

>> However, until I again by-hand empty the paper-tray, I'm *still*
>> getting those same 1-line-of-garbage per page
>> wasted-paper.

>> QUESTION: who knows *how much* still reamains queued-up --
>> this is my first (and hopefully last) time sending a .pdf
>> file to my printer!   How to totally get rid of all
>> that stuff -- hopefully without having to open up my blade100
>> and physically pull it all out, hand over hand, like some
>> hugely long eel!

>> Suggestions?

>> Thanks!

>> David

> Hi David,
> Did you turn the printer off to clear it's buffers?

 
 
 

How to 100% flush lp's buffers? I've rm'd spool-files, lp stop, lp start

Post by David Com » Sun, 09 May 2004 05:15:26






SNIP

>>> who after asking some people for help, sent me these instructions:

>>>> ***************************************************************************

>>>> 1. Stop the printer daemon from running (/usr/lib/lpshut or
>>>> /etc/init.d/lp stop)

>>>> 2. (a) For a local printer:     Manually remove any entries from the
>>>> /var/spool/lp directory      (1 file in /var/spool/lp/tmp/system-name
>>>>   and 1 file in /var/spool/lp/requests/system-name
>>>>       ).
>>>>  (b_ For a remote printer, the directories of interest are the
>>>> /var/spool/lp/tmp/system-name (which contains two files) and the
>>>> /var/spool/lp/requests/system name contains another file.

>As of Solaris 2.6, this is incorrect and will have no effect as remote
>printers use /var/spool/print.

OK -- although this is a LOCAL printer.  What effect does
that have on (a) the original instruction (b) your modification?

Quote:

>>>> 3. Re-start the printer daemon (either /usr/lib/lpsched or
>>>> /etc/init.d/lp start)
>>>> **************************************************************************

Thanks,

david

 
 
 

How to 100% flush lp's buffers? I've rm'd spool-files, lp stop, lp start

Post by Greg Andre » Sun, 09 May 2004 09:52:57



>>  ***************************************************************************
>>  1. Stop the printer daemon from running (/usr/lib/lpshut or
>>  /etc/init.d/lp stop)

>>  2. (a) For a local printer:
>>      Manually remove any entries from the /var/spool/lp directory
>>       (1 file in /var/spool/lp/tmp/system-name
>>    and 1 file in /var/spool/lp/requests/system-name
>>        ).

>>   (b_ For a remote printer, the directories of interest are the
>>  /var/spool/lp/tmp/system-name (which contains two files) and the
>>  /var/spool/lp/requests/system name contains another file.

>>  3. Re-start the printer daemon (either /usr/lib/lpsched or
>>  /etc/init.d/lp start)
>>  **************************************************************************

As root:

1. /usr/sbin/lpshut

2. cd /var/spool/lp
   rm -r tmp temp fifos requests

3. cd /var/spool/print
   rm *

4. /usr/lib/lpsched

Sun technical support often calls this procedure the
"spool clean" because it erases print jobs from queues
(including partial print jobs that sometimes occur), and
solves a couple of other kinds of problems that happen
once in a while.  It flushes out all print jobs in dirs
used by the stock Solaris print system, whether they're
remote printers, network printers, or local printers.
Naturally, it can't help problems with non-Sun print
software that might be installed.  The symlink and dirs
deleted in step 2 will be re-created by lpsched when it's
re-started in step 4.

  -Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.

 
 
 

How to 100% flush lp's buffers? I've rm'd spool-files, lp stop, lp start

Post by ML Starke » Tue, 11 May 2004 21:08:28







> SNIP

>>>>who after asking some people for help, sent me these instructions:

>>>>>***************************************************************************

>>>>>1. Stop the printer daemon from running (/usr/lib/lpshut or
>>>>>/etc/init.d/lp stop)

>>>>>2. (a) For a local printer:     Manually remove any entries from the
>>>>>/var/spool/lp directory      (1 file in /var/spool/lp/tmp/system-name
>>>>>  and 1 file in /var/spool/lp/requests/system-name
>>>>>      ).
>>>>> (b_ For a remote printer, the directories of interest are the
>>>>>/var/spool/lp/tmp/system-name (which contains two files) and the
>>>>>/var/spool/lp/requests/system name contains another file.

>>As of Solaris 2.6, this is incorrect and will have no effect as remote
>>printers use /var/spool/print.

> OK -- although this is a LOCAL printer.

You did not mention that in your original problem description, but
I was merely pointing out that you were given incorrect information. If
you DID have a remote printer, the procedure you were given would not help.

Quote:> What effect does
> that have on (a) the original instruction (b) your modification?

See the reply from Greg Andrews for a more thorough method for clearing
garbage from the spooler.

- Show quoted text -

Quote:

>>>>>3. Re-start the printer daemon (either /usr/lib/lpsched or
>>>>>/etc/init.d/lp start)
>>>>>**************************************************************************

> Thanks,

> david

 
 
 

1. Starting lpd: Warning - lp: cannot stat lp device '/dev/lp0'

Hi

After installing cups, the below started happening when the lpd service
starts up:


Stopping lpd:                                              [  OK  ]
Loading parallel port printer kernel modules ...
Starting lpd: Warning - lp: cannot stat lp device '/dev/lp0' - Permission
denied

permission of /dev/lp0 are:
lr-xr-xr-x    1 lp       lp             10 Feb  2 01:43 lp0 -> printers/0

(I changed the group to daemon, sys - but gets changed back - but doesn't
solve the problem anyway).

/dev/printers/0
crw-rw----    1 lp       lp         6,   0 Feb  2 00:46 0

How do I get around this problem

thanks

2. Trident TGUI9440AGi at 1024x768 75Hz problem

3. LP doesn't work after lp jumbo patch

4. Improving security

5. 'C' access to the lp spooling stuff, any ideas

6. tcpwrapper

7. Difference between 'copy' and 'lp'

8. Anyone get Linux on a Shuttle SpaceWalker SS40?

9. 'lp' and 'ghostscript'

10. Making 'nobanner' Default in V.3.2 'lp'

11. Difference between 'copy' and 'lp'

12. HELP AGAIN: lp control file format (what is 'v')