Solved

How to monitor print serives - Sol 10

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

831 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