Skip to content

Commit a6b605b

Browse files
authored
Merge pull request #108850 from JasonFreeberg/patch-53
Instructions for Java Flight Recorder on Windows
2 parents 3d9732e + 2dcd3e4 commit a6b605b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

articles/app-service/configure-language-java.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ Do not deploy your .war using FTP. The FTP tool is designed to upload startup sc
3333

3434
Performance reports, traffic visualizations, and health checkups are available for each app through the Azure portal. For more information, see [Azure App Service diagnostics overview](overview-diagnostics.md).
3535

36+
### Use Flight Recorder
37+
38+
All Java runtimes on App Service using the Azul JVMs come with the Zulu Flight Recorder. You can use this to record JVM, system, and Java level events to monitor the behavior and troubleshoot problems in your Java applications.
39+
40+
To take a timed recording you will need the PID (Process ID) of the Java application. To find the PID, open a browser to your web app's SCM site at https://<your-site-name>.scm.azurewebsites.net/ProcessExplorer/. This page shows the running processes in your web app. Find the process named "java" in the table and copy the corresponding PID (Process ID).
41+
42+
Next, open the **Debug Console** in the top toolbar of the SCM site and run the following command. Replace `<pid>` with the process ID you copied earlier. This command will start a 30 second profiler recording of your Java application and generate a file named `timed_recording_example.jfr` in the `D:\home` directory.
43+
44+
```
45+
jcmd <pid> JFR.start name=TimedRecording settings=profile duration=30s filename="D:\home\timed_recording_example.JFR"
46+
```
47+
48+
For more information, please see the [Jcmd Command Reference](https://docs.oracle.com/javacomponents/jmc-5-5/jfr-runtime-guide/comline.htm#JFRRT190).
49+
50+
#### Analyze `.jfr` files
51+
52+
Use [FTPS](deploy-ftp.md) to download your JFR file to your local machine. To analyze the JFR file, download and install [Zulu Mission Control](https://www.azul.com/products/zulu-mission-control/). For instructions on Zulu Mission Control, see the [Azul documentation](https://docs.azul.com/zmc/) and the [installation instructions](https://docs.microsoft.com/java/azure/jdk/java-jdk-flight-recorder-and-mission-control).
53+
3654
### Stream diagnostic logs
3755

3856
[!INCLUDE [Access diagnostic logs](../../includes/app-service-web-logs-access-no-h.md)]

0 commit comments

Comments
 (0)