Solved

How to monitor print serives - Sol 10

Posted on 2010-08-13
1
446 Views
Last Modified: 2013-12-27
I recently had an issue where all printing stopped.  The scheduler was up and jobs were in the queues.  Nothing was flowing and there were no errors in the message logs or print logs.  The scheduler had to be restarted twice and voila, all jobs were printed.

I am looking for some scripts and or ideas to monitor the printing services.  I need first alert so my users are not the ones notifying my team of a print issue.

0
Comment
Question by:Craig Sharp
[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 11

Accepted Solution

by:
Pieter Jordaan earned 500 total points
ID: 33439852
Hi

Depending on your print configuration, you can add a cronjob to count the amount of files in /var/spool/print or /var/spool/lp and alert you if the amount of files exceeds a preset amount.

You will have to play with QUEUEMAX, and increase it to a number that will work with your environment.
Make sure the bash path is correct. this is usually /bin/bash
Also change the SPOOLDIR to your print spool directory.

I hope that helps.
#!/bin/bash
QUEUEMAX=20
SPOOLDIR=/var/spool/print
CNT=`ls -l $SPOOLDIR | wc -l`

if [ $CNT -gt $QUEUEMAX ]
   then
      #Alert the sysadmins
      ls -lh $SPOOLDIR | mailx -s "Print queue size exceeds $QUEUEMAX" sysadmin@mycompany.com
   fi

Open in new window

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

730 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