How do I access the global processID ?

One Star

How do I access the global processID ?

I'd like to access the talend processID inside my job so i can tie it back to the stats generated.
How can i access this?
Highlighted
Seven Stars

Re: How do I access the global processID ?

Is pid the variable you want (see this topic)?
Seventeen Stars

Re: How do I access the global processID ?

hi,
i've found this code :
byte[] bo = new byte;
String[] cmd = {"bash", "-c", "echo $PPID"};
Process p = Runtime.getRuntime().exec(cmd);
p.getInputStream().read(bo);
System.out.println(new String(bo));

from Igor Minar's Blog
that seems to work in a tjava component .
Console out
Démarrage du job pid a 09:52 17/05/2010.
connecting to socket on port 3359
connected
6461

In tLog.. componenet you also have pid, root pid, father pid in the ouput flow.
hope it help
regard
laurent

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog