Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Queue enabler for Solaris 11.3 Post 303031103 by feroccimx on Thursday 21st of February 2019 02:41:30 PM
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!
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
msgchk(1mh)															       msgchk(1mh)

Name
       msgchk - check for messages

Syntax
       msgchk [ -help ] [ -nodate ] [ -notify all|mail|nomail ] [ users ...  ]

Description
       The  program checks all known mail drops for mail that is waiting for you.  It displays whether you have mail waiting to be read or not and
       shows the date that you last read your mail.

       You can check other user's maildrops by specifying their user names as the users argument on the command line.

Options
       -help	 Prints a list of the valid options for this command.

       -date
       -nodate	 Prints the date when you last read your mail.	This is the default behavior of The -nodate option can be used of you do not  want
		 to print this date.

       -notify
       -nonotify Indicates  under  what circumstances should produce a message.  There are three legal values: all, mail, and nomail.  The default
		 is -notify all, which reports the status of the maildrop regardless of whether it has mail in it or not.  The -notify mail option
		 reports  the  status of the maildrop only if there is mail waiting.  The -notify nomail option reports the status of the maildrop
		 only if there is no mail in it.

       -source file
		 Specifies the source which are checked for mail.  The only value allowed is file, which is the user's maildrop.  Additional  val-
		 ues are supported only for use with other mail systems.

Restrictions
       does  not  understand the $MAILDROP environmental variable.  If mail is fetched from a location other than will not be able to determine if
       new mail has arrived.  However, can still be used to fetch mail when it arrives.

       For this version, the -source option only supports the value file.  Additional values are supported for use only with other mail systems.

Examples
       This example shows a user Smith checking his own maildrop:
       % msgchk
       Smith:
	  New file source mail waiting ; last read on Tue, 07 Jun 88 17
       :21:49 WET

       The next example shows a user checking the maildrops of two other local users on the same system, Rabb and Jones:
       % msgchk Rabb Jones
       Rabb:
	  No file-source mail waiting ; last read on Tue, 07 Jun 13:22:
       25 WET
       Jones:
	  New file source mail waiting ; last read on Tue, 07 Jun 17:30
       :05 WET

Files
       The user profile.

       The system customization file.

       The user's maildrop.

See Also
       inc(1mh)

																       msgchk(1mh)
All times are GMT -4. The time now is 08:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy