Sponsored Content
Top Forums Shell Programming and Scripting Check for statup process in loop? Post 302240434 by dataciph3r on Thursday 25th of September 2008 09:03:32 PM
Old 09-25-2008
Check for statup process in loop?

I've written a script to check for Oracle's listener, eventman and pmon processes however there are several databases that startup which can take several minutes.

I'd like to add code to my current script that greps for the process “startup” and whether its condition is true or false. If the condition is true, the script will sleep for a time and then grep for the process “startup” again and again as needed. Once the condition is false the script will then execute the rest of the of code and check for the Oracle processes.

Can someone point me in the right direction?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

process check

does anyone know an easy way that at the beginning of your script you check to see if that process is already running? I think it would have something to do with ps but I may be making it more complicated than it has to be. If you have a script run say, every half hour, you would want to check and... (13 Replies)
Discussion started by: k@ssidy
13 Replies

2. UNIX for Advanced & Expert Users

Check the process

I want to find the pid ( by ps ) that has already run over 30 seconds , I know ps only show the minute/hour . eg. the start time of the below process are 15:19 / 15:20 , but I don't know the exact time ( in term of "second" ) it start to run ( I only know the hour and minute ) , if I want to... (2 Replies)
Discussion started by: ust
2 Replies

3. Shell Programming and Scripting

check the process

how to kill the process that are idle over 30 minutes ? thx (2 Replies)
Discussion started by: ust
2 Replies

4. UNIX for Dummies Questions & Answers

Check the process

Except the command "top" , is there other function / tool is used to check the process status in the system like 1. what process are running ? 2. how the CPU are allocating ? 3. how many swap is using ? 4. " Thx. (1 Reply)
Discussion started by: ust
1 Replies

5. UNIX for Dummies Questions & Answers

place to put statup scripts?

I have written a script to start websphere server, I dont know where to put the file in the OS . please put me the place to put the starup scripts in linux, solaris and AIX? (2 Replies)
Discussion started by: jayaramanit
2 Replies

6. Shell Programming and Scripting

loop and check

Hi, We are doing a process manually and i am trying to automate it. This is the process. We have a set of files in the directory /temp/d1. the number of files are dynamic. For ex: if i have 5 files i want to compare the chatacters 45-58 of the last line of the first file with the same... (2 Replies)
Discussion started by: dnat
2 Replies

7. Shell Programming and Scripting

infinite loop to check process is running

Hi, I got a simple script working to check if a process is running and then email if it is not running anymore. My scenario is that I need to make sure the process is always running so instead of running the below script via cron I think it is better to a have a looping script to check... (12 Replies)
Discussion started by: yabai
12 Replies

8. Shell Programming and Scripting

Check process

Hi.. I have this code which tells me that if a process is running or not. Actually someone on this forum help me to do it. :) But now If i want to check if the process is not running for more than 10 minutes. Does anyone know the code or syntax that checks if a process is not running for some... (1 Reply)
Discussion started by: kanexxx
1 Replies

9. Shell Programming and Scripting

Loop check

Hi Gurus I have a recquirement where my loop should work if i have more than 4 listed files in a particular directory. Like the loop in while should continue checking if the directory has more than 4 files and should exit after there are 4 or more files ; if not more than 4 files it should... (5 Replies)
Discussion started by: r_t_1601
5 Replies

10. UNIX for Dummies Questions & Answers

How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies
OCF_HEARTBEAT_ORALSN(7) 					OCF resource agents					   OCF_HEARTBEAT_ORALSN(7)

NAME
ocf_heartbeat_oralsnr - Manages an Oracle TNS listener SYNOPSIS
oralsnr [start | stop | status | monitor | validate-all | meta-data | methods] DESCRIPTION
Resource script for Oracle Listener. It manages an Oracle Listener instance as an HA resource. SUPPORTED PARAMETERS
sid The Oracle SID (aka ORACLE_SID). Necessary for the monitor op, i.e. to do tnsping SID. (required, string, no default) home The Oracle home directory (aka ORACLE_HOME). If not specified, then the SID should be listed in /etc/oratab. (optional, string, no default) user Run the listener as this user. (optional, string, no default) listener Listener instance to be started (as defined in listener.ora). Defaults to LISTENER. (optional, string, no default) SUPPORTED ACTIONS
This resource agent supports the following actions (operations): start Starts the resource. Suggested minimum timeout: 120. stop Stops the resource. Suggested minimum timeout: 120. status Performs a status check. Suggested minimum timeout: 60. monitor Performs a detailed status check. Suggested minimum timeout: 30. Suggested interval: 10. validate-all Performs a validation of the resource configuration. Suggested minimum timeout: 5. meta-data Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5. methods Suggested minimum timeout: 5. EXAMPLE
The following is an example configuration for a oralsnr resource using the crm(8) shell: primitive example_oralsnr ocf:heartbeat:oralsnr params sid=string op monitor depth="0" timeout="30" interval="10" SEE ALSO
http://www.linux-ha.org/wiki/oralsnr_(resource_agent) AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors) resource-agents 1.0.3 07/05/2010 OCF_HEARTBEAT_ORALSN(7)
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy