How to get job name which log not cleared
Moderators: chulett, rschirm, roy
How to get job name which log not cleared
Can any body help me that how to get job name from universe which log not cleared before 3 days from sysdate .
Arun Verma
Hi,
Can you explain why you might need this info for?
this might be better for other's opinion on the best way to acomplish what you need.
IHTH,
Can you explain why you might need this info for?
this might be better for other's opinion on the best way to acomplish what you need.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
You are probably better off making sure that all of your jobs have their Auto-Purge settings correct so that this happens automatically. There is a post here with discussion of the issue plus code for a routine that will update the settings for you.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Arun is at a site that has the 5.2 bug where auto-purge isn't propagated into newly-created jobs.
Probably the easiest way is to create a routine or script that retrieves the oldest message in the log file and obtains the timestamp from that entry.
Probably the easiest way is to create a routine or script that retrieves the oldest message in the log file and obtains the timestamp from that entry.
Code: Select all
FUNCTION OldestEntryTimeStamp(JobNo)
Ans = @NULL
LogFileName = "RT_LOG" : JobNo
Open LogFileName to hLogFile
Then
Command = "SELECT TIMESTAMP TO SLIST 9 FROM " : LogFileName
Command := " WHERE CAST (@ID AS VARCHAR) NOT LIKE '//%' ORDER BY 1;"
Perform Command
ReadNext Ans FROM 9
ClearSelect 9
Close hFile
End
RETURN(Ans)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi Chulett/Roy
Actualy we hacve faced problem in DS server few days back , one person run DS job with NO limit option and around 100000 log entry created and as result serevr hang , so I want to monitor DS job , Log must be 3 days only .
We have successfully migrated DS from 5.2 to 7.1 and at project level we have also seted auto purge but it is not working . so should we take export backup of whole project , clean project and set auto purge then import complete job , will it be work ?
Thanks Ray ,
In routine which given by you , we have to pass job Name ? , if so then we have to run this routine for all jobs , if it is possible from universe command ?
Regards
Arun Verma
Actualy we hacve faced problem in DS server few days back , one person run DS job with NO limit option and around 100000 log entry created and as result serevr hang , so I want to monitor DS job , Log must be 3 days only .
We have successfully migrated DS from 5.2 to 7.1 and at project level we have also seted auto purge but it is not working . so should we take export backup of whole project , clean project and set auto purge then import complete job , will it be work ?
Thanks Ray ,
In routine which given by you , we have to pass job Name ? , if so then we have to run this routine for all jobs , if it is possible from universe command ?
Regards
Arun Verma
Arun Verma
That's not going to help when someone runs jobs with no warning limit that create huge logs like that. Better to crack down on the people doing this and make sure they don't do it again.arunverma wrote:Actualy we hacve faced problem in DS server few days back , one person run DS job with NO limit option and around 100000 log entry created and as result serevr hang , so I want to monitor DS job , Log must be 3 days only .
That setting only applies to new jobs, created after the setting was made. Are you saying that this is not happening, even after upgrading? Or is it just the old jobs that have the problem? The first would be a bug, the second would be normal.arunverma also wrote: We have successfully migrated DS from 5.2 to 7.1 and at project level we have also seted auto purge but it is not working . so should we take export backup of whole project , clean project and set auto purge then import complete job , will it be work ?
If it is the old ones, the routine in the post I linked to will allow you to fix the problem without going to the trouble of the export/import.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There is another routine in my most recent report for your site which can load the purge settings for existing jobs that don't have them. If no-one else has this routine you can obtain a copy from Rajiv Gupta.
Someone at your site could easily adapt these routines to scan through your job logs to find those with lakhs of entries. But do you really want to get rid of these before the reason for the warnings has been diagnosed and corrected?
Someone at your site could easily adapt these routines to scan through your job logs to find those with lakhs of entries. But do you really want to get rid of these before the reason for the warnings has been diagnosed and corrected?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.