Solved

Printers - lpstat

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ODBC Connection Logging, ADO.NET 6 71
Add content to output file 4 71
maven archtype selection in eclipse 1 58
Problem to event 3 112
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.

685 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