Bug 429565 - ps "comm" output does not work as advertised
ps "comm" output does not work as advertised
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: procps (Show other bugs)
rawhide
All Linux
medium Severity low
: ---
: ---
Assigned To: Tomas Smetana
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-21 12:41 EST by Stepan Kasal
Modified: 2011-10-08 08:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-30 03:20:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stepan Kasal 2008-01-21 12:41:32 EST
Description of problem:
The "comm" field (real executable name) is always truncated to 15 chars, though
the man page says it ends at column 80.
Moreover, neither of the two documented ways to widen it works (option "w" nor
setting COLUMNS).

Version-Release number: procps-3.2.7-19.1.fc9

Always reproducible: "ps axo comm", "ps axwwo comm", "COLUMNS=120 ps axo comm"
The output is truncated to 15 columns, in all cases, while it should not be.
Comment 1 Tomas Smetana 2008-01-22 03:19:55 EST
You're right.  I'll take a look at it.
Comment 2 Tomas Smetana 2008-01-22 06:12:35 EST
The "comm" field is taken from /proc/<num>/stat and it's truncated even there.
I'm really not sure whether the real executable name can be retrieved somewhere
else in general.
Comment 3 Tomas Smetana 2008-01-30 03:20:29 EST
I don't think the real executable's name is written somewhere in untruncated
form.  If you don't think so, reopen.
Comment 4 Oliver Henshaw 2011-10-08 08:48:38 EDT
Noticed this bug while researching bug #744406.

It seems that the length of comm is limited to TASK_COMM_LEN, this is set to 16 by the kernel. /proc/<num>/command seems to contain the full path to the command with all arguments.

Note You need to log in before you can comment on or make changes to this bug.