How to find container ID from process ID?

Solution Verified - Updated -

Issue

  • When there are same processes like httpd on Node, how to identify the container ID by the PID?

  • We are trying to identify which container processes by lsof, but ps aux outputs many httpd process so we cannot distinguish which PID matches to lsof.

Environment

  • Red Hat Enterprise Linux

    • 7.x
  • OpenShift Container Platform

    • 3.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content