How to find a huge job log

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
mchaves
Participant
Posts: 50
Joined: Mon Aug 08, 2005 9:59 pm
Location: Sydney
Contact:

How to find a huge job log

Post by mchaves »

Hi,

I need to find a huge log generated by job within 1000 jobs in order to delete it. How can I do that quickly?

Thanks
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

Post by singhald »

hi
Go to the Datastage director and click view it will dropdown menu click show all it will show the entire log generated by job ,


so u can easily delete the log

deepak singhal
mchaves
Participant
Posts: 50
Joined: Mon Aug 08, 2005 9:59 pm
Location: Sydney
Contact:

Post by mchaves »

Hi Deepak,

The problem is that we don't which jobs have generated such huge logs. I would to have a script the pulls the jobs and how much log data each job has.


Thanks,
Melquior
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Every job log is a separate table. You can't easily do it with SQL. Create yourself a Routine to do it. Loop through all the job names and find the corresponding job number from DS_JOBS, then count the records in RT_LOGnnn where nnn is the job number. Generate your report as you go.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

If you are in Windows then good luck but UNIX:

Code: Select all

#!/bin/ksh
# 500mb
find . -size +500000000c -exec ls -l {} \;
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In other words, to do this from the operating system you need to examine all of the RT_LOGnnn directories in the Project directory where this happened, looking for the 'Big Ones'. A query against DS_JOBS will translate the job number into a job name.
-craig

"You can never have too many knives" -- Logan Nine Fingers
manojmathai
Participant
Posts: 23
Joined: Mon Jul 04, 2005 6:25 am

Post by manojmathai »

Hi

Find the log file that has the maximum size in the projects directory.
It will start with name as RT_LOG(I think)
Open the file to see the first line in the file.
The jobname will be in there in that line.

Thanks and Regards
Manoj
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

I wonder how the post from chullet appeared before manojmathai even though it was posted much after that !!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Two different days, Sai.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Same day where I am, but Craig's is about eight hours ahead of Manoj's.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Actually, Dennis lets me take cuts. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

:lol: Thanks.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

When I did the training for version 1.0 (which was VERY slow), the instructor set us a task for a prize; the winner had to create the job that finished in the least possible time, as measured in Director.

My job finished in half the time of everyone else's. 7 minutes against their 15 and more.

I got disqualified when they found I'd changed the system clock on the server after the job had started. :cry:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Ray

I lost some respect for you. :wink:
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah... Ray's own Kobayashi Maru. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply