Originally posted by: SystemAdmin
Hi,
In the past we have tried two approaches: a menu driven script, and a web based cgi program. Currently, we are using the menu driven script. The problem we had with this, is that with a large number of printers, at least one will be down, and something like lpstat or enq takes forever to work through the queues. The solution is to use "expect" to check all queues in parallel; not sequentially. This causes other problems with "expect", unless you increase the number of allowed ptys on the system. I would suggest that you write the main script in perl or shell, and only use expect to test the queues.
The other thing that we do is have a root script running from crontabs which checks each host on an hourly basis (office hours only). If it finds problems, then it e-mails the UNIX Support team.
Regards,
Spook