Question

Is there any known command line tool to ask the JVM to see memory usage and thread dumps of a java program. something like a headless jvisualvm?

Était-ce utile?

La solution

You can use jstat to get gc information, jstack to get stack traces and jmap to get memory statistics and memory dumps for off-line inspection.

Autres conseils

Ctrl+Break will produce a thread dump and various statistics.

This is documented, along with kill -QUIT, here.

Look into the official debugger, jdb. You have to run your java program with a certain flag, but then you should be able to look at a bunch of stuff from the commandline.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top