How to clear log file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

How to clear log file

Post by elavenil »

Hi,

I have a job, which has more than 100000 log entries and when i clicked on 'View log' from director but it takes time very long to list all entries of the job. So i am thinking of clearing the log from UNIX. I remember there is 'CleanupJob' command to clear the log but i have no idea how to run this command from UNIX.

Can anyone help me to clear a job log from UNIX?

Thanks for your help.

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

Post by ray.wurlod »

Why are you trying to do it from UNIX? Don't you have access to a DataStage client?

The "approved" method to purge a log is using the Director menu: Job > Clear Log, then choose immediate purge.

There's no UNIX command for doing it properly (that is, preserving the control entries).

You can, from the UNIX prompt, clear all entries including the control (management) entries but, to do so, you need to know the job number so that you can correctly identify the log, which is actually a table in the DataStage Repository database. You need to get into the DataStage Engine environment and execute an appropriate interactive command.

Please use the Director; it's better and safer.
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 »

The 'trick' is to not View the log first, but to clear it from the Status view. It will still take a little time for the dialog to come up, but it is only counting them (looking for the most recent record) rather than trying to suck all of them up to your client.

You are taking advantage of the Auto Purge function available for the logs, right?
-craig

"You can never have too many knives" -- Logan Nine Fingers
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Hi,

As Craig mentioned in his email, my concern is the time that it takes to show the pop up window before clearing the log.

As suggested, managed to clear the log using Administrator client.

Thanks for your suggesstions.

Regards
Saravanan
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Clearing Datastage Director Log

Post by mandyli »

[code]As ray said The "approved" method to purge a log is using the Director menu: Job > Clear Log, then choose immediate purge or you can go to data stage administrator and set the purge log but better use the Director for clearing log..[/code]
mleroux
Participant
Posts: 81
Joined: Wed Jul 14, 2004 3:18 am
Location: Johannesburg, South Africa
Contact:

Post by mleroux »

An auto-purge comes in really handy to prevent such super-long logs. Craig's already mentioned it, but anyway...

In Director's Status View, with the job in question selected:

Job --> Clear Log... --> Auto-purge --> Enabled for this job

Set it up and voila! :D
Morney le Roux

There are only 10 kinds of people: Those who understand binary and those who don't.
Post Reply