Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot cancel print jobs

Status
Not open for further replies.

stevedeb

IS-IT--Management
Oct 23, 2003
75
0
0
US
Hi,

I am new to UNIX so this may be a basic question.

I am runing HP-UX 10.2 I have 2 print jobs that I see from "lpstat -u" that have bene sitting for some time. I would like to cancel them but "cancel printjob" is not working. This always works for cancelling print jobs until now.

I also went into SAM and tried to cancel the print job. I get no result or error message from cancelling via command line or SAM. It just comes back to a prompt and "lpstat -u" reveals that the job is still there.

What do I do?

Thanks,
Steve
 
As root, run command lpc... This is an old BSD UNIX print maintenance program that I think exists in HPUX... You will get a prompt "lpc>"... From there you can run "lpc> help" to see your options... You will be able to run options like clean, restart, enable, status... If your spooler for this printer in question has jobs, you should be able to clear them.
 
Just an alternative to try:

[tt]lpq -a[/tt] should show the print jobs and their names. Make sure you have the name of the print job right.

Try [tt]lprm printjob[/tt] instead of cancel.

Are these commands there on HP-UX? I only know Solaris and Linux.

--
-- Ghodmode
 
Thanks for the suggestions but none of the cammands presented so far as solutions seem to exist on my system. This is very frustrating. The 2 print jobs do not seem to be causing any problems, they just sit there and laugh at me...Any other suggestions.
 
Try stopping, then re-starting your printer daemon. I think the right command for shutdown is [tt]lpshut[/tt] and the command to start it back up is [tt]lpsched[/tt]. Check your man pages for those commands to verify.

Google search: man lpsched hp ux
[tt]lpsched Schedules requests taken by lp(1) for printing on line
printers. lpsched(1M) is typically invoked in /etc/rc.
This creates a process which runs in the background until
lpshut is executed. The activity of the process is recorded
in /usr/spool/lp/log.

lpsched recognizes the following options:

-v Write a verbose record of the lpsched process on
/usr/spool/lp/log.

-a Write lpana(1M) logging data on
/usr/spool/lp/lpana.log.

lpshut Shuts down the line printer scheduler. All printers that
are printing at the time lpshut is invoked stop printing.
Requests that were printing at the time a printer was shut
down are reprinted in their entirety after lpsched is
started again. All LP commands perform their functions even
when lpsched is not running.[/tt]

It looks like the print scheduler manages print jobs with actual files on the filesystem. Check /usr/spool/lp to see what's there.

--
-- Ghodmode
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top