Solved

Printers - lpstat

Posted on 1997-01-24
1
501 Views
Last Modified: 2013-12-26
I need a small script for AIX that will look at the status of all the spooled printers and if any of them are down it will bring them back up. I imagine this can be done with lpstat and qadm but I am not a programmer so I am not sure how to write the script. If anyone could help me with this I would sure appreaciate it...
0
Comment
Question by:homerb
1 Comment
 
LVL 1

Accepted Solution

by:
marc123096 earned 50 total points
ID: 1292252
The answer is in the question!
lpstat |grep DOWN |grep -v grep |cut -1 |enq -U
that's will lookup wich queue is down and then bring it up
If you want to use qadm instead of "enq" have a look to both man pages
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now