yc-data-script is a simple Golang script that captures 16 different artifacts from your application in a pristine manner. These artifacts will be highly useful to troubleshoot performance problems. Below is the list of artifacts captured:
- Garbage collection log
- Thread dump
- Heap dump
- Heap substitute
- top
- ps
- top -H
- Disk usage
- dmesg
- netstat
- ping
- vmstat
- iostat
- Kernel parameters
- Application Log
- Metadata
- Download the latest yc-data-script from this location
- Unzip the downloaded
yc-agent-latest.zip
file. (Say you are unzipping in '/opt/workspace/yc-agent-latest' folder) - In the unzipped folder you will find yc-data-script by operating system:
a) linux/yc
- If you are running on Unix/Linux, then use this script.
b) windows/yc.exe
- If you are running on Windows, then use this script.
c) mac/yc
- If you are running on MAC, then use this script.
- You can execute the yc script by issuing following command:
./yc -j {JAVA_HOME} -onlyCapture -p {PID} -hd
Where,
JAVA_HOME is the home directory where JDK is installed
PID is the troubled target process ID
Example:
./yc -j /usr/java/jdk1.8.0_141 -onlyCapture -p 15326 -hd
When you pass the above arguments, yc-data-script will capture all the application level and system level artifacts/logs from the server from the target JVM & host for analysis. Captured artifacts will be compressed into a zip file and stored in the current directory where the above command was executed. The zip file will have the name in the format: 'yc-YYYY-MM-DDTHH-mm-ss.zip'.
Example: 'yc-2021-03-06T14-02-42.zip'.
WARNING: In Linux/Unix, yCrash agent should be run with same user permissions as your target java application user permission. Say your target java application is running with user permission 'tomcat-user', then yCrash agent should also be run with 'tomcat-user' permission.
Important Tip: In order to detect memory related problems, you need to enable GC logging on your application. You can enable GC logging on your application, by passing the arguments mentioned here.
Help: If you encounter any issues during setup, contact our support team at support@tier1app.com. To see all yCrash agent arguments, please refer here.
You can analyze the artifacts captured by yc-data-script either manually or through yCrash server. yCrash server analyzes all the captured data and generates a root cause analysis report instantly. You can use the Bundle upload feature in the yCrash server to analyze the captured 360-degree data.
You can launch yc-data-script in following 3 different modes:
- On-demand Mode: In this mode you can directly transmit 360-degree artifacts from your server to yCrash server for analysis.
- API Mode: In this mode you can integrate yc-data-script with your current monitoring tools such as AppDynamics, New Relic, Dynatrace, …
- M3 (Micro-metrics Monitoring) mode: In this mode, yc-data-script proactively detect performance outages much earlier before it surfaces
Please refer to any one of the following links if you want to build the yc-data-script in that corresponding operating system: