Check for statup process in loop?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Check for statup process in loop?
# 1  
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?
# 2  
Old 09-25-2008
Use a while loop. It's pretty easy to write what you need, but since you asked for a direction not an answer I'll let you work through it Smilie

You can use this link for a bit of information: Bash Reference Manual

If you want the actual tidbit of code say so and I'll peg it out for you
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

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

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

10. 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
Login or Register to Ask a Question