How to find open files in udump adump
333755Jan 12 2006 — edited Jan 13 2006Hi,
Environment: HP UX , Oracle DB 9.2
We need to cleanup the trace files in udump, adump and other dump directories and we normally delete any files older than a day.
However sometimes a process has a trace file open (Many processes run jobs that last 2-3 days, it is a 6 TB database), if we delete that file the space doesn't gets released and we have no way of finding the process which was writing to that file.
I want a way in which the deletion program leaves any open files, I don't have access to root so can't use lsof .
I am thinking of getting a list of spid from v$process comparing it with the filenames in udump generate a list of files that did't match and delete them.
We run the current script every 5 minutes, on average we have 3000 users in the db and about 20,000 files in udump, I am writing this script in ksh, it seems that I will have to write two nested loops and I am concerned about the performance of the script, it might chew up lot of CPU, does anybody knows of a better way to do it.
BTW I have multiple databases running on this machine so I will have to loop through multiple udump directories.
Thanks