Solved

Printers - lpstat

Posted on 1997-01-24
1
509 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

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 …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

630 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