tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: getting info on print queues with queued print jobs.
@ 2003-10-29 18:33 Rich Glazier
  0 siblings, 0 replies; only message in thread
From: Rich Glazier @ 2003-10-29 18:33 UTC (permalink / raw)


Thanks to everone's suggestions.  Here is what I ended up doing.  This command gets all print queue info for any queues with 5 or more pending jobs.  I also put it in a script where it emails me the output, and run the script from cron twice a day.

note: the "awk '/:$/ {print ""};{print}'" inserts a blank line in betwen every lpc stat entry, so I can use the grep -p later. 

/usr/sbin/lpc stat | awk '/:$/ {print ""};{print}' | /sbin/grep -p "entries in spool area"  | /sbin/grep -p -v -E -w '2 entries|3 entries|4 entries' 





RichGlazier@netscape.net (Rich Glazier) wrote:

>5.1A PK4
>
>Does anyone have an automated way in Tru64 to have information on backlogged print queues sent to you?  I am trying to get the entire section from print queues with pending jobs in lpc stat output.
>
>I am trying to extract the entire print queue section for only those with a backlog (entries in he spool area).  I have tried to grep with the Tru64 special paragraph delimiter (-p), or awk between lines ('/something/,/something/'), or use multiline sed output, but I'm not quite there. Perl is not on this machine. From the lpc stat output example below, I would want lp1: plus the four lines below it as output. Any thoughts? 
>
>
>
>lp0: 
>       printer is on remote host freddy with name LPDPRT1 
>       queuing is enabled 
>       printing is enabled 
>       no entries 
>       no daemon present 
>lp1: 
>       printer is on remote host lp1 with name text 
>       queuing is enabled 
>       printing is enabled 
>       59 entries in spool area 
>       no daemon present 
>lp1pc: 
>       printer is on remote host lp1 with name raw 
>       queuing is enabled 
>       printing is enabled 
>       no entries 
>       no daemon present 
>
>
>Thanks!!
>
>__________________________________________________________________
>McAfee VirusScan Online from the Netscape Network.
>Comprehensive protection for your entire computer. Get your free trial today!
>http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
>
>Get AOL Instant Messenger 5.1 free of charge.  Download Now!
>http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>

__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-29 18:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-29 18:33 SUMMARY: getting info on print queues with queued print jobs Rich Glazier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox