Why does the ps command truncate the command line to display only 4096 bytes?

Solution Unverified - Updated -

Issue

  • Some processes in system have very long command lines. When one tries to list the all parameters of those long parameters processes using ps aux or ps -ef command, only 4096 bytes of the command line are displayed and the rest is truncated.
  • Why does /proc/<pid>/cmdline truncate a command line longer than 4K?

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • procps
  • kernel

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.