Bug 429565 - ps "comm" output does not work as advertised
Summary: ps "comm" output does not work as advertised
Alias: None
Product: Fedora
Classification: Fedora
Component: procps
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tomas Smetana
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-01-21 17:41 UTC by Stepan Kasal
Modified: 2011-10-08 12:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-01-30 08:20:29 UTC
Type: ---

Attachments (Terms of Use)

Description Stepan Kasal 2008-01-21 17:41:32 UTC
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 08:19:55 UTC
You're right.  I'll take a look at it.

Comment 2 Tomas Smetana 2008-01-22 11:12:35 UTC
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 08:20:29 UTC
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 12:48:38 UTC
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.