How do I access the global processID ?

Highlighted
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?
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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog