Why does the command "lsof" run very slowly and consume high cpu

Solution Verified - Updated -

Issue

  • Executing lsof takes a very long time (up to several minutes)

  • Executing lsof consumes an entire CPU for a very long time

  • Executing lsof consumes several gigabytes of memory

Environment

  • Red Hat Enterprise Linux 7

    • lsof-4.87-6.el7 and later
  • Red Hat Enterprise Linux 8 and later

    • lsof

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