Get Executing Machine Name

Get Executing Machine Name

Does anyone have any suggestions on the best way to get the machine name that a job is executing on?
Thanks,
Neil
Employee

Re: Get Executing Machine Name

Hi Neil,
You can simply use a tSystem component. This component allows you to execute any system command. Just print the computer name with an echo, and use the parameters of the tSystem to catch what this command returns and output it into a column in the component.
Employee

Re: Get Executing Machine Name

In java you can use --> System.getenv("COMPUTERNAME")
Seven Stars

Re: Get Executing Machine Name

java.net.InetAddress.getLocalhost().getHostName() or java.net.InetAddress.getLocalhost().getCononicalHostName() will also get you the host name for the machine running the job.

Re: Get Executing Machine Name

Thanks all. Working now.
Neil