On 5/22/06, Mladen Adamovic <[EMAIL PROTECTED]> wrote:
Leon Rosenberg wrote: > No, I mean things like number of request for each servlet, total > number of time this servlet spent processing, number of errors, avg > request duration for last 5m,15m,1h,1d,1week... whatever. In fact I might become interested in those information. Average/max duration of time for each servlet/JSP. Is it possible to get those information?
Yes :-) Since today.
> you can always write a script which is getting the data and graphing > it... The problem is to collect the data :-) It seems to me that you are more interested in Loggers (classes which does generate log files) than their representation. I understand you, me, as developer should be also more interested in those. > Ok, I see, you are more interested in "who's calling what on my > server" and less in "what the f*ck is my server doing". In fact, I've just started my server and Awstats shows me who is calling what on my server. It could take less memory, I don't like because it use CGI (potential security issues?) but it works :), and it is usable. At some point I might be more interested in "what the f*ck is my server doing". (for example : the response is slow). Off course I might write my own loggers and trace duration time, but it might be good idea to ask: Is there any generic tool to use to find out "what the f*ck is my server doing"?
Glad you asked :-) In fact I've built some of such monitoring systems over the years. I was always surprised, that there is no default monitoring toolkit in the java world. I don't mean logging, logging is simple. But to log something, you first have to produce the data, and besides JVM Monitoring data from BEA's jrockit there isn't much out there for production systems. So I decided to write one. You may be the first to try it :-) I've put a little demo under: http://anotheria.net:8180/moskitodemo/ It's pretty simple, one monitored servlet, klick on the "make a request" link (as often as you wish of course). On each click it will sleep some time (emulating working) or throw an exception (emulating error condition). You can view the stats for 1,5,15 minutes, 1 hour, 1 day or since start of the server (or whatever interval the servlet designer configured). A note on the stats generation: The stats are interval stats. That means, that the 5 minute value isn't the value of the last 5 minutes, but the value of the last 5 minutes interval update. To illustrate this, following example: The server is started at 12:00. You are checking at 12:03 the 5 minute stats. What will you see? Nothing, since no 5 minute intervals are completed yet. If you'll check again at 12:07 you will see the stats gathered between 12:00 and 12:05. After 12:10 you will see the stats between 12:05 and 12:10. And so on. This is imho the only way to generate comparable stats. If your server is slow today, you want to compare a 5 minute value to the one from yesterday, not a 3 minute value to 5 minute value and such. However, enough said. Try it out, tell me what you think :-) regards Leon P.S. Moskito is open source. I'm creating a downloadable distribution right now, which will contain the core system, logging add-on for log4j. Addon for servlet support. DemoApps and demo webapp (the one you see). And the source code. The download page will be available tomorrow :-)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]