Page 1 of 1

how to know which processes are created by running a job?

Posted: Thu Mar 05, 2009 6:23 am
by zulfi123786
Hi,

If I run a job it will create processes which will run on the operating system, how to know the name and PID of these processes.
I am running the job using dsjob command.

Posted: Thu Mar 05, 2009 7:16 am
by bart12872
You can define the environment variable $APT_PM_SHOW_PIDS to true. In the log, you will see the PID of the process.

Posted: Thu Mar 05, 2009 8:24 am
by uegodawa
you can use ps -ef unix command to check the processes.
For example , suppose your job name is Job1. Following Unix command will display associated processes with that job.
ps -ef | grep Job1

Re: how to know which processes are created by running a job

Posted: Fri Mar 06, 2009 12:55 am
by newmoonera
ps -ef| grep "userID" is the easiest and best UNIX to know about the status of running jobs...

Re: how to know which processes are created by running a job

Posted: Fri Mar 06, 2009 7:28 am
by priyadarshikunal

Code: Select all

ps -ef| grep "userID"
This will return all the processes running for that user id.

Code: Select all

ps -ef | grep Job1 
This will return the processes for the job.

Code: Select all

 ps -ef|grep DSD 
will return the processes for all datastage jobs running on the server.

Posted: Fri Mar 06, 2009 9:09 am
by kduke
grep phantom

Posted: Fri Mar 06, 2009 10:25 am
by priyadarshikunal
kduke wrote:grep phantom ...
Well the Exact thing is
phantom DSD.RUN <Job Name> etc

so i think it doesn't matter an which part you apply filter.

Am I right Kim?

Posted: Fri Mar 06, 2009 10:39 am
by priyadarshikunal
I think DSD is a common term to be used,
phantom seems to be more precise.

I think that's what Kim wanted to say.

Posted: Fri Mar 06, 2009 12:02 pm
by kduke
Yes, that is correct. If you are trying to catch this at run time then it is very difficult. Show PIDs is good but you need to get this along with the process list to do anything useful. The phantom process will be the parent of most of these processes. I tried to pull together these processes to total all their sizes. We had an issue of running out of RAM. So we wanted to know how big each job was as far as how much RAM it used. The idea was to run just enough jobs not to swap or page.

The conductor starts section leaders which run sections of jobs these have the job name in their command line. So you need to find the processes which have the job names in their command line. Then trace back its parent to find the section leaders. One job can fire up hundreds of processes. If you trace up to a parent and then back down then you can get all the processes but you cannot trace back to process 1 which is the kernel.

Good luck. I got tired and gave up. I got real close. It is a pretty hairy shell script though.