long runnning processes more than one hour not able to see in ps -ef command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting long runnning processes more than one hour not able to see in ps -ef command
# 1  
Old 02-27-2008
Question long runnning processes more than one hour not able to see in ps -ef command

hi,
We have one script ‘X' which invokes another script ‘Y'. Inside X we are checking if Y is active/running or not with ps command. But for cases when Y runs for more than 1 hour the ps command inside X returns that no Y process running. Can you please guide me if in UNIX any long running process can't be captured with ps command (may be that process goes in some idle, sleep or steady state.)? If so then how can we capture that process?

Your comments will be very helpful to us in correcting this issues.

Thanks & regards
shyam~
# 2  
Old 02-28-2008
If the process is running under its own name, y, then it should be listed with ps, even if it is sleeping, zombied or idle.
Consider using the pidof <processname> command if it is availble, or use ps aux|grep <processname>|grep -v grep.
One possibility could be that the process has been orphaned, that is, taken over by owner root or is started by some other owner or in an another process. For example if Your session dies or the process has been set to run in the background and disconnected. With ps -ef You only see Your own current processes or "children", use ps aux or something similar instead.
# 3  
Old 02-28-2008
long runnning processes more than one hour not able to see in ps -ef command

hi lakris,

ps aux|grep <processname>|grep -v grep is not working ...
still i unable to see child process...
# 4  
Old 02-28-2008
hi please any one can help on this ....
# 5  
Old 03-01-2008
Well, OK, it would help if You gave us an example of what it looks like now. How does the original script run, what shell and OS, etc?

/L

Last edited by Lakris; 03-01-2008 at 01:00 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run ping command every hour in backgrond

Hi, I have a VPN tunnel. It is going down occasionally. I need to run "/usr/sbin/ping 172.xx.xx.xx.xx" and it give mes output "172.xx.xx.xx is alive" and immediately after that VPN tunnel comes up. Till we find permanent solution, I want this command to run in background, like every one hour.... (4 Replies)
Discussion started by: solaris_1977
4 Replies

2. AIX

Need to check long running processes on the database server and the os is AIX

Hello, Please help me with a script with which I can check long running processes on the database server and the os is AIX. Best regards, Vishal (5 Replies)
Discussion started by: Vishal_dba
5 Replies

3. Shell Programming and Scripting

Need a script to see top processes for every hour

Hi All, I am new to Scripting , please give me guidance to write the script to see top processes on the Linux operating system. I executed this script on my Virtual Server(Linux) DATE=`date +%Y%m%d%H%M%S` HOME=/home/xmp/testing/xmp_report RADIUS_PID=`xms -xmp sh pr | grep... (2 Replies)
Discussion started by: madala
2 Replies

4. Shell Programming and Scripting

How to convert 24 hour time to 12 hour timing?

Hi friends, I want to convert 24 hour timing to 12 hour please help me... my data file looks like this.. 13-Nov-2011 13:27:36 15.32044 72.68502 13-Nov-2011 12:08:31 15.31291 72.69807 16-Nov-2011 01:16:54 15.30844 72.74028 15-Nov-2011 20:09:25 15.35096 ... (13 Replies)
Discussion started by: nex_asp
13 Replies

5. Shell Programming and Scripting

Quick question about finding the PID of long-running processes

The end result that I'd like is to terminate any process on my ps -u username list that extends beyond 20 minutes. I know for a fact that this process will be named l.exe, but I don't know the number in between and I won't know the PID. Is there a way to use grep or pidof to do this task every 20... (2 Replies)
Discussion started by: Bolanok
2 Replies

6. AIX

How to Identify long running unix processes

Hi All, Need an urgent help, I have a requirement to find long running unix processes.. I have tried the below commands, but not succeed. I need to arrange the unix processess in an order of elapsed time (high to low) that runs in a system. For Eg: Consider we have 3 processes, Pid 1 pid 2... (5 Replies)
Discussion started by: mohamedirfan
5 Replies

7. Shell Programming and Scripting

determine the active processes on the system which are running since long time

Hi , Please help me shell script to determine the active processes on the system which are running since long time (2 Replies)
Discussion started by: itian2010
2 Replies

8. Shell Programming and Scripting

Script for long running processes....

I searched the forums but didn't see anything related to what I'm looking for. I need a script that would give me a listing of jobs running longer than, for example, 12 hours or so. Thanks in advance for your assistance!! (2 Replies)
Discussion started by: CyberOptiq
2 Replies

9. Shell Programming and Scripting

runnning a shell script in multiple folders

Hey everyone, I'm fairly new to both unix and shell scripts. Right now I have a script that I can run in one folder (if a certain text file is there, do one thing, if it's not, do something else). I want to modify this to run in multiple directories. My setup is: a company directory, and within it... (2 Replies)
Discussion started by: melearlin
2 Replies

10. Shell Programming and Scripting

Display runnning countdown in a bash script?

I am looking for a way to display on a single line, a running countdown for a given amount of time in a terminal using a bash script. I am looking for this to use as part of a larger bash script that captures Video. The script sets up a bunch of parameters for DVgrab, and one of the parameters... (11 Replies)
Discussion started by: Starcast
11 Replies
Login or Register to Ask a Question