/ycrash-agent

Primary LanguageGoGNU Affero General Public License v3.0AGPL-3.0

ycrash-agent

img

What does the yCrash agent do?

yCrash agent 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:

  1. Garbage collection log
  2. Thread dump
  3. Heap dump
  4. Heap substitute
  5. top
  6. ps
  7. top -H
  8. Disk usage
  9. dmesg
  10. netstat
  11. ping
  12. vmstat
  13. iostat
  14. Kernel parameters
  15. Application Log
  16. Metadata

How to run the yCrash agent?

  1. Download latest yCrash agent script from this location

  2. Unzip the downloaded yc-agent-latest.zip file. (Say you are unzipping in '/opt/workspace/yc-agent-latest' folder)

  3. In the unzipped folder you will find two files:

    a) yc - If you are running on Unix/Linux/Mac, then use this file.

    b) yc.exe - If you are running on Windows, then use this file.

    You need to invoke yCrash script with following arguments:

    ./yc -j {JAVA_HOME} -onlyCapture -p {PID} -hd
    

    Where,

    JAVA_HOME is the home directory where JDK is installed

    PID is the target JVM's process ID

    Example:

    ./yc -j /usr/java/jdk1.8.0_141 -onlyCapture -p 15326 -hd
    

    When you pass the above arguments, yCrash 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'.

How to analyze the artifacts generated by the yCrash agent?

You can analyze the artifacts captured by yCrash agent 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.

Advanced launch modes

You can launch yCrash agent in following 3 different modes:

  1. On-demand Mode: In this mode you can directly transmit 360-degree artifacts from your server to yCrash server for analysis.
  2. API Mode: In this mode you can integrate yCrash agent with your current monitoring tools such as AppDynamics, New Relic, Dynatrace, …
  3. M3 (Micro-metrics Monitoring) mode: In this mode, yCrash agent proactively detect performance outages much earlier before it surfaces

How to build the agent?

Please refer to any one of the following links if you want to build the ycrash agent in that corresponding operating system:

  1. Build yc agent in Windows
  2. Build yc agent in Linux
  3. Build yc agent in MacOS