Visit Our UNIX and Linux User Community

Print Queue Montior

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Print Queue Montior
# 1  
Old 03-09-2009
Print Queue Montior

I am very new to scripting could use some assistance polishing up my script. I have had issues with a print queue going down and needing some TLC to get it going again, however currently I have to wait for a user to complain about the issue. I have written a little script to monitor the print queue and email me when a queue is not in a READY state.

while true;do lpstat -W|sed '1,2d'| awk '{ if ($3 != "READY") {print $1 " is having issues"}}'|mail -s "Printer Issue";sleep 30;done

I'm sure most of you can point out that all results are being passed onto mail and I receive emails every 30 seconds. I have been trying to understand the syntax so only positive hits are sent to mail however I have extended my scripting abilities.

Previous Thread | Next Thread
Test Your Knowledge in Computers #457
Difficulty: Easy
NTP was created to synchronize all participating computers to within a few milliseconds of Coordinated Universal Time (UTC).
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

[Solved] remove all print jobs from a print queue

Hello, Sometimes i need to clear all the jobs of a print queue and it is really annoying to cancel one by one. Is there a way to cancel all print jobs for a specific print queue with a single command instead of cancelling them one by one? My AIX system is 5.3 Thank you for your attention (2 Replies)
Discussion started by: omonoiatis9
2 Replies

2. AIX

Print queue restriction

Hi, I'm at AIX 5.3, I have a print queue named chqprinter, I want to allow access to print only 2 users to that print queue, jobs printed by all other users to above queue should be deleted. Any idea how to achieve that? ---------- Post updated at 10:33 AM ---------- Previous update was at... (5 Replies)
Discussion started by: tayyabq8
5 Replies

3. Shell Programming and Scripting

print queue jobs

Hi, I have one queue that have status QUEUE and 10 jobs are waiting.Can any one guide me how i can get total number of jobs on this queue.i can see 10 jobs but i need to get count 10 for this queue.Please help me out thanks in advance sagii (2 Replies)
Discussion started by: sagii
2 Replies

4. HP-UX

Print queue not getting flushed

Hi All, I am new to HP-UX and new to administration world. I have a problem with two HP Laser Jet M5035MFP printers which are connected to HP-UX host machines. Problem is that whenver we print a job, the job gets printed very fine but the queue is not cleared. This makes the further jobs on the... (2 Replies)
Discussion started by: akashgulati
2 Replies

5. Solaris

Print to ps2pdf print queue

I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (2 Replies)
Discussion started by: Sean_69
2 Replies

6. UNIX for Dummies Questions & Answers

Print to a ps2pdf print queue.

I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (1 Reply)
Discussion started by: Sean_69
1 Replies

7. AIX

AIX 5 print queue

I have setup a printer and queue using SMIT and I have set the default tray to 4. What I am trying to find out is if there is a way to set the next tray it trys to use if tray 4 is empty to tray 3, then tray 2, then tray 1. (0 Replies)
Discussion started by: chefsride
0 Replies

8. UNIX for Dummies Questions & Answers

Problem with print queue

I have a problem with a print queue that keeps going down on me every couple of days. When it happens I run an 'enable' and all is fine for a few more days. Can anyone can tell me where to start looking to debug this problem as i am new to UNIX Thanx (1 Reply)
Discussion started by: carell
1 Replies

9. UNIX for Dummies Questions & Answers

Print Queue Problems

Hi All Does anyone know what is meant by PRINTER STATUS CONNECT concerning print queues? At work we run a Perle/Connectix JetStream 8500 (RJ45 Model) to connect our dot matrix printers and often we get the Connect Status. Nobody I speak to knows what the status means. When the printer... (0 Replies)
Discussion started by: nickbungus
0 Replies

10. UNIX for Dummies Questions & Answers

print queue behavior on HP-UX

We have a 3rd party print queue installed on HP-UX 11.11 that interfaces with a binary. Basically we use the lp command to send reports to the print queue, which then interfaces with a binary to capture those reports into a reporting warehouse. The problem lies in the way that HP uses a link to... (6 Replies)
Discussion started by: dangral
6 Replies
LIQUIDSOAP(1)						      General Commands Manual						     LIQUIDSOAP(1)

liquidsoap - a multimedia streaming language SYNOPSIS
liquidsoap [options] [script|expression] DESCRIPTION
Liquidsoap is a programming language for describing multimedia streaming systems. It is very flexible, making simple things simple but giving a lot of control for advanced uses. Liquidsoap supports audio, video and MIDI streams, and a wide range of input/output operators including Icecast and various soundcard APIs. It can perform a broad range of signal processing, combine streams in various ways, support custom transitions, generate sound procedurally... and all this can be assembled as you wish. Input files can be accessed remotely, or even be synthesized on the fly using external scripts such as speech synthesis. Finally, interaction with a running liquidsoap instance is possible via telnet or socket. Liquidsoap scripts passed on the command line will be evaluated: they shall be used to define the streaming system to be ran. It is possi- ble to pass multiple scripts; they will all be ran successively, and definitions from one script can be used in subsequent ones. A script will be read from standard input if - is given as script filename. Information about scripting liquidsoap is available on our website: If the parameter is not a file it will be treated as an expression which will be executed. It is a convenient way to test simple one-line scripts. When running only one-liners, the default is to log messages directly on stdout rather than to a file. OPTIONS
- Read script from standard input. -- Stop parsing the command-line and pass subsequent items to the script. --debug Print debugging log messages. --dynamic-plugins-dir path Directory where to look for plugins. --errors-as-warnings Issue warnings instead of fatal errors for unused variables and ignored expressions. If you are not sure about it, it is better to not use it. --interactive Start an interactive interpreter. --list-plugins List all plugins (builtin scripting values, supported formats and protocols). --list-plugins-xml List all plugins (builtin scripting values, supported formats and protocols), output as XML. --no-pervasives Do not load pervasive script libraries. --version Display liquidsoap's version. -c, --check Check and evaluate scripts but do not perform any streaming. -cl, --check-lib Like --check but treats all scripts and expressions as libraries, so that unused toplevel variables are not reported. -d, --daemon Run in daemon mode. -f, --force-start For advanced dynamic uses: force liquidsoap to start even when no active source is initially defined. -h plugin Print the description of a plugin, eg. a builtin scripting function. -i Display infered types. -p, --parse-only Parse scripts but do not type-check and run them. -q, --quiet Do not print log messages on standard output. -r filename Process a request. -T, --disable-telnet Disable the telnet server. -U, --disable-unix-socket Disable the unix socket. -t, --enable-telnet Enable the telnet server. -u, --enable-unix-socket Enable the unix socket. -v, --verbose Print log messages on standard output. --conf-descr-key key Describe a configuration key. --conf-descr Show all configuration keys with their documentation. --conf-descr-liqi Show all configuration keys with their documentation in liqi (documentation wiki) format. --conf-dump Dump the configuration state -help, --help Display this list of options SEE ALSO
Our website and the HTML documentation coming with your distribution of liquidsoap. AUTHOR
Savonet team <> Liquidsoap 1.0.1 June 25, 2012 LIQUIDSOAP(1)

Featured Tech Videos