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~

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.

hi lakris,

ps aux|grep <processname>|grep -v grep is not working ...
still i unable to see child process...

hi please any one can help on this ....

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