How to know the status of process running in background

I have run one shell script in background that contains a endless while loop.
I am not able to know the status of that job .
Please provide any command to know this. I have already used "ps -aef" , "jobs" to know it , but it didn't work. I am sure the process is running as it is generating a file as expected continiously . I want to kill that process now.......................what to do ???????????pls help.

this should enable you to find the PID and allow you to killl / stop the script.

ps -ef | grep "scriptname"

i have tried this also but didn't get the PID

does lsof help you?

try the command "jobs" that should give you the status !!!

Yes, jobs should give u the PID and the current status!!!

Thanks everyone for replying.

I am using Solaris 9 and jobs giving nothing.

Now i am having the process id for background processes but showing process name as bash , that shell in which i executed the script.

Can i know exact process name for that ??????????

hi,

you've told that an output file is getting generated (written into) continuously, in this case the fuser command wmay help you to identify the process.

fuser is used to show which processes are using a specified file.

Hi APSPRABHU,

Thanks for your suggestion but there is a little problem. You can get it from the script given below.
here is the script i am executing in background and want to kill now .

***********************************************

cd /IN/service_packages/OSA/IOR
##\rm -f flnm.latest flnm.old
##touch flnm.latest flnm.old

while :
do
/IN/service_packages/OSA/executables/inodetime.pl *IOR*3* > flnm.latest
file_to_send=`diff flnm.latest flnm.old|egrep "^(<|>)"|cut -c 18-|sort -u`

if [ -n "$file_to_send" ]
then
/IN/service_packages/OSA/executables/inodetime.pl $file_to_send >> /IN/service_packages/OSA/executables/ftp_ior_file.log
ftp -n -i 10.61.0.181 <<!
user cellebrum cellebrum
bin
mput `echo $file_to_send`
bye
!
cp flnm.latest flnm.old
fi
done

***********************************************