Sponsored Content
Full Discussion: Printer availability
Operating Systems Solaris Printer availability Post 302180771 by sparcguy on Tuesday 1st of April 2008 05:35:30 AM
Old 04-01-2008
There's no such script, you have to write it yourself. Depending on what is your requirement it could be very simple or a huge undertaking to write a script with cluster like HA features - A lot of work.

I can suggest you some ideas, the rest is up to you.

u will probably need to do a "while loop" with an inside "for loop"

monitor_printers.txt will be the list of all your printers and servers in the following

printer1
printer2
svrnt01
svrnt02

testprt.sh testnt.sh example are the different test scripts to test your printers/server alive.

/export/home/scripts an example of where on your unix box you might store your scripts.

~~~~~~~~~~~~~~ loopcheck.sh~~~~~~~~~~~~~~~

while true
do
for i in `cat /export/home/scripts/monitored_printers.txt`
do
/export/home/scripts/testprt.sh
/export/home/scripts/testnt.sh
done
sleep 300 # 5mins
done

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

chmod 755 /export/home/scripts/loopcheck.sh
nohup /export/home/scripts/loopcheck.sh &

The script will loop endlessly sleep 5mins wake up to run the "for loop" testing then sleep again.

the testprt.sh & testnt.sh script could include something like in the event cannot ping or cannot rectify then send email to your cellphone and you will be alerted.

read up unix man pages on test, if, while, for, mailx, lpstat


good luck
 

7 More Discussions You Might Find Interesting

1. Linux

know I do for to printer in printer deskjet 80colun

I want to print some thing in HP Deskjet 692.? (1 Reply)
Discussion started by: edvaldo
1 Replies

2. IP Networking

How do you send printer codes to an IP printer

We were printing to a serial laser printer with all the HP codes to generate a form (i.e. lines, boxes, etc.) Thus the file is filled w/ control codes. We are switching to an IP printer and we can no longer print directly to the device (i.e. cp text /dev/tty11). It looks like we have to use the lp... (2 Replies)
Discussion started by: jeffbugfree
2 Replies

3. Solaris

Configuring Printer with Printer Manager

Hi All, I am trying to configure printer in solaris 10 with the help of print manager. There is no printer attached to my system, ia m doing it for test purpose. However I am unable to do so coz its pops up window - Heading as error with option as dismiss and cancel. Kindly help as I am... (3 Replies)
Discussion started by: kumarmani
3 Replies

4. AIX

Check printer queue on Windows printer server

Hello Let me first give a small overview of the setup. All printers are connected to Windows 2000 servers. There are a lot of UNIX (AIX & HP-UX) servers as well which have SAP running. I'm working on a script to add printers to a specified SAP instance. I want to verify the user input (to... (0 Replies)
Discussion started by: NielsV
0 Replies

5. Linux

Find printer location and printer type

Hi, Is it possible to find the printer location and printer type (whether it is local or network) using command in Linux ? Thanks in advance. (1 Reply)
Discussion started by: forumguest
1 Replies

6. Linux

Availability: echo vs. printf?

Hello, For some reason i dont remember, i currently believe (but beeing unsure) that printf is available on more diffrent systems (unix, bsd, linux, ??) than echo is. Could someone please enlighten me, whether this is true or not? Thank you PS: I just found pages about the diffrences of... (3 Replies)
Discussion started by: sea
3 Replies

7. Solaris

High availability

hi guys I posted problem last time I didn't find answer to my issue. my problem is as below: I have two servers which work as an actif/standby in high availability system. but when i use command HASTAT -a i have the following message: couldn' find actif node. the servers are sun... (1 Reply)
Discussion started by: zineb06
1 Replies
All times are GMT -4. The time now is 05:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy