Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g4DGnGu17503
 for <oracle-l@naude.co.za>; Mon, 13 May 2002 12:49:16 -0400
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id JAA35839;
 Mon, 13 May 2002 09:58:10 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b71/bab) via UUCP id 0045F7C3; Mon, 13 May 2002 09:48:58 -0800
Message-ID: <F001.0045F7C3.20020513094858@fatcity.com>
Date: Mon, 13 May 2002 09:48:58 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Reddy, Madhusudana" <Madhusudana.Reddy@bestbuy.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Reddy, Madhusudana" <Madhusudana.Reddy@bestbuy.com>
Subject: RE: Unix Script --- Archive Log Destination Issue
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 71; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

My mistake , this new script is only working sometimes. Which is scheduled
every hour , but not working at all the hour changes .

-----Original Message-----
Sent: Monday, May 13, 2002 11:28 AM
To: Multiple recipients of list ORACLE-L


Hello All,
I have a script, which cleans up the archive log destination by moving the
old archive logs to a retention area based on the thresholds 
1. Percent of space utilization
2. greater than 2 days old.

The script was working fine , except for the reason , sometimes we see
multiple copies of the same. So I have added the following to code just to
stop multiple copies. But now the script is not running at all and we did
see more than 90% space utilization archive log destination.

Here is the added code:

####################################################
# Exit If Already Running
####################################################
function ExitIfAlreadyRunning
{
copies=`ps -ef | grep OraProcessArch | grep "$SID_NAME" | grep -v grep | wc
-l`
if [ $copies -gt 2 ]
then
   echo $(date)" Number Of Copies Running : $copies"
   exit 0
else
   return 0
fi
}

Any suggestions ???

I am not  so good in using semaphores and all , looking for a simple
solution if possible ..

Thanks in advance,
Madhu

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Reddy, Madhusudana
  INET: Madhusudana.Reddy@bestbuy.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Reddy, Madhusudana
  INET: Madhusudana.Reddy@bestbuy.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

