Topics: HP Output Server

Number of jobs per logical destination

The following is a simple script to show you the number of jobs currently active within a given JQM per logical destination. The script is called nq:

#!/bin/ksh
. /appl/dazel/etc/setup_env.sh
jqm=$1
if [ -z "$jqm" ] ; then
   echo Please enter the name of a jqm.
   exit
fi
pdls -c j -a destination $jqm: | grep destination | sort | awk '{print $3}' > /tmp/nq.$$
cat /tmp/nq.$$ | sort -dfu | while read printer ; do    echo $printer: `grep $printer /tmp/nq.$$ | wc -l | awk '{print $1}'` jobs
done
You'll have to modify this script to set the correct directory to setup_env.sh.

When you run this script, enter the name of a JQM as a parameter for this script:
# nq jqm_01
pr31249: 1 jobs
pr43461: 8 jobs
pr58153: 11 jobs
pr77996: 1 jobs
pr03226: 5 jobs




If you found this useful, here's more on the same topic(s) in our blog:


UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.

Interested in learning more?