gcharles
17th July 2002, 13:01
Hi everybody,
Just a simple question, what kind of files do you clean up in directory $BSE_TMP and what periodicity ?
Thanks
Djie-En
17th July 2002, 13:43
Hi,
All tmp.......-files, qp......-files and bshell.pid-files. (With a date of today minus 3 days).
(The batchjobs are running with another BSE_TMP env.)
GN
gcharles
17th July 2002, 15:31
Thanks for your answer.
What are the qp... files about ? They can be very large.
Djie-En
17th July 2002, 15:55
Hi,
I don't know, but when there has been started some sessions, you will see that one or more qp....files are created. So i think they are being used by the sessionprogram.
It is normal that they disappear when the session has done its work, but it will happen that its hanging on the client, they kill their processes and so the qp....-file remains in the $BSE/tmp.
If you want to be sure if you are allowed to clear it, take a look if the owner of the file still logged on to the server and if the date/time of the file is later than the users login date/time.
(Or give him a tel.call)
GN
Han Brinkman
17th July 2002, 16:05
qp files are generated by the db driver in case of long queries and/or sort operations which can not be done by using indexes.
Furthermore I guess they are generated if you use the as prepared set statement.
Regards,
Han
OmeLuuk
17th July 2002, 16:40
These qp files (from query processing ??) are files that come from queries with "as prepared set" clause and indeed, may become huge indeed. But after the session is done, can be removed.
(useless to say: never delete them when the session still runs)
Francesco
17th July 2002, 17:51
Here is an example of a script that will clean up the temp directory.
Hoover (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=5861)
Varieties of this are in every Baan Administrator's toolkit, although a lot will probably just use a one-liner like
find $BSE_TMP -mtime +1 -type f -exec rm {} \;
I do have a question myself about the contents of the tmp directory, now that you bring it up.
I sometimes find empty directories with the name of a VRC in tmp. What are they used for, what was in them, and why aren't they removed?
Djie-En
17th July 2002, 18:11
Hi Francesco,
Indeed as you say ...
I see a VRC mentioned too and there were two files in it.
Taking a look into the files, there were several domains explained from our 'tg'-package, module: 'brg' (DEM package), but were from last year, so i've removed them now.
I think a session in 'tg' will create this files with the VRC too as directory.
Thanks,
GN
OmeLuuk
18th July 2002, 11:40
These tmp directories are remainders if software updates that might have been aborted?
That is why I like using rm -R {} better.
But be aware cleaning up the rough way (all older than 2 days) may delete too much, like the rc.start.done and pd_lock file.
Better is to filter also:
find ${BSE}/tmp -name "qp*" -mtime +7 -print -exec rm {} \;
find ${BSE}/tmp -name "tmp*" -mtime +7 -print -exec rm -R {} \;
find ${BSE}/tmp -name "prtmp*" -mtime +7 -print -exec rm {} \;
find ${BSE}/tmp -name "srt*" -mtime +7 -print -exec rm {} \;
find ${BSE}/tmp -name "bshell*" -mtime +7 -print -exec rm {} \;
I saw the Hoover script, but did not check if some files were excluded...
Francesco
18th July 2002, 17:51
I would have to look at the script myself to see what it excludes.
rc.start.done is probably not included, or rather excluded, because in my case it is owned by the job daemon, running as user job100, and is created with explicit write permissions, so the script, running as bsp, is not allowed to remove it.
It removes bshell.pids after 7 days, because some people NEVER log off (grrrr) ;)
I thought about testing for bshells owned by the job daemon and excluding them, but I am not sure if that's even an issue. (it's one of those scripts that just seems to do it's job, so I never bothered with it since it's installation).
I chose to delete tmp files after two days, because of the volume that my customers create. Besides, I don't believe that anybody ever actually uses the reprint function.
NPRao
18th July 2002, 19:56
checking back on our system, I found few wierd files in $BSE/tmp directory -
>cat ad_20170
r_label.value(1,1) = r_label.adjust(r_label.value(1,1), 1, ttadv.adju.ce
ntre, ttyeno.no, 60, r_label.xpos(1), r_label.leng(1))
r_label.value(1,2) = r_label.adjust(r_label.value(1,2), 2, ttadv.adju.le
ft, ttyeno.no, 7, r_label.xpos(2), r_label.leng(2))
r_label.value(1,3) = r_label.adjust(r_label.value(1,3), 3, ttadv.adju.le
ft, ttyeno.no, 4, r_label.xpos(3), r_label.leng(3))
Any idea what they are ?
I guess you can also use the option of -size for the find command to remove the zero sized files...
-size n[c] True if the file is n blocks long (512 bytes per block). If n is followed by a c, the
size is in bytes.
Djie-En
19th July 2002, 10:19
Hi NPRao,
It is better to do not remove the zero files, unless you also take a look for the date, because when a process is started and it takes time before ending, a zero bytes tmp file exists, untill the process is ready.
The ad_1270 file you mentioned, i've never seen such files with such a contents.
I've often seen files, which started with srt......
Those files were used by sorting the data of a session. Because the session was crashed for some reason, the files weren't removed from the system. So if you see such files and the date is from yesterday or before, you also may remove them.
GN