Your message dated Thu, 23 Sep 2010 14:03:07 +1000
with message-id <[email protected]>
and subject line Re: Bug#597748: "ps -o" incorrectly truncates fields
has caused the Debian Bug report #597748,
regarding "ps -o" incorrectly truncates fields
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
597748: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597748
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: procps
Version: 3.2.8-9
According to the POSIX spec for the "-o" option of the ps command
(http://www.opengroup.org/onlinepubs/9699919799/utilities/ps.html):
"The field widths shall be selected by the system to be at least as
wide as the header text (default or overridden value)."
The 3.2.8 version of procps violates this specification. To reproduce:
ln -s /bin/sleep hellohellohowareyou # Create command with long name
./hellohellohowareyou 180 & # run it in the background
ps -o comm=XXXXXXXXXXXXXXXXXXXX # Do "ps -o" with a wide field header
You will find the process name gets truncated to 15 characters
("hellohellohowar") no matter how wide you make the overridden header
text.
This actually caused me some trouble with an old shell script I am
migrating from Solaris, which does not have this bug.
Thanks!
--- End Message ---
--- Begin Message ---
On Wed, Sep 22, 2010 at 11:04:21AM -0700, Patrick J. LoPresti wrote:
> ps -o comm=XXXXXXXXXXXXXXXXXXXX # Do "ps -o" with a wide field header
comm is always a maximum of 15 characters, the field you are looking for
is cmd.
$ ps -o cmd=OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO,pid
27933
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO PID
/bin/sh ./xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 27933
There's two different strings, often they are the same but at times
they're different. Users of killall get stuck here sometimes too.
If you are looking for a process, pgrep is often better.
- Craig
--
Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/ csmall at : enc.com.au
http://www.debian.org/ Debian GNU/Linux, software should be Free
--- End Message ---