Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading tomcat log files every 5 minutes

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
reading tomcat log file every 5 minutes and upload it to ftp server will it cause any performance issues on tomcat, my tomcat is running ona server along with a a simple java application , this application reads the catalina.out file every 5 minutes and upload it to an ftp server , will this cause any issues on tocmat performance?
Becasue I will be reading the logs which tomcat is writing to so my reading and tomcat writing will this cause any issues on tomcat performance ?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's more of a question about what that would do to the overall performance of the server machine. You're copying a file frequently, so it's making regular hits on the filesystem, network resources and (a little) CPU.

Actually, a more intelligent way of handling this is not to copy the entire file periodically, but to use a networking logger that sends the log information straight to the remote log collection server as it is generated. Less overhead, plus less risk that something will crash while you're replacing the older copy of the logfile, thereby losing potentially useful history.

I don't recall if JULI logging has an option for that or not. Log4J does, although to use Log4J as Tomcat's logger you have to build a custom Tomcat.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic