diff --git a/README.md b/README.md index c8cfde45..e62edf96 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ - [Installing Liberty Features from local repository (19.0.0.8+)](#installing-liberty-features-from-local-repository-19008) - [Locally hosting feature repository](#locally-hosting-feature-repository) - [Using locally hosted feature repository in Dockerfile](#using-locally-hosted-feautre-repository-in-dockerfile) + - [Running Liberty MustGather](#running-liberty-mustgather) - [Known Issues](#known-issues) - [Issues and Contributions](#issues-and-contributions) - [License](#license) @@ -322,6 +323,19 @@ ARG VERBOSE=false RUN configure.sh ``` +## Running Liberty MustGather + +The [Liberty MustGather script](https://www.ibm.com/support/pages/mustgather-performance-hang-or-high-cpu-issues-liberty-linux) can be run within your container to collect critical data for debugging issues relating to performance degradation, hang, no response, hung threads, CPU starvation, high CPU utilization, or deadlocks with Liberty on Linux. + +Include the following snippet into your Dockerfile definition to install the required packages for running `linperf.sh` in the Liberty container. + +``` +# Temporarily provide root access to install required packages +USER 0 +RUN performance-data-setup.sh +USER 1001 +``` + # Known Issues For the list of known issues related to images, see the [Known Issues](https://github.com/OpenLiberty/ci.docker#known-issues) section for Open Liberty. diff --git a/ga/latest/kernel/helpers/build/performance-data-setup.sh b/ga/latest/kernel/helpers/build/performance-data-setup.sh new file mode 100755 index 00000000..8d0dc06c --- /dev/null +++ b/ga/latest/kernel/helpers/build/performance-data-setup.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +. /opt/ibm/helpers/build/internal/logger.sh + +set -Eeox pipefail + +pkgcmd=yum +if ! command $pkgcmd +then + pkgcmd=microdnf +fi + +$pkgcmd update -y +$pkgcmd install -y procps-ng net-tools ncurses hostname \ No newline at end of file