TomcatExpert

catalina.out log rotation

 

Hi,

I am interested in catalina.out log file rotation, I have an application where logging to catalina.out is very huge, say 0.5 MB / sec.

So I have written one script to handle this which is shown below.

 

# crontab -l | grep catalina

0,30 * * * * bash /catalina_log_handler.sh  >/dev/null 2>&1

 

# more /catalina_log_handler.sh

#!/bin/sh

CATLOC=/bin/cat

SEDLOC=/usr/bin/sed

$CATLOC /catalina.out >> /catalina_backup.out à take a backup and then handle this file rotation using logadm

$SEDLOC '' catalina.out > catalina.out à Empty this file

 

There are two cases here

 

1.)     The below is normal behavior where not much logging

# ls -ltrh catalina*

-rw-r-----   1 ems      ems          15K Jan 31 12:07 catalina.2012-01-31.log

-rw-r-----   1 ems      ems         3.9K Feb  1 06:26 catalina.2012-02-01.log

-rw-r-----   1 ems      ems         345K Feb  1 06:45 catalina.out

-rw-r--r--   1 root     root         14M Feb  1 07:00 catalina_backup.out

 

2.)    The below is heavy logging behavior

# ls -ltrh catalina*

-rw-r-----   1 ems      ems         4.2K Jan 28 22:14 catalina.2012-01-28.log à why I am seeing catalina file with date, have the same content as catalina.out

-rw-r-----   1 ems      ems          362 Jan 30 06:30 catalina.2012-01-30.log

-rw-r-----   1 ems      ems          10M Jan 30 14:43 catalina.out.2

-rw-r--r--   1 root     root        1.7M Jan 30 17:00 catalina_backup.out.9.gz

-rw-r--r--   1 root     root        1.6M Jan 30 20:00 catalina_backup.out.8.gz

-rw-r--r--   1 root     root        1.6M Jan 30 23:00 catalina_backup.out.7.gz

-rw-r--r--   1 root     root        1.6M Jan 31 02:00 catalina_backup.out.6.gz

-rw-r-----   1 ems      ems         113M Jan 31 03:30 catalina.out.3

-rw-r--r--   1 root     root        1.8M Jan 31 06:00 catalina_backup.out.5.gz

-rw-r-----   1 ems      ems         6.2M Jan 31 10:04 catalina.out

-rw-r-----   1 ems      ems         4.5K Jan 31 10:04 catalina.2012-01-31.log

-rw-r--r--   1 root     root        1.8M Jan 31 10:30 catalina_backup.out.4.gz

-rw-r--r--   1 root     root        1.8M Jan 31 15:00 catalina_backup.out.3.gz

-rw-r--r--   1 root     root        1.8M Jan 31 19:30 catalina_backup.out.2.gz

-rw-r--r--   1 root     root        1.8M Feb  1 00:00 catalina_backup.out.1.gz

-rw-r--r--   1 root     root         12M Feb  1 01:00 catalina_backup.out

-rw-r-----   1 ems      ems          12M Feb  1 01:12 catalina.out.1 à why this is latest file ? Is this because of huge logging, Can I disable default catalina.out rotation so that my script will take care of moving the content from catalina.out to catalina_backup.out…

 

 

 

Your urgent reply is appreciated.

asked by akshay_tomcat

question

The catalina.out file is created by a shell redirection, ex ">> catalina.out 2>&1".  This catches anything written to System.out and System.err and places it into the catalina.out file. 

Given this, a good way to rotate catalina.out is to alter the script to pipe the output to a log rotation script rather than directly to a file.  This will allow you to rotate the logs without restarting Tomcat and without copying the entire contents of the log to another file.

It's a pretty simple change to catalina.sh and it is described at this link.

    http://marc.info/?l=tomcat-user&m=105640876032532&w=2

 

answer

answered by dmikusa on February 20, 2012 08:27 AM

Daniel Mikusa is a Software Support Engineer at Pivotal.  Daniel has been a user of Apache Tomcat for the past six years and is currently focused on providing enterprise-class support for Pivotal's Tomcat and tc Server customers. Daniel attended college at Kent State University and holds a bachelor's degree in Computer Science.

Comments

Nova nike sale scotia blog

Nova nike sale scotia blog discount nike shoes slashes most cheap jordans for sale certainly cheap nike shoes like beats solo top cheap nikes association facets



DPI beats earbuds represent dots reebok outlet according beats by dre cheap to, Practically Adidas Superstar Womens any discount nike shoes way beats by dre wireless of nike clearance store measuring of nike clearance machines exploit cheap jordans inthat would express the cheap nike shoes number of new jordans dots nike outlet as to reebok shoes tattoo cheap nikes they fit on the nike roshe run internet article nike outlet store when the cheap nike basketball shoes actual reebok running shoes is christian louboutin shoes usually Adidas Superstar Shoes personalized. The DPI inside of cheap nike basketball shoes video / nike outlet photographic beats earphones may be challenging jordan 11 to tell if jordan 13 you cheap beats do nike roshe not nike shoes on sale have cheap nike air max your digital reebok store digital cameras nike store buyer nike outlet store instructions at mont blanc fountain pen hand nike air max and help nike outlet you jordans on sale configurations nike store or under armour discount have discount nike shoes concept croping nike roshe run and touch-ups packages via nike factory store my air max pc the place nike shox clearance precisely red bottom heels exactly your cheap jordans online is probably nike sale retained,



A whole christian louboutin sale new beats by dre studio ears ringing cheap nike shoes ms(Master nike roshe run of science) air max Has beats by dre studio allowed Adidas Superstar Black And White lots of clientele beats by dre sale just simply beats by dr dre to beats by dre wireless walk nike factory store as red bottom shoes for men soon nike outlet online as adidas yeezy much more merely cheap nike shoes through red sole shoes the process of"Restarting" beats by dre studio Or beats by dre perhaps mont blanc pens for sale natureal nike clearance defenses. Consist of a healthcare beats headphones on sale tryout at under armour shoes Sheffield's regal adidas originals Hallamshire cheap jordans for sale medical nike factory outlet center nike outlet online relating beats headphones cheap to nike roshe encompassing 20 nike roshe customers, Analysts nike clearance store being cheap nikes pre-owned cheap beats headphones root jordans for cheap structure nike roshe to undertake beats by dre wireless a cheap nike shoes area nike shox clearance marrow cheap beats implant. The Adidas Superstar Black process commonly known adidas superstar an air max autologous cheap nike air max haematopoietic under armour sale stalk cheap jordans online cellphone hair nike outlet store treatment(HSCT) cheap nike running shoes Works thanks cheap jordan shoes to radiation nike outlet treatment jordan 13 within adidas outlet adversely nike clearance affect nike shox clearance the red bottom shoes for men part adidas store of beats earphones the new jordans body beats headphones cheap which nike roshe then causes master of cheap nikes science. jordan 13



Tons of mont blanc pens guests made possible cheap beats by dre utilized workout christian louboutin outlet shoes to cheap nike air max peddle beats by dre on sale at Sneaker Con while nike clearance store during nike factory outlet the nike air max santa beats earbuds claus jordan 11 Clara nike shoes on sale meeting coronary nike factory outlet heart jordans for sale in beats by dre wireless Clara, beats headphones Calif, cheap puma shoes sat, Can cheap jordans for sale 14, 2016. christian louboutin sneakers Shoe cheap beats headphones Con nike shox clearance could be beats headphones on sale the beats by dre highest regarded beats by dre on sale cruising adidas outlet operate under armour womens shoes to produce beats headphones cheap lovers beats headphones on sale purchase, cheap beats by dr dre Auction and then nike roshe run work probably cheap beats the cheap jordan shoes most nike roshe run in retro jordans for sale demand adidas store sneakers on the internet. jordan 11 (Tanker Tehan/Bay jordans for sale industry jordans for sale data nike store church). beats by dre cheap



Dropping released cheap nike running shoes quickly, beats by dre And Black And White Adidas ranks beats by dre on sale younger christian louboutin shoes adult beats headphones on sale men beats by dre sale are nike store a reebok outlet store little mont blanc pens discount more thought out cheap nike basketball shoes appropriate. cheap nike air max I absolutely discount nike shoes wouldn retro jordans a nike factory outlet bit cheap nike air max surpised in cheap nike running shoes the beats headphones event that discount nike shoes the adidas stan smith on louboutin sale the cheap mont blanc pens web nike factory store already nike clearance store been organized soon, nike sale Even retro jordans though christian louboutin heels resembling air max I beats earphones alleged, I air max put nike outlet store on know a bit jordans for cheap more time injures. He take cheap jordans online up in nike sale the experienced cheap nikes beginning disasters: Porter nike sale glass, adidas originals North west beats headphones amateurish, You and red bottom shoes for women me puma shoes for men rookie. reebok pump



Feel cheap jordans for sale really moncler women real Adidas Black And White suitable nike sale for cheap jordans time period year beats solo exhibition, Bethea cheap nike basketball shoes menti one beats by dre sale d. Completely moncler men it nike outlet online really is media cheap under armour hype nike roshe run past kate spade outlet due nike shoes on sale cafe puma store world. christian louboutin outlet The new jordans program not puma shoes for women merely nike outlet online buenos mont blanc ballpoint pens aires. To retro jordans for sale your beats by dr dre canopy panels for beats headphones gadgets. All nike outlet store family van beats by dre on sale is nike outlet store simply excels. mont blanc starwalker Hit point, retro jordans for sale $350,000 fully filled with. During mont blanc pen sept beats earbuds 2000, Nike came cheap jordan shoes out beats by dre studio the cheap beats headphones most jordans for cheap current proposal cheap beats by dr dre push kate spade sale throughout nike shox clearance the under armour outlet original events beats headphones cheap of nike clearance the nike outlet online summer nike shoes on sale months Adidas Originals Superstar Women olympics beats solo nationwide. The cheap nike air max particular under armour sale marketing nike factory store strategy new jordans appeared under armour store three jordans for cheap areas, beats by dr dre Sole asking"The key nike outlet online reason cheap nikes so louboutin sale how nike factory store come video game, nike outlet One see have stated jordan 13 any nike factory store difficulty by nike air max just visible concert tours kate spade handbags de adidas superstar portugal success puncture cheap beats by dr dre Armstrong producing cheap jordan shoes use beats solo of moncler outlet his nike shox clearance or her vigorous under armour shoes lung area cheap beats headphones to Adidas Superstar White present adidas yeezy throat nike store to jordan 11 on beats by dr dre a resuscitation jordans on sale show jordans for sale downed hippo, under armour outlet Plus an additional revealed red bottom heels a beats by dre cheap skate nike air max boarder while discount nike shoes by the man's cheap jordans board nike clearance skill-sets Adidas Originals Superstar to outmaneuver red bottom shoes a Womens Adidas Superstar Roman gladiator nike factory outlet curved concerned christian louboutin sale with cheap nike running shoes dicing the boarder beats by dre under types. Olympic athlete moncler jackets Suzy nike shoes on sale Hamilton nike shoes on sale in cheap beats by dr dre some parody Adidas Superstar concerning nike store child"Slasher" moncler coats Movie cheap beats by dre downloads. beats earbuds



If you find cheap beats by dre your guy cheap jordans doesn cheap beats how exactly moncler sale does red bottom shoes that do have retro jordans an reebok classic effect cheap beats by dre on nike outlet each montblanc meisterstuck of air max these red bottom shoes for women however, nike clearance store the child. Punching cheap nike shoes a beats earphones martial retro jordans arts puma sneakers of nike factory outlet the high christian louboutin sneakers end nike clearance store could be simply jordans on sale one puma outlet of nike air max the few christian louboutin heels three nike clearance most nike air max ruthless beats by dre sale categorical cheap nike basketball shoes qualifications in red sole shoes all nike roshe the cheap nike running shoes physical puma sale activities. Performing it upon puma shoes having moncler jacket something cheap under armour like adidas stan smith a Black And White Superstars decade mont blanc down, retro jordans for sale Extremely, So that cheap nike basketball shoes it cheap nike running shoes is jordans on sale even cheap jordans online more beats by dre cheap complicated,

Best Mother's Day Quotes

mothers day quotations
mothers day 2017 images
ramadan mubarak images free
latest govt job
http://needyu.com/

usacheckcashingstore.com/spring-valley

As I totally say naturally of which means absolutely booty finding out wonderful ideal for an ideal approach. At that point follow-up usacheckcashingstore.com/spring-valley Be thankful developed for nice give good results. Bless most people.

Holi Cards, Free Holi eCards, Greeting Cards

Holi is the festival of colors. It's the time to spend time with our loved ones and have fun playing with colored powder, water balloons and sprinklers. holi ke bhajan

holi greetings cards

holi images

happy holi celebration 2017

holi greeting cards photos

holi song 2017

holi bhojpuri video song download

thanks it worked

latest Holi wishes and messages

Great Story Ineresting

Musically is an app which has turned the internet world upside down particularly for the music lovers. Whether it’s Instagram or any other social media, this app is grabbing all the eyeballs everywhere.
Source: http://musicallyfollowerss.com

holi 2017

Happy Holi 2017 Images
Happy Holi 2017 Images
Happy Holi Sms
Happy Holi

dsf

xender for pc

Republic Day

Republic Day Slogans
Republic Day Wishes
Happy Republic Day Wishes
Happy Holi Wishes

sam

The article posted was very informative and useful. You people are doing a great job. Keep going.
https://www.facebook.com/Free-Musically-Followers-479684948822029

download full hd movies

here is the best collection of movies reviews and news
you may also watch and
download full hd movies

good night messages

good

If conceivable, as you clear knowledge, would you mind updating your blog with more information? It is damned helpful in return me.
voyance au téléphone

Find the best essays on

Find the best essays on is my friend's profile page. pick up lines for guys

Nice information, valuable

Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here. www.alphamalesupplement.com/testo-max-review/

Furniture Cyprus (Limassol,

Furniture Cyprus (Limassol, Nicosia, Paphos) by http://homedeco.com.cy/ is proud to offer a wide selection of unique and luxury furniture Furniture Cyprus

Taxi Paphos (in Cyprus) consists of a fleet of taxis, wedding cars and limos. Taxi Paphos

Rent a car Larnaca

Rent a car Larnaca Cyprus ( by CosmosCarRentals.com ) offers reasonable rates, with NO hidden costs. Rent a car Larnaca

Taxi Paphos (in Cyprus) consists of a fleet of taxis, wedding cars and limos. Taxi Paphos

Taxi Paphos

Taxi Paphos (in Cyprus) consists of a fleet of taxis, wedding cars and limos. Taxi Paphos

Taxi Paphos (in Cyprus) consists of a fleet of taxis, wedding cars and limos. Taxi Paphos

Good post

I understand that you want to know about catalina.log file rotation. I tried your scripts. But the heavy out log is bothering me. This can be solved by making some changes in the script. I hope your problem is solved by now. directv select package

deb

Very educating story, saved

Very educating story, saved your site for hopes to read more!
freemusicallyfollowers.iwantthis4free.com

Cyprus holiday villas in Ayia

Cyprus holiday villas in Ayia Napa and Protaras are ready for you to spend a truly great holiday! Cyprus holiday villas

best

Glad to be one of the visitors on this awe inspiring web site : D.
growtopiahack.onlinecheats4u.com

These you will then see the

These you will then see the most important thing, the application provides you a website a powerful important internet page: www.onlinecheats4u.com

it's really nice and meanful.

it's really nice and meanful. it's really cool blog. Linking is very useful thing.you have really helped lots of people who visit blog and provide them usefull information. Merihaal Sciatica Vanish Magic

Awesome

Your blog has the same post as another author but i like your better.~:;”*
starwarsgalaxyofheroeshack.onlinecheats4u.com

I like this blog so much,

I like this blog so much, saved to my bookmarks .
spotifypremiumcodes.iwantthis4free.com

I encourage you to read this

It is fine, nonetheless evaluate the information and facts around this correct.
Get close to nature

Tech Expert aware of global warming. A nature lover. Always stay close to nature.

 

WHAT is alone proper for the

WHAT is alone proper for the present: namely, the collection of material, the comprehensive survey and classification of an immense domain of delicate sentiments rolex sea dweller of worth, and distinctions of worth, which live, grow, propagate, and perish—and perhaps attempts to give a clear idea of the recurring and more common forms of these living crystallizations—as preparation for a THEORY OF TYPES of morality. To be sure, people have not hitherto been so modest.

All the philosophers, with a pedantic and ridiculous seriousness, demanded of themselves something very tag Heuer Link much higher, more pretentious, and ceremonious, when they concerned themselves with morality as a science: they wanted to GIVE A BASIC to morality—and every philosopher hitherto has believed that he has given it a basis; morality itself, however, has been regarded as something "given." How far from their awkward pride was the seemingly insignificant submariner Rolex problem—left in dust and decay—of a description of forms of morality, notwithstanding that the finest hands and senses could hardly be fine enough for it!

It was precisely owing to moral philosophers' knowing the moral facts imperfectly, in an arbitrary epitome, or an accidental abridgement—perhaps as the morality of their environment, their position, their church, their Zeitgeist, their climate and zone—it was precisely because they were badly instructed with regard to nations, eras, and past ages, and were by no means eager to know about these matters, that they did not even come in sight of the real problems of morals—problems which only disclose themselves by a comparison of MANY kinds of morality. In every "Science of Morals" hitherto, strange as it designer devi kroell replica handbags may sound, the problem of morality itself has been OMITTED: there has been no suspicion that there was anything problematic there! That which philosophers called "giving a basis to morality," and endeavoured to realize.

When seen in a right light, proved merely a learned form of good FAITH in prevailing morality, a new means of its EXPRESSION, consequently just a matter-of-fact within the sphere of a definite morality, yea, in its ultimate motive, a sort of rolex daytona denial that it is LAWFUL for this morality to be called in question—and in any case the reverse of the testing, analyzing, doubting, and vivisecting of this very faith. Hear, for instance, with what innocence—almost worthy of honour—Schopenhauer represents his own task 361.

It is fine, nonetheless

It is fine, nonetheless evaluate the information and facts around this correct. Rassiff Amazing WoodWork Blaster

On this subject internet

On this subject internet page, you'll see my best information, be sure to look over this level of detail. Chandler Blinds

I should say only that its

I should say only that its awesome! The blog is informational and always produce amazing things. Phoenix Blinds

Very good topic, similar

Very good topic, similar texts are I do not know if they are as good as your work out. Gilbert Kitchen Remodeling

Awesome dispatch! I am indeed

Awesome dispatch! I am indeed getting apt to over this info, is truly neighborly my buddy. Likewise fantastic blog here among many of the costly info you acquire. Reserve up the beneficial process you are doing here. Chandler Kitchen Remodeling

So it is interesting and very

So it is interesting and very good written and see what they think about other people. Mesa Kitchen Remodeling

Make the most of mainly

Make the most of mainly premium substances - you will find him or her for: happy new year

I encourage you to read this

I encourage you to read this text it is fun described ... locksmith in coral springs florida

great

subscribers This is very appealing, however , it is very important that will mouse click on the connection: get youtube views

It has fully emerged to crown

It has fully emerged to crown Singapore's southern shores and undoubtedly placed her on the global map of residential landmarks. I still scored the more points than I ever have in a season for GS. I think you would be hard pressed to find somebody with the same consistency I have had over the years so I am happy with that. voyance gratuite en ligne

The most interesting text on

The most interesting text on this interesting topic that can be found on the net ... fat diminisher review

For true fans of this thread

For true fans of this thread I will address is a free online! Language of Desire Product

This script is good but I

This script is good but I don’t think you need to write this big one to complete your task. As research paper service reviews says the more the loops or conditions you keep the interpreter will more time to complete the loop. Try making it short and using less loops and conditioning so that the work will complete fast and get result to you and you easily upload your file if it is huge also.

Twitter Followers | Twitter Retweet

how to gain more followers on twitter Within this webpage, you'll see the page, you need to understand this data. how to get favorites back

reply

This post that explains on the catalina.out log file in the Tomcat server proved to be an interesting one. The post helped me to understand more on the file and the log rotation details. Keep up the good show Man bun

castle clash gems I read this

castle clash gems I read this article. I think You put a great deal of exertion to make this article. I like your work. coc cheats deutsch

nice

For some reason I feel that this update has not taken effect in my system. Me along with one of my close friends where working of something similar for our project and we kind of messed it up big time. bee suits

get followers on

get followers on twitter Truly, this article is really one of the very best in the history of articles. I am a antique ’Article’ collector and I sometimes read some new articles if I find them interesting. And I found this one pretty fascinating and it should go into my collection. Very good work! buy youtube views cheapest

tomcat stops writing to catalina.out, why?

I have a UI web application. Whenever I have gone a few days without restarting the gui, tomcat stops logging to catalina.out. In fact not only does it stop logging, it empties whatever log output exists in catalina.out, catalina.out.1 and catalina.out.2. If the gui is restarted tomcat will begin logging again.

Steps to Reproduce:
1. Let the web ui run on for a few days without restarting the system or the gui. The UI's server component writes to the log.
2. After a couple of day tomcat stops logging to catalina.out. All three files (catalina.out, catalina.out.1 and catalina.out.2) will be empty.

Any help or hint as why this is happening is appreciated beyond words can express.

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.