Bug 429565

Summary: ps "comm" output does not work as advertised
Product: [Fedora] Fedora Reporter: Stepan Kasal <kasal>
Component: procpsAssignee: Tomas Smetana <tsmetana>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: oliver.henshaw
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-30 08:20:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.