cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Managing Windchill temp and log files

gchampoux
1-Newbie

Managing Windchill temp and log files

Any advice on how to keep the log and temp files to a minimum?


Better yet, does anyone have a list of where all the temp & log files reside?
For Windchill itself, there is a temp and logs sub-folder.
But for the other components, it is not as clear.


Each night, we do a cold backup.
I would think this is also a good time to delete all the temp/log files, or at least move them elsewhere.


Gerry

2 REPLIES 2
BenLoosli
23-Emerald II
(To:gchampoux)

On the Windchill server:
<wc_loadpoint>\Apache\logs
<wc_loadpoint>\Tomcat\logs
<wc_loadpoint>\Windchill\logs
<wc_loadpoint>\Windchill\temp\pubtemp

On the Oracle server:
Older daily dumps of the Oracle DB


Thank you,

Ben H. Loosli
USEC, INC.

I created a script to clear caches and it is run by the shutdown
scripts:



rm -R /opt/ptc/wc/Tomcat/work/*

rm -R
/opt/ptc/wc/Windchill/tasks/codebase/com/infoengine/compiledTasks/*

rm -R /tmp/ptcServlet/*



This is Unix but easily translated to a DOS/Windows command batch file.

In all examples here, /opt/ptc/wc is the "loadpoint" or base folder for
all our Windchill components.



I also run a daily log cleanup script (log rotation). Again this is
Unix so it would need translation to functions that work in Windows
commandline. However, I'm sure you can find examples of "log rotation"
scripts with a web search.

Here are the working bits of what I use. Note that the section that
removes MS and BGMS logs is a little different because it has to handle
such a large number of files at times (thousands).



/bin/echo "#########" >> /opt/ptc/wc/remove.log

/bin/date >> /opt/ptc/wc/remove.log

/bin/echo "#########" >> /opt/ptc/wc/remove.log

####### Remove /opt/ptc/wc/WindchillDS/server/logs access log files not
modified in 1 days

find /opt/ptc/wc/WindchillDS/server/logs/access.* \( -mtime +1 \) -exec
ls -l {} >> /opt/ptc/wc/remove.log \; 2>/dev/null

find /opt/ptc/wc/WindchillDS/server/logs/access.* \( -mtime +1 \) -exec
rm -f {} \; 2>/dev/null

####### Remove /opt/ptc/wc/Windchill/logs BackgroundMethodServer,
MethodServer, and ServerManager files not modified in 1 days

find /opt/ptc/wc/Windchill/logs/ -mtime +1 -exec ls -l {} \; |egrep
'/BackgroundMethodServer|/MethodServer|/ServerManager' >>
/opt/ptc/wc/remove.log 2>/dev/null

find /opt/ptc/wc/Windchill/logs/ -mtime +1 |egrep
'/BackgroundMethodServer|/MethodServer|/ServerManager' |while read
record

do

rm -f $record

done

####### Remove /opt/ptc/wc/Windchill/tmp files not modified in 1 days

find /opt/ptc/wc/Windchill/tmp/* \( -mtime +1 \) -exec ls -l {} >>
/opt/ptc/wc/remove.log \; 2>/dev/null

find /opt/ptc/wc/Windchill/tmp/* \( -mtime +1 \) -exec rm -f {} \;
2>/dev/null

####### Remove /opt/ptc/wc/Tomcat/logs files not modified in 1 days

find /opt/ptc/wc/Tomcat/logs/catalina*.log \( -mtime +1 \) -exec ls -l
{} >> /opt/ptc/wc/remove.log \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/catalina*.log \( -mtime +1 \) -exec rm -f
{} \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/host-manager*.log \( -mtime +1 \) -exec ls
-l {} >> /opt/ptc/wc/remove.log \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/host-manager*.log \( -mtime +1 \) -exec rm
-f {} \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/localhost*.log \( -mtime +1 \) -exec ls -l
{} >> /opt/ptc/wc/remove.log \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/localhost*.log \( -mtime +1 \) -exec rm -f
{} \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/manager*.log \( -mtime +1 \) -exec ls -l {}
>> /opt/ptc/wc/remove.log \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/manager*.log \( -mtime +1 \) -exec rm -f {}
\; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/windchill-whc.log.* \( -mtime +1 \) -exec
ls -l {} >> /opt/ptc/wc/remove.log \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/windchill-whc.log.* \( -mtime +1 \) -exec
rm -f {} \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/windchill.log.* \( -mtime +1 \) -exec ls -l
{} >> /opt/ptc/wc/remove.log \; 2>/dev/null

find /opt/ptc/wc/Tomcat/logs/windchill.log.* \( -mtime +1 \) -exec rm -f
{} \; 2>/dev/null

####### Trim Tomcat/logs/catalina.out file

linecount=`wc -l /opt/ptc/wc/Tomcat/logs/catalina.out | awk '{print
$1}'`

if [ "$linecount" -ge 20000 ]; then

cp -p /opt/ptc/wc/Tomcat/logs/catalina.out
/opt/ptc/wc/Tomcat/logs/catalina.out.bkp

tail -2000 /opt/ptc/wc/Tomcat/logs/catalina.out.bkp >
/opt/ptc/wc/Tomcat/logs/catalina.out

fi

####### Trim /opt/ptc/wc/remove.log file

linecount=`wc -l /opt/ptc/wc/remove.log | awk '{print $1}'`

if [ "$linecount" -ge 4400 ]; then

tail -4000 /opt/ptc/wc/remove.log > /tmp/removelogtmp

mv /tmp/removelogtmp /opt/ptc/wc/remove.log

fi


Announcements

Top Tags