?
Solved

How to monitor print serives - Sol 10

Posted on 2010-08-13
1
Medium Priority
?
450 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 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

771 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