SapMachine
SapMachine copied to clipboard
Implement a lean alternative for jcmd
We often see usage of jcmd in (cloud) containers to get information needed for support. Since these environments tend to be configured with tight resources, it is important that the tool itself doesn't use much memory. Otherwise the container could be killed for exceeding its allowed memory usage. Since jcmd starts a whole JVM it would be nice to have a small native program which does mostly the same. One comfort feature which could be missing is specifying the connected VM by anything apart from a pid.
Looks like you want to take a look at the jattach utility which does exactly what you want (and a little more :)
https://github.com/jattach/jattach