From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: RichGlazier@netscape.net (Rich Glazier) Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: getting info on print queues with queued print jobs. Date: Wed, 29 Oct 2003 13:33:15 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <104FF1F5.26860072.3ED58B64@netscape.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Trace: sea.gmane.org 1067452420 15891 80.91.224.253 (29 Oct 2003 18:33:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Oct 2003 18:33:40 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Wed Oct 29 19:33:38 2003 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1AEv8T-0002NW-00 for ; Wed, 29 Oct 2003 19:33:38 +0100 Original-Received: (qmail 25495 invoked by uid 5); 29 Oct 2003 18:33:31 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 25480 invoked by uid 49493); 29 Oct 2003 18:33:31 -0000 Original-Received: from richglazier@netscape.net by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-3.1/5.0):. Processed in 0.659752 secs); 29 Oct 2003 18:33:31 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (160.91.86.17) by 0 with SMTP; 29 Oct 2003 18:33:30 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HNJ003967JQZ1@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 29 Oct 2003 13:33:29 -0500 (EST) Original-Received: from imo-d02.mx.aol.com (imo-d02.mx.aol.com [205.188.157.34]) by emroute2.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HNJ0083Q7JNEI@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 29 Oct 2003 13:33:24 -0500 (EST) Original-Received: from richglazier@netscape.net by imo-d02.mx.aol.com (mail_out_v36_r1.1.) id g.7.b17d984 (22680) for ; Wed, 29 Oct 2003 13:33:15 -0500 (EST) Original-Received: from netscape.net (mow-d15.webmail.aol.com [205.188.139.131]) by air-in04.mx.aol.com (v97.8) with ESMTP id MAILININ41-58983fa007eb26a; Wed, 29 Oct 2003 13:33:15 -0500 Original-To: tru64-unix-managers@ornl.gov X-Mailer: Atlas Mailer 2.0 X-AOL-IP: 65.201.47.246 Xref: main.gmane.org gmane.os.tru64.managers:5687 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:5687 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