usage of "dsjob -logdetail" for multi instance job

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ssunda6
Participant
Posts: 91
Joined: Tue Sep 19, 2006 9:32 pm

usage of "dsjob -logdetail" for multi instance job

Post by ssunda6 »

Hi,

We are trying to capture logs of jobs into a table periodically.

The logic used is:
-dsjob -logsum -type STARTED <proj name> <job name>
-compare timestamps and get the required event ids.
-Pass them to "dsjob -logdetail" to get the required log.

But "logdetail" is fetching log entries of other invocation job when the job is of multi-instance type.

I have searched for a solution in posts. But couldnt find much.

Can we eliminate log of other invocations and get only the required log? ( using logdetail)

palmeal(a participant) mentioned in the follwing post:

http://dsxchange.com/viewtopic.php?t=96 ... 03193ed431

that they used .$DSN information to filter out the log from "logdetail" for multi instance jobs. I dont have idea on this. If anyone has idea, plz help.

Any other solutions would also help.

Regards,
ssunda.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Are you including the appropriate invocation id in the <job name> you use?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ssunda6
Participant
Posts: 91
Joined: Tue Sep 19, 2006 9:32 pm

Post by ssunda6 »

Chulett,

I am using the appropriate invocation id.

The problem is, lets say for job "A", there are 2 instances - "a" and "b". And both instances ran at the same time.

The logs for both instances is maintained in "A" in the directory log .
Since both the instaces ran at same time, the log entries will be mixed up with both "a" and "b" job's logs.

So, when I am using "dsjob -logdetail" and passing the 'start' and 'end' event ids, though a particular instance name is specified, it is fetching even the log entries of other instance. It is not checking if all event ids belong to the same instance. Once start and end event ids are specified to -logdetail, it is fetching all event ids between them whether they belong to the same instance or not.

Is this a bug or can we filter out the correct log entries belonging to a particular instance.

Regards,
ssunda.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't believe this is a bug and just wanted to be sure you'd tried it with the Invocation Id. Honestly, this isn't something I've tried to do up to this point but since the Director can separate the log entries when viewing them, I'm sure it's possible, just not sure how.

If I get a chance, I'll play and see what (if anything) I can come up with. In the meantime, I would think others have already cracked this particular nut...
-craig

"You can never have too many knives" -- Logan Nine Fingers
ssunda6
Participant
Posts: 91
Joined: Tue Sep 19, 2006 9:32 pm

Post by ssunda6 »

Thanks Chulett.

"dsjob -logsum" is giving correct log belonging to that particular instance . Only "dsjob -logdetail" is giving this problem.

Has anyone else faced same problem with logdetail? If yes, please provide inputs on how this can be solved.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Dont you have to provide the event id for the -logdetail option. If you dont provide anything, it will take the last event id. Are you providing the event id(s)?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ssunda6
Participant
Posts: 91
Joined: Tue Sep 19, 2006 9:32 pm

Post by ssunda6 »

DSguru2B,

I am providing both starting and ending event ids (whose log is to be fetched).
Post Reply