One easy way to achieve the memory part:
We use our own logging and have build in something like
the following in the log method:
// snip
boolean oWatchMemory = false;
Runtime oRuntime = Runtime.getRuntime();
int oGCCount = 0;
int oGCInterval = 100;
// snip
void log(....) {
if (oWatchMemory) {
if ((oGCInterval > 0) && (oGCCount >= oGCInterval)) {
mBuffer.append("gc#");
System.gc();
oGCCount = 0;
}
oGCCount++;
mBuffer.append("used#" +
(oRuntime.totalMemory() -
oRuntime.freeMemory()) +
"total#" + oRuntime.totalMemory() +
"#free#" + oRuntime.freeMemory()+ "#");
// snip
}
// snip
}
It's nothing compared against a good memory profiler,
but is cheap and easy to use.
I don't know any free profilers for java. (Haven't searched much)
> -----Ursprungliche Nachricht-----
> Von: Emil Genov [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 15. Februar 2001 11:43
> An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Betreff: Monitor memory and CPU usage of servlets from inside
> of Tomcat
<snip/>
> I need to monitor memory usage
<snap/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]