Fog Creek Software
Discussion Board




How do I find out what is held in cache?

I recently inherited a small  java application that runs within a Tomcat container.

The application tend to hold alot of data in memory - rather than going to the database.

Is there a way I can query the memory? It would be great if I can do that for trouble-shooting.

Micro Managed
Friday, August 27, 2004

select * from memory;

L. E.
Friday, August 27, 2004

select * is always bad in itself, select only the required fields and probably apply a WHERE and ORDER BY clause as well to speed things up.

Oh, it's Java, forget the speed thing.


Friday, August 27, 2004

Do I run this in the command line of the OS? Or will this be run via a Java application?

Micro Managed
Friday, August 27, 2004

Open the JVM in notepad, search for the following code:

34 98 99 33 31 fa 34 ff 00 12 34

and replace with this:

23 ef 12 87 34 45 ab cd 23 df 33


Friday, August 27, 2004

ROFLMAO!

anon-y-mous cow-ard
Friday, August 27, 2004

Consider using JProbe's memory tool. It worked quite well for me.
http://www.quest.com/jprobe/debugger.asp

Tayssir John Gabbour
Friday, August 27, 2004

How about (if you have source...)
System.out.println(Object.GetMethod())


Or run the code in a debugger

the artist formerly known as prince
Friday, August 27, 2004

This is a really poor troll.  When trolling, the idea is to sound just dumb enough to warrent a response, but not so dumb as to lwhere everyone will know that your attempting to troll.  Next time ask a slightly less retarded question. 

vince
Friday, August 27, 2004

No, a good troll entices people to say things which humiliate themselves.

If this is someone who just wants people to waste their time then... fine. I can never tell the difference with those, and I only say things which should be more well known than they probably are.

Tayssir John Gabbour
Friday, August 27, 2004

If it's a serious question, definitely JProbe is the way to go.  It can help you track memory leaks (or the Java equivalent of excess cached data rather).

Will
Sunday, August 29, 2004

*  Recent Topics

*  Fog Creek Home