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 and .NET 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-jdk11.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: Testing@f05b4d6c-4aad-4d37-b47b-92b809841339
       s: https://tst-srv-jdk11.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 on your system.
    • {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:

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

INFO:

  • {PID}: This is the process ID of your Java 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:

  • 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, yc-360 script must also be executed by "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 heap dump by default. Pass the "-hd" argument to capture heap dump. For more information, please visit How to Capture Heap Dump?
  • 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-jdk11.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: Testing@f05b4d6c-4aad-4d37-b47b-92b809841339
       s: https://tst-srv-jdk11.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 on your system.
    • {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:

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

INFO:

  • {PID}: This is the process ID of your Java 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:

  • 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, yc-360 script must also be executed by '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 heap dump by default. Pass the -hd argument to capture heap dump. For more information, please visit How to Capture Heap Dump?
  • 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: Testing@f05b4d6c-4aad-4d37-b47b-92b809841339
       s: https://tst-srv-jdk11.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 on your system. The "j" argument is required for Java applications only. Not applicable for .NET 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

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).

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.

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.

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.

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.