Solved

How to monitor print serives - Sol 10

Posted on 2010-08-13
1
442 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
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

758 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

22 Experts available now in Live!

Get 1:1 Help Now