Friday, February 1, 2019

Find JVM start arguments of java process on Windows server

Commands to find JVM arguments for java processes running on Windows server.

Many of us work on unix based servers on daily basis and don't even have to think about figuring out so many detail during any investigation or analyses process. But occasionally, we  have to investigate stuff (yeah... technical word that means anything or everything) on Windows server, and we struggle to discover even basic things.

Most common way to figure out JVM related info in on unix:

$ ps -ef | grep java   ## voila.... we get all the info

Will it work on windows..nope. But the below will:

cmd> tasklist  #### this command is equivalent of "ps" on unix based systems, and also return PID of processes.

Once you know the PID, use the below command to get JVm arguments of the java process.

cmd> c:\<path to your java dir>\jcmd <PID> VM.command_line
cmd> c:\<path to your java dir>\jcmd <PID> VM.flags

No comments:

Post a Comment