Queue enabler for Solaris 11.3


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Queue enabler for Solaris 11.3
# 1  
Old 02-21-2019
Queue enabler for Solaris 11.3

Hello,

I was asked to modify below script to adapt it to Solaris 11.3. I am not sure if it is ksh or bash, but need your assistance to do it for Solaris 11.3

Code:
## Variables
flag="/sysadm/bin/queue_enabler.flg"
set -A maillist  unixadm@unixhost.tv
############

##### Remove logs older than 1 week #####
cd /tmp && find . -name "queue_enabler.*" -mtime +6 -exec rm {} \;
#########################################

echo "\n`date +'%D %T'`\n" >> /tmp/queue_enabler.`date +'%m%d'`

if [[ -e $flag ]]
then
        for mail in ${maillist[@]}
                do
                        echo "Duplicate queue_enabler11 process with ID $$ running"|mail -s test_unixhost_check_queue_enabler $mail
                done
        exit 1
fi

echo $$ >> $flag

for i in `lsallq`
do
        status=`enq -s -P $i|grep $i|awk '{print $3}'`
        if [[ $status = DOWN ]]
            then
                print "Queue $i found DOWN and enabled on `date +'%D %T'`" >> /tmp/queue_enabler.`date +'%m%d'`
                qadm -U $i
        fi
done

rm $flag

Thank you in advance!
# 2  
Old 02-21-2019
From the set -A, it looks like ksh to me.
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 02-21-2019
Yes, and only ksh has print.
You must make available (i.e. install) the software that has the commands lsallq enq qadm.
You might need to set PATH=/bin:/usr/bin:/path/to/software/bin at the beginning of the script.
# 4  
Old 02-21-2019
The task is to adapt that ksh script to Solaris 11.3, but AIX commands included on it, I do not know the equivalent in Solaris...
# 5  
Old 02-21-2019
If you don't know what this script is for, this is going to be an uphill battle.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

MQ Queue depth.

Hi All, We have SuoOs and Linux servers. May i know how do we find the queue depth of IBM MQ from server. (2 Replies)
Discussion started by: Girish19
2 Replies

2. Solaris

Solstice 6.0.3 - Server is disabled Install base enabler

hi people, I receive this message in the nwadmin: Registration info event: Server is disabled Install base enabler License enabler: #none (Networker/10 Eval) has expired. What happened? Please help me... Thank you (0 Replies)
Discussion started by: denisgomes
0 Replies

3. UNIX for Dummies Questions & Answers

Solaris 8 setup remote printer queue help

I am trying to setup a remote printer (home users printer) through Solaris 8. The IP address is 172.16.17.10 and I can ping the printer, a local windows printer queue has been setup and works but now I am trying to setup a remote Unix printer queue. With this being a remote printer, do I need to... (2 Replies)
Discussion started by: miredale
2 Replies

4. Solaris

creating printer queue in Solaris 10

I have installed the foo2zjs drivers but i don't know the next steps to how to make a print queue with ppd files........kindly guide me out if anyone have used foo2jzs or some other methods to configure the hp laserjet 1022n printer.Kindly explain step by step procedure of how to do this. ... (2 Replies)
Discussion started by: kumarmani
2 Replies

5. Solaris

Help required in installing Java Message queue in Solaris 10

Hi All, We are already having sun Java Message Queue installed in our solaris 10 server installed by my senior colleagues. Now I need to do fresh installation the same thing in another solaris 10 server. I took the setup named "mq3_7-ent-solsparc.zip" and copied to the new server. Now all I... (4 Replies)
Discussion started by: nsurendiran
4 Replies

6. Shell Programming and Scripting

mq queue depth

hi how to find the queue depth of MQ Queue using unix please its very urgent (0 Replies)
Discussion started by: Satyak
0 Replies

7. Programming

message queue

Hello, i need to write a message queue "chat server", that should work only localy. Can anyone please help me with some ideas and peshaps code. I'm studying the UNIX IPC mechanisms right now. So far, i understand how it works but i still cannot get an idea how to write a chat programm... ... (2 Replies)
Discussion started by: etenv
2 Replies

8. UNIX for Advanced & Expert Users

Solaris 8 setting up a remote printer queue

I have a printer installed over ADSL to a router at a remote location. A Windows printer queue has been setup and working and I can ping the IP address from the Solaris server. I now want to add a printer queue for this printer under Solaris, but I am unsure how to setup a remote printer queue.... (0 Replies)
Discussion started by: miredale
0 Replies

9. Programming

Queue

:confused: I have some problem with the technology Queue in Unix Can someone explain me the way queue is made and how it excute ,how it run Thanks in advance (1 Reply)
Discussion started by: iwbasts
1 Replies

10. Programming

Solaris- print to a remote queue

Is it possible to send a print job to a print queue on a different machine? (3 Replies)
Discussion started by: dangral
3 Replies
Login or Register to Ask a Question