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
FAXCRON(8)						      System Manager's Manual							FAXCRON(8)

NAME
faxcron - HylaFAX routine maintenance script SYNOPSIS
/usr/sbin/faxcron [ -n ] [ -l lastrun ] DESCRIPTION
faxcron is a command script that does routine upkeep tasks in a HylaFAX spooling directory hierarchy. This script is intended to be invoked from cron(8) on behalf of the fax user (often the ``fax'' user is uucp) once a day, with the standard output sent by mail to the HylaFAX administrator. For example, the following crontab might be set up for the fax user: 25 23 * * * sh /usr/sbin/faxcron | mail FaxMaster The faxcron script does the following work: o report statistics for facsimile transmitted since the last time faxcron was run. o report statistics for facsimile transmitted in the past week. o report statistics for facsimile received since the last time faxcron was run. o report statistics for facsimile received in the past week. o report any recent calls that failed suspiciously and return the associated trace log; o purge data that is 30 days or older from the remote machine information directory; o delete information that is 30 days or older from session trace log files; o remove files from the tmp directory that are older than 1 day; o remove files in the received facsimile queue that are 7 days or older; o report sites that are currently having jobs rejected; and o force all session log files to be owned by the fax user and kept with protection mode 644. OPTIONS
-n Forces faxcron to run without updating any files. -l lastrun Forces the notion of the last time that faxcron was run to be lastrun. The value of lastrun is a date and time string of the form ``MM/DD/YY HH:MM'' (the date(1) format string ``%D %H:%M''). -info n Set the expiration time for data in the info database to be n days. -log n Set the expiration time for session log data to be n days. -rcv n Set the expiration time for files in the received facsimile queue to be n days. -tmp n Set the expiration time for files in the tmp directory to be n days. -mode m Set the file protection mode for session logs to m (a command line argument to chmod(1)). NOTES
This script requires nawk(1) or gawk(1) and a date (1) program that supports the ``+format'' option. If session logs are to be kept private this script must be modified to filter out sensitive information such as calling card numbers. (It should also be run with ``-mode 0600'' so that session log files are not publicly readable.) FILES
/var/spool/hylafax spooling area /var/spool/hylafax/status/lastrun timestamp of last run /usr/sbin/xferfaxstats for generating transmit statistics /usr/sbin/recvstats for generating receive statistics /var/spool/hylafax/tmp/faxcronXXXX temporary file for truncating session logs /var/spool/hylafax/tmp/faxlogXXXX temporary file for logs of failed calls SEE ALSO
cron(8), faxq(8), faxgetty(8), faxsend(8), xferfaxstats(8), recvstats(8), hylafax-server(5) May 12, 1996 FAXCRON(8)
All times are GMT -4. The time now is 10:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy