How to capture warnings from Log
Moderators: chulett, rschirm, roy
How to capture warnings from Log
HiAll,
Iam new to PX.
I have a requirement that I have to write all the warning messages into sequential file of given path.
This I did in server through Before/After routines.
Now I have the same requirement in PX,is there any way to capture warnings from log file write it into a sequential file.
Or else shall i use same basic routine in PX also,I think It reduces the performence.
And in documentation i found that the server container can be run on SMP systems only,Is tyhere any restriction like this for routines.
Any thougths.
Thanks in advance.
Dslearner
Iam new to PX.
I have a requirement that I have to write all the warning messages into sequential file of given path.
This I did in server through Before/After routines.
Now I have the same requirement in PX,is there any way to capture warnings from log file write it into a sequential file.
Or else shall i use same basic routine in PX also,I think It reduces the performence.
And in documentation i found that the server container can be run on SMP systems only,Is tyhere any restriction like this for routines.
Any thougths.
Thanks in advance.
Dslearner
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Parallel jobs can use the same before/after routines as server jobs with the same performance on those routines.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 57
- Joined: Wed Jan 26, 2005 10:22 pm
- Location: India
You can call below script in your after job subroutine for capturing Warnings from Director Log in a text file
Code: Select all
. $DSHOME/dsenv
PROJDIR=<YOUR PROJECT DIRECTORY>
cd $PROJDIR
JOBNO=`$DSBIN/uv "select * from DS_JOBS where NAME='<JOB NAME>';" |grep No.......... | awk '{print $2}'`
$DSHOME/bin/uv "select TIMESTAMP, SEVERITY, FULL.TEXT from RT_LOG$JOBNO where SEVERITY = 'Warning' AND EVAL \"@ID\" NOT LIKE '//%' AND @ID >= CAST(EVAL \"FIELD(TRANS('RT_LOG$JOBNO','//JOB.STARTED.NO',1,'X'), @SVM, 1)\" AS DECIMAL) order by @ID;" > <YOUR LOG FILE>
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Participant
- Posts: 57
- Joined: Wed Jan 26, 2005 10:22 pm
- Location: India
In a job sequence; you can call the above script using "ExecCommand" stage and use a "Email Notification" stage for email. (You can attach the text file produced from the script as attachment to the email)vinaymanchinila wrote:Hi,
I have the same req in server jobs, I need to capture warnings if any and send it to an email rather than a test file.
How do I do that.
Thanks,
Ashwin
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
Hi Ashwin,
Thanks for your time, when I open the "Execute_Command" stage , int he second tab, I have "COmand:" which when I select is opening like a windows explorer, where should I stick this script in?
Also when I mention the PROJDIR=<YOUR PROJECT DIRECTORY>
should I use the / or \.
Thanks a bunch
Thanks for your time, when I open the "Execute_Command" stage , int he second tab, I have "COmand:" which when I select is opening like a windows explorer, where should I stick this script in?
Also when I mention the PROJDIR=<YOUR PROJECT DIRECTORY>
should I use the / or \.
Thanks a bunch
-
- Participant
- Posts: 57
- Joined: Wed Jan 26, 2005 10:22 pm
- Location: India
In Unix it is /vinaymanchinila wrote:Hi Ashwin,
Thanks for your time, when I open the "Execute_Command" stage , int he second tab, I have "COmand:" which when I select is opening like a windows explorer, where should I stick this script in?
Also when I mention the PROJDIR=<YOUR PROJECT DIRECTORY>
should I use the / or \.
Thanks a bunch
The stuff you need to fill in/pass as parameters are:
<YOUR PROJECT DIRECTORY>
<JOB NAME>
<YOUR LOG FILE>
Ashwin