![]() ![]() ![]() But because Java actually runs in a VM, for some absurd reason that I can't really figure out after more then 15 years working the JDK, is why it isn't possible to see things outside the JVM space, it's really ridiculous with you think about it. I know, this seems horrible, and non portable, and even poorly implemented, I agree. Or, if you are running under Linux, you can query the /proc directory. You can use and "pgrep" to get the process id (PID) with something like: pgrep -fl java | awk. config/zookeeper.propertiesĢ8807 root .RunNiFi runĪn alternative on windows to list all processes is: WMIC path win32_process where "Caption='java.exe'" get ProcessId,Commandlineīut that is going to need some parsing to make it more legible. Results look something like: PID USER CMDġ1251 userb .quorum.QuorumPeerMain. ![]() This is a bit rough still but removes everything except: PID, User, java-class/jar, args. Using the ps|grep is what I ended up doing but the class path for some java apps can be extremely long which makes results illegible so I used sed to remove it. But even if it did it only shows processes under the current user which doesn't work in my case. Jps & jcmd wasn't showing me any results when I tried it using using openjdk-1.8 on redhat linux. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |