IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Unix question
Please forgive my ignorance; I am not a UNIX person. Nevertheless, I have the following question for those of you familiar with UNIX.

Thanks for your understanding and time.

The question:

Regarding the process called "garbage collection" in Unix, I would
like to know if there is a way to look at the garbage which has been
collected before it is gotten rid of.  Do you know of  a utility or
other program that will let me view the garbage (prior to disposal)?
New is this a java or c++ question?
gc is a function of the language, not nescessarily the OS. Unless I misunderstood the question
New Re: is this a java or c++ question?
Sorry - it's Java. Thanks.
New which specific OS are you using?
uname -a would be good.
thanx,
bill
New this may help
Using VerboseGC will log garbage collection for you (includes both partial and full GC’s). Use the following java option on the command when starting the JVM:

-verbose:gc –Xloggc:/var/appl/logs/GC.log

Where it is possible to read the GC logs in raw format, using JMeter or equivalent application (VisualGC is another) is MUCH easier and less cryptic.

Java 6 has the following tools in the JVM:
Jhat (java heap analysis tool) – Insufficient memory errors
Jconsole, jstat, jmap – Growing use of memory, frequent garbage collection, class with high growth rate, OutOfMemoryError
Jconsole – deadlocks
Jconsole or jhat – objects pending for finalization
Jconsole with jtop – looping threads (CPU time increases continuously)
Jconsole – high lock contention
New Thanks!
Sorry for the delay - had to step out.

The OS name is Solaris and it's a Sun box.

The reason that I'm asking is this: suppose there was a misbehaving (badly written) application that was leaving all sorts of pieces of memory laying around assuming that sooner or later the garbage collection routine would come along and clean up. If these pieces of memory happened to contain certain data, such as credit card numbers, SSAN's, etc., wouldn't that be a security exposure (between GC collections)? Another reason is this: suppose the same pieces of garbage appear over and over again with each collection. Wouldn't that be create an opportunity to 'tune' the application so that it doesn't leave all this laying around? I assume GC uses resources, and the sooner it completes it's task, the better.

It could be that in my naivete these circumstances are not significant or relevant; I just don't know.

Thank you for your time.
New I use a profiler called YourKit
You can load it into a Tomcat or other Java process to see what's left lying around. Much better than the tools that come with the JDK.
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
     Unix question - (dmcarls) - (6)
         is this a java or c++ question? - (boxley) - (2)
             Re: is this a java or c++ question? - (dmcarls) - (1)
                 which specific OS are you using? - (boxley)
         this may help - (boxley) - (2)
             Thanks! - (dmcarls) - (1)
                 I use a profiler called YourKit - (malraux)

Yeeaaahhhh! I'm the mae-stro!
40 ms