|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
mbenton
Joined: 08 Feb 2010 Posts: 38 Country: United Kingdom |
|
@V"env:PPID" on Multi-Platform (Linux) |
|
Hi,
24x7 Scheduler Multi-Platform ver 4.3.293 on red Hat Linux 5.
I am trying to direct the output from a shell script to a file, whose name is derived by using Macro Variables...
Job details are;
Type: Program
Command: /bin/sh -c "/scheduler/scripts/script1.ksh >> /scheduler/logs/@T"yyyymmdd"/@V"job_name"_@V"env:PPID".log"
The values for @T"yyyymmdd" and @V"job_name" work correctly, however @V"env:PPID" produces "PPID" and not the value of the Linux environment variable $PPID.
Q: How would I reference the value of the Process ID of teh running job/script ?
|
|
Wed May 26, 2010 12:43 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7849
|
|
|
|
That indicates that PPID environment variable cannot be found.
You cannot reference Process id this way. The macro parameters in the command line and other job properties are substituted before the process is started. Basically the process id is not available yet. If you are looking for a unique number, try referencing system clock time via @T macro and include the time portion.
|
|
Thu May 27, 2010 9:22 am |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|