About Me

My Photo
Satya Ghattu's Blog
I work in a financial company where my team provides Architecture, IT, Engineering & Strategic support to Business applications. I worked for BEA Systems (now Oracle) for more than five years as a Senior Software Engineer mainly in the Operations Administration and Management aspects of WebLogic Platform. I possess vast experience in software development excelling in Middleware & Database Components and Core Java/J2EE technologies. I also lead a few open source projects and a contributor on Dev2Dev. Did I mention that I am the original author of WebLogic Scripting Tool (WLST), the official command line tool for WebLogic Platform. I also hold a few software patents, prior to BEA Systems I worked in variety of software industries in various different roles as a Senior Java developer, Software Analyst and as an Oracle DBA. I have a Masters Degree in Engineering from The University Of Akron, Ohio.
View my complete profile

Wednesday, April 09, 2008

Rotating your Standard Out/Err log files

If you are a WebLogic Developer or an Administrator there is 90 - 100% chance you have had situations where the WebLogic Server log files are filling up the disk space.

Continue reading here


Anonymous said...

If you use the second method "logrotate" do null characters get added to the beginning of the cleared logfile once the existing process starts writing there again? How does copytruncate avoid this? I know that just cat'ing /dev/null into the stdout log will cause this to happen (fill w/ nulls).

Anonymous said...

I cannot get it to work, my script looks like this

/export/home/aratnam/logs/*.out {
rotate 1
olddir /export/home/aratnam/old-logs
time=`date +%s`
echo $time
mkdir -p /export/home/aratnam/old-logs/$time
mv /export/home/aratnam/logs/*.out.1.gz /export/home/aratnam/old-logs/$time

I get the following error
error: /etc/logrotate.conf:7 bad olddir path /export/home/aratnam/old-logs
error: found error in /export/home/aratnam/logs/*.out , skipping
error: /etc/logrotate.conf:7 } expected

Raghu said...

Hi After using the logrotate, the file becomes 0 bytes and after sometime it is being restored to the original size. Also I see the disk space not beinf released.

Any ideas on this?

puru said...

I am facing the same problems as raghu. Does any body has a workaround for this?

My conf file looks like

rotate 7

Locations of visitors to this page