Setting Up the yc-360 Script

The yc-360 Script is a lightweight utility designed to be executed on all production servers that require monitoring. It captures a comprehensive set of troubleshooting artifacts such as GC logs, thread dumps, heap dumps, netstat, vmstat, iostat, and more-and transmits them to the yCrash server for analysis.

The yc-360 script currently supports Java, .NET, and Node.js applications.

Select your environment below to view step-by-step instructions for running the yc-360 script in On-demand mode:

  • Create a directory for yc-360 script

    mkdir -p /opt/workspace/yc-360
    cd /opt/workspace/yc-360
    Copy code
  • Download the latest yc-360 script

    wget -O yc 'https://tst-srv-jdk8.ycrash.io//export-agent?at=linux&arc=amd64' Copy code

    INFO: The arc parameter specifies the system architecture. Supported values are amd64 and arm64. In a terminal, quote the URL (see wget command above) so & is not treated as “run in background” by the shell. Use wget -O yc as shown so the file is saved as yc; plain wget may otherwise pick an ugly name from the URL. You can also run wget --content-disposition '...URL...' to honor the server filename.

    • Use arc=amd64 for x86_64-based systems.
    • Use arc=arm64 for ARM-based systems.
    If you are unsure about your system architecture, you can omit the arc parameter from the URL. The appropriate script will be selected automatically.

  • Create YAML Configuration File: Create a YAML configuration file named yc-config.yaml in same directory where you have "yc-360" script and add the following content:

    version: '1'
    options:
       k: umayal@3614e1cd-66b7-4265-8b67-6ed13af4d335
       s: https://tst-srv-jdk8.ycrash.io/
       j: {JAVA_HOME}
       a: {APPLICATION_NAME}
    Copy code

    Replace the placeholders in the YAML configuration file with your actual values:

    • {JAVA_HOME}: The directory path where Java is installed in your environment. The j argument is required for Java applications only. Not applicable for Node.js applications.
    • {APPLICATION_NAME}: Friendly name for the application (displayed in the yCrash dashboard).

    For a full list of arguments, refer to the All yc-360 Script Arguments page.

  • Execute: Run the script with your target application's process ID:

    For Java applications:

    ./yc -c yc-config.yaml -p {PID} Copy code

    For Node.js applications:

    Before running the script, make sure your Node.js application has the yCrash hook loaded. This is a one time setup step on the application side, separate from running yc-360 itself. See Node.js Diagnostic Capture for how to configure it.

    ./yc -c yc-config.yaml -p {PID} -appRuntime=nodejs Copy code

INFO:

  • {PID}: This is the process ID of your target application. Not sure how to find it? Learn here. Alternatively, you can pass Unique Token that will uniquely identify the process. What is Unique Token?

IMPORTANT TIP:

For Java applications:

  • The yc-360 script must be executed with the same user privileges as the Java application. For example, if the application runs under the tomcat-user user, the yc-360 script must also be executed by the tomcat-user user.
  • To detect memory-related issues, GC logging must be enabled for your application. You can enable GC logging by using the JVM arguments listed here.
  • The yc-360 script doesn't capture a heap dump by default. Pass the -hd argument to capture a heap dump. For more information, please visit How to Capture Heap Dump?

For Node.js applications:

  • The yc-360 script must be executed with the same user privileges as the Node.js application.
  • The yCrash hook must already be loaded in the target process before the script runs. It can't attach to an application after the fact. See Node.js Diagnostic Capture for setup instructions.
  • GC Log auto-discovery works out of the box on Linux, as long as the application was started with --trace-gc.
  • Create a directory for yc-360 script

    mkdir -p /opt/workspace/yc-360
    cd /opt/workspace/yc-360
    Copy code
  • Download the latest yc-360 script

    wget -O yc 'https://tst-srv-jdk8.ycrash.io//export-agent?at=mac&arc=amd64' Copy code

    INFO: The arc parameter specifies the system architecture. Supported values are amd64 and arm64. In a terminal, quote the URL (see wget command above) so & is not treated as “run in background” by the shell. Use wget -O yc as shown so the file is saved as yc; plain wget may otherwise pick an ugly name from the URL. You can also run wget --content-disposition '...URL...' to honor the server filename.

    • Use arc=amd64 for x86_64-based systems.
    • Use arc=arm64 for ARM-based systems.
    If you are unsure about your system architecture, you can omit the arc parameter from the URL. The appropriate script will be selected automatically.

  • Create YAML Configuration File: Create a YAML configuration file named yc-config.yaml in same directory where you have "yc-360" script and add the following content:

    version: '1'
    options:
       k: umayal@3614e1cd-66b7-4265-8b67-6ed13af4d335
       s: https://tst-srv-jdk8.ycrash.io/
       j: {JAVA_HOME}
       a: {APPLICATION_NAME}
    Copy code

    Replace the placeholders in the YAML configuration file with your actual values:

    • {JAVA_HOME}: The directory path where Java is installed in your environment. The j argument is required for Java applications only. Not applicable for Node.js applications.
    • {APPLICATION_NAME}: Friendly name for the application (displayed in the yCrash dashboard).

    For a full list of arguments, refer to the All yc-360 Script Arguments page.

  • Execute: Run the script with your target application's process ID:

    For Java applications:

    ./yc -c yc-config.yaml -p {PID} Copy code

    For Node.js applications:

    Before running the script, make sure your Node.js application has the yCrash hook loaded. This is a one time setup step on the application side, separate from running yc-360 itself. See Node.js Diagnostic Capture for how to configure it.

    ./yc -c yc-config.yaml -p {PID} -appRuntime=nodejs Copy code

INFO:

  • {PID}: This is the process ID of your target application. Not sure how to find it? Learn here. Alternatively, you can pass Unique Token that will uniquely identify the process. What is Unique Token?

IMPORTANT TIP:

For Java applications:

  • The yc-360 script must be executed with the same user privileges as the Java application. For example, if the application runs under the tomcat-user user, the yc-360 script must also be executed by the tomcat-user user.
  • To detect memory-related issues, GC logging must be enabled for your application. You can enable GC logging by using the JVM arguments listed here.
  • The yc-360 script doesn't capture a heap dump by default. Pass the -hd argument to capture a heap dump. For more information, please visit How to Capture Heap Dump?

For Node.js applications:

  • The yc-360 script must be executed with the same user privileges as the Node.js application.
  • The yCrash hook must already be loaded in the target process before the script runs. It can't attach to an application after the fact. See Node.js Diagnostic Capture for setup instructions.
  • GC Log auto-discovery works out of the box on macOS, as long as the application was started with --trace-gc.
  • Download: Download the latest version of the yc-360 script from here.

  • Extract: Unzip the yc-360-script.zip file. After extraction, you will find yc.exe and yc-dot-net.exe. When capturing logs from a .NET application, ensure yc-dot-net.exe is kept in the same directory as yc.exe.

  • Create YAML Configuration File: Create a YAML configuration file named yc-config.yaml in same directory where you have "yc-360" script and add the following content:

    version: '1'
    options:
       k: umayal@3614e1cd-66b7-4265-8b67-6ed13af4d335
       s: https://tst-srv-jdk8.ycrash.io/
       j: {JAVA_HOME}
       a: {APPLICATION_NAME}
    Copy code

    Replace the placeholders in the YAML configuration file with your actual values:

    • {JAVA_HOME}: The directory path where Java is installed in your environment. The j argument is required for Java applications only. Not applicable for .NET or Node.js applications.
    • {APPLICATION_NAME}: Friendly name for the application (displayed in the yCrash dashboard).

    For a full list of arguments, refer to the All yc-360 Script Arguments page.

  • Execute: Run the script with the following command:

    For Java applications:

    .\yc -c yc-config.yaml -p {PID} Copy code

    For .NET applications:

    .\yc -c yc-config.yaml -p {PID} -appRuntime=dotnet Copy code

    For Node.js applications:

    Before running the script, make sure your Node.js application has the yCrash hook loaded. This is a one time setup step on the application side, separate from running yc-360 itself. See Node.js Diagnostic Capture for how to configure it.

    .\yc -c yc-config.yaml -p {PID} -appRuntime=nodejs Copy code

INFO:

  • {PID}: The process ID of your target application. Not sure how to find it? Learn here. Alternatively, you can pass Unique Token that will uniquely identify the process. What is Unique Token?

IMPORTANT TIP:

For Java applications:

  • The yc-360 script must be executed with the same user privileges as the application. For example, if the application runs under the tomcat-user user, the yc-360 script must also be executed by tomcat-user.
  • To detect memory-related issues, GC logging must be enabled for your application. You can enable GC logging by using the JVM arguments listed here.
  • The yc-360 script doesn't capture heap dump by default. Pass the -hd argument to capture heap dump. For more information, please visit How to Capture Heap Dump?

For .NET applications:

  • Ensure Event Tracing for Windows (ETW) is enabled in your environment. It is required to capture .NET artifacts. To learn more, visit ETW Privileges and Environment Requirements.
  • The yc-360 script must be run with administrator permissions to capture .NET artifacts.
  • Heap dumps are not captured for .NET applications. Instead, the script captures lightweight heap substitute data for memory analysis.
  • GC capture duration: By default, GC collection runs for 30 seconds. To extend this, pass -gcDuration={seconds} to the yc-360 script (replace {seconds} with the desired duration).

For Node.js applications:

  • The yCrash hook must already be loaded in the target process before the script runs. It can't attach to an application after the fact. See Node.js Diagnostic Capture for setup.
  • GC Log capture on Windows requires -nodejsGCLogPath pointing at your application's redirected output file. There's no auto discovery on this platform. See nodejsGCLogPath.

To monitor and troubleshoot Java applications running inside Docker containers, the yc-360 script can be deployed in three flexible ways. Depending on your architecture and security preferences, you can choose the method that best fits your needs. Learn more on the Deployment Options in Docker page.

For Node.js applications, set NODE_OPTIONS as an environment variable on your application's container before you start it. See Node.js Diagnostic Capture for the full setup, including how to point both sides at a shared runtime directory in a containerized deployment.

The yc-360 script can be seamlessly integrated into your Kubernetes environment to monitor and analyze Java applications running in pods. You can choose the approach best suits your setup. Learn more on the Deployment Options in Kubernetes page.

For Node.js applications, set NODE_OPTIONS in your pod's container env spec before the pod starts. See Node.js Diagnostic Capture for the full setup.

The yc-360 script can be seamlessly integrated into your OpenShift environment to monitor and analyze Java applications running in pods. To learn more, please visit the Run yc-360 Script in OpenShift page.

For Node.js applications, set NODE_OPTIONS in your pod's container env spec before the pod starts. See Node.js Diagnostic Capture for the full setup.

The yc-360 script can be seamlessly integrated into AWS Fargate environments to monitor, diagnose, and troubleshoot Java applications running in containers. Depending on your orchestration platform, you can deploy yc-360 as a sidecar in ECS Fargate (EKS Fargate support is coming soon). Learn more on the Deployment Options in AWS Fargate page.

For Node.js applications, set NODE_OPTIONS on your application's container definition before it starts. See Node.js Diagnostic Capture for the full setup.

If you're curious about other execution modes, check out the Execution Modes page.

If you encounter any issues during setup, contact our support team at support@tier1app.com.