sk89q / warmroast

Java application CPU sampler w/ web-based UI
230 stars 37 forks source link

WarmRoast

Note: This project is not actively maintained but should work. (2024)

WarmRoast attaches to Minecraft (or any Java application) and lets you see what it's doing. While what it's doing can be cryptic, with some practice, you can start to figure out patterns.

Download

Latest Release: here

Latest Build: here

Screenshots

Sample output

Usage

Extract the .zip file and place the .jar somewhere.

For Java 9 and newer

The tools.jar is automatically included into JDK's since Java 9. You only should use something like this:

java -cp warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"

For Java 7 & 8

  1. Note the path of your JDK.

  2. Download WarmRoast.

  3. Replace PATH_TO_JDK in the following commands with the path to your JDK and execute the program.

Note: The example command line below includes --thread "Server thread", which filters all threads but the main server thread. You can remove it to show all threads.

Modded/vanilla servers: If you are using a modded server, get a copy of MCP for your server's Minecraft version, copy the files from conf/ somewhere, and point WarmRoast to it with --mappings path/to/folder. This helps readability a lot. Bukkit uses its own mapping, so a pure non-modded Bukkit server can't use MCP mappings.

Linux

java -Djava.library.path=PATH_TO_JDK/jre/bin -cp PATH_TO_JDK/lib/tools.jar:warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"

Windows

An example PATH_TO_JDK would be C:\Program Files\Java\jdk1.7.0_45

java -Djava.library.path=PATH_TO_JDK/jre/bin -cp PATH_TO_JDK/lib/tools.jar;warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"

Parameters

Usage: warmroast [options]
  Options:
    --bind
       The address to bind the HTTP server to
       Default: 0.0.0.0

    -h, --help
       Default: false

    --interval
       The sample rate, in milliseconds
       Default: 100

    -m, --mappings
       A directory with joined.srg and methods.csv

    --name
       The name of the VM to attach to

    --pid
       The PID of the VM to attach to

    -p, --port
       The port to bind the HTTP server to
       Default: 23000

    -t, --thread
       Optionally specify a thread to log only

    --timeout
       The number of seconds before ceasing sampling (optional)

Hint: --thread "Server thread" is useful for Minecraft servers.

License

The project is licensed under the GNU General Public License, version 3.