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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.