Hi:
We are calling the server routine in Parallel Job as AfterJob Routine.
I want to capture the CPU usage of the datastage job in statistics table.
We wrote a routine
StageCPUsec = DSGetStageInfo(DSJ.ME,StageName, DSJ.STAGECPU)
Stagename is passed through looping logic.
But the output i get is 0.0
Any help on what's wrong with this.
Regards,
Nandha
DSJ.STAGECPU
Moderators: chulett, rschirm, roy
Sure, the DSGet* functions will return values for PX jobs; in fact you need to be careful and parse the results correctly. In this case, teh DSJ.STAGECPU will return a comma-separated list of CPU times per processing node. But values are only returned for active stages, not for passive ones!
Also, be aware that the DSJ.STAGECPU at 7.x (I haven't checked other versions) will not return CPU seconds used as per the documentation, but will return %age CPU used as an integer. To get the CPU used you will need to get the stage's START and END time or use the Stage's ELAPSED time (I prefer to do the calculation myself) and then compute the percentage from that number of seconds.
Also, be aware that the DSJ.STAGECPU at 7.x (I haven't checked other versions) will not return CPU seconds used as per the documentation, but will return %age CPU used as an integer. To get the CPU used you will need to get the stage's START and END time or use the Stage's ELAPSED time (I prefer to do the calculation myself) and then compute the percentage from that number of seconds.
Thank you for the suggestions . I see this message in logfile "(total CPU: 0.03)" for the stages.
Can we take this as a CPU time in seconds. May be we will check for "total CPU:" and get the values.
SEQL_Err_Bin_Master,0: Operator completed. status: APT_StatusOk elapsed: 1.40 user: 0.02 sys: 0.01 (total CPU: 0.03)
Regards,
Nandha
Can we take this as a CPU time in seconds. May be we will check for "total CPU:" and get the values.
SEQL_Err_Bin_Master,0: Operator completed. status: APT_StatusOk elapsed: 1.40 user: 0.02 sys: 0.01 (total CPU: 0.03)
Regards,
Nandha
I just got confirmation from IBM/Ascential for the ecase 461128*UK regarding the DSJ.STAGECPU code in DSGetStageInfo() returning a %age CPU value instead of the actual number of CPU seconds used.
They are going to "fix" the product documentation. Even though it sounds like they are avoiding fixing a problem in the code, it means that any code written to date will not have to be changed (even though it might not work the way the programmers originally expected).
They are going to "fix" the product documentation. Even though it sounds like they are avoiding fixing a problem in the code, it means that any code written to date will not have to be changed (even though it might not work the way the programmers originally expected).