I have used NetWorx to allow indiviual users to monitor their bandwidth use, and as it keeps good exportable logs it gives some useful statistics. Assuming the BT router you use supports it you can use PRTG or MRTG to actually monitor the usage on the WAN and possibly LAN ports.
I figured it out -- the package doesn't quite work right with Sun's latest Java6 package, sun-java6-jdk
; the fix is fairly straightforward when you find it:
Once I found the daemon.log
, I found the errors listed in my edit on the question, but those are just a side-effect of this error:
jsvc.exec[18819]: Could not load Logmanager "org.apache.juli.ClassLoaderLogManager"
jsvc.exec[18819]: java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader)
...which occurs because the package, by default, runs Tomcat using the Java security manager per this setting in /etc/init.d/tomcat5.5
:
# Use the Java security manager? (yes/no)
TOMCAT5_SECURITY=yes
...but the package doesn't set a permissions on JULI (the default logging implementation) that the latest Java6 from Sun appears to need for that to work. Earlier versions of Java6 were apparently fine. This recent thread on the tomcat-user mailing list pointed me in the right direction; the user in question there was getting the error above and eventually Mark Thomas figured out that this permission:
permission java.lang.RuntimePermission "setContextClassLoader";
...was missing from catalina.policy
. And indeed, if I add that permission to the JULI section of /etc/tomcat5.5/policy.d/03catalina.policy
and restart Tmocat, the error goes away, and I get log files! Huzzah!
Be warned: If you also install tomcat5.5-webapps
to get the examples, manager application, etc., there are other settings you'll need to enable in 03catalina.policy
. Of course, you always have the option of turning the security manager off, but this is what it's for.
Best Answer
You can configure Tomcat to do standard logging (in the "common log format") for each of the virtual hosts. Then you have a plethora of software for analyzing the logs, that's the main reason for having the common log format. Free tools like webalizer can do pretty graphs and breakdowns for you, but that's just the tip of the iceberg of tools available to do useful things with the common log format.