Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Could someone recommend a good and free program for analysing Apache Tomcat logs. I don't need real-time analysis or anything like that. I have a log and I just want a quick and easy way to get some usage statistics from it. The stats don't even have to be too fancy - I just want a rough idea of unique users per day, week, and month really.

Thanks,

Bart.

share|improve this question
add comment

closed as not constructive by Ladadadada, Cian, Jenny D, Tom O'Connor Jun 13 '13 at 15:21

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

up vote 3 down vote accepted

You could use LambdaProbe :

http://www.lambdaprobe.org/d/index.htm

It's a nice webapps that only require that you relaunch Java. It provides nice features like live thread listing, and also parses log file (catalina.out) There is some nice monitoring (Session, threads, memory) and gives connector's load. At last (not least) it provides an interface to manage your webapps.

share|improve this answer
    
I love Lambdaprobe, but have been disappointed that there hasn't been an update since 11/2006. Works great on all my current stuff, but I'm worried that it's gonna start aging out. –  Tim Howland Sep 8 '09 at 13:11
3  
Ah, just found a fork of it for that reason: code.google.com/p/psi-probe –  Tim Howland Sep 8 '09 at 13:12
add comment

Awstats would be a good choice i think.

There's a tutorial on how to set it up. http://www.turro.org/xp/Portal?xpc=1$@8$@1$@1&folder=20050104154634840

Edited some link brainlessness

share|improve this answer
    
Awstats only allows to analyse logs in order to have statistics. That's not suitable for Tomcat logs imao –  Razique Sep 8 '09 at 13:05
2  
That is true. But the question was about usage statistics. As in http requests per second. Not java heap size. And awstats excels at that. –  pyhimys Sep 9 '09 at 6:36
add comment

Try this. make a ".sh" file and cron it to get the logs in the mail

#!/bin/bash 
cd [location of the catalina] 
ps -ef | grep tomcat | grep java | grep -v grep 
if [ $? -ne "0" ]; 
then 
rm -f .ref; 
exit 0 
fi 
export ALARM="$(cat catalina.out | wc -l)" if [ ! -f .ref ]; 
then 
echo $ALARM > .ref 
elif [ $ALARM -gt $(cat .ref) ]; 
then 
sed -n $(cat .ref),$(echo $ALARM)p Catalina.out | egrep -A 70 'SEVERE|ERROR' | egrep -v 'INFO|org.apache' > .reflog; 
elif [ $ALARM -eq $(cat .ref) ]; 
then 
exit 2 
fi 
export SIZE=$(ls -l .reflog | cut -d ' ' -f 5) if [ $SIZE -gt "0" ]; then cat .reflog | mail -s subject mail@goes.here 
fi 
echo $ALARM > .ref 
#EOF
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.