javagarbage-collectionjstat

How to run jstat in windows?


I am trying to run jstat for monitoring GC. I get the vmid using jps command:

> jps
18928 GCTest

but when i try to run jstat like this:

>jstat -gc <vmid> 18928
The system cannot find the file specified.

I get the message The system cannot find the file specified. . The syntax seems fine. Am i making any errors?


Solution

  • Call it like this, this should work:

    jstat -gc 18928