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

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

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

Post 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.
bart12872
Participant
Posts: 82
Joined: Fri Jan 19, 2007 5:38 pm

Post 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.
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

Post 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
Thanks,
Upul
newmoonera
Participant
Posts: 2
Joined: Fri Mar 06, 2009 12:22 am
Location: India

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

Post by newmoonera »

ps -ef| grep "userID" is the easiest and best UNIX to know about the status of running jobs...
newmoonera
(Enjoy the Beauty of Life)
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

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

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

grep phantom
Mamu Kim
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
Post Reply