Solved

Printers - lpstat

Posted on 1997-01-24
1
498 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

20 Experts available now in Live!

Get 1:1 Help Now