How do I run top and ps commands inside middlware pod on OCP?
- How do I identify high CPU utilization by Java threads on OCP?
Container images such as
jboss-eap-7/eap74-openjdk11-openshift-rhel8, which are based on
ubi8, do not have
procps-ngpackage as follows:
[lab@master ~]$ oc rsh <mw-pod-name> sh-4.4$ top -b -n 1 -H -p <java-pid> sh: top: command not found sh-4.4$ ps sh: ps: command not found
CPU metrics such as
container_cpu_system_seconds_totalas cAdvisor metrics are collected by OpenShift Monitoring, but these metrics are in units of containers, and no cpu-usage metrics per thread in cAdvisor.
- Scraping interval of cpu utilization that can be referred in OpenShift monitoring stack is
30seconds, but I need to check cpu utilization at finer intervals to identify burst load for a couple of seconds.
- Is Ephemeral Containers supported in OpenShift?
- Red Hat OpenShift Container Platform (OCP)
- Middleware containers based on ubi8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.