YCrash has two components:
- YC AGENT: This is a simple Go program that should be installed on all your production servers. This program captures and transmits all the troubleshooting artifacts (GC Log, Thread dump, netstat, vmstat, iostat,….) to the YC server. Note: This agent doesn’t run always. It runs only when you trigger. So it add no observable overhead.
- YC SERVER:Collects the data transmitted by YC AGENT, analyzes them, and generates one unified root cause analysis report, which can be accessed through a web browser.
Here are the steps to install both YC SERVER and YC AGENT.
a. YC SERVER
- Prerequisite: Java 8 or above should be installed.
- Download latest version of ycrash.
- Unzip the yc.zip file. (Say you are unzipping in /opt/workspace/yc folder)
- Copy the trial license certificate i.e. license.lic file. (that was sent in email) to the unzipped folder (i.e. /opt/workspace/yc folder)
- Launch ycrash server by issuing the command:
Unix: /opt/workspace/yc/launch-yc-server.sh Windows: c:\workspace\yc\launch-yc-server.bat
6. Upon successful launching, you can access ycrash application in the browser in this URL: http://localhost:8080/
b. YC AGENT
- You will find ‘yc’ and ‘yc.exe’ file in the ‘/opt/workspace/yc/agent’ folder. If your host is running on windows operating system then use ‘yc.exe’. If your host is running on Unix/Linux operating system, then use ‘yc’. Copy the appropriate YC AGENT to your host.
- You need to run YC AGENT on your production server when there are production problems. You can either trigger the agent manually or automatically when alerts are generated. Agent can be triggered using the below command:
./yc -c <YC_CONFIG_FILE_PATH> -p <PID>
YC_CONFIG_FILE_PATH: yc configuration file path.
PID: Java Process ID that you need to troubleshoot
./yc -c /opt/yc/yc-agent.yaml -p 3321
Here is sample content for yc-agent.yaml file:
version: '1' options: j: /opt/java1.8/ k: apple@e094bbsdsa-c4eb-4c9a-8284-f000d13245cc s: https://my-yc-server:port hd: false a: aps
Here are the property descriptions:
j: directory where Java is install
k: API key given to you at the time of registration
s: ycrash server url
hd: Set it to true if want to capture heap dump. Heap dump is intrusive operation, it will pause your JVMs.
a: Name of your application.
Note: You can override any property that is specified in the yaml configuration file, by passing same property in the command line.