Bug 208217 - command "ps jax --sort=uid,-ppid,+pid" fails
command "ps jax --sort=uid,-ppid,+pid" fails
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: procps (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Smetana
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-26 23:29 EDT by Al Danial
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 3.2.7-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-23 07:55:27 EDT
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 Al Danial 2006-09-26 23:29:41 EDT
Description of problem:

Line 495 from the ps man page has the example "ps jax --sort=uid,-ppid,+pid". 
When entering this command however FC5 says "ERROR: Unknown sort specifier." 
I'm pretty sure this worked in RHEL 3 so I doubt it is a documentation bug. 
Looks like the --sort option in ps has a bug.


Version-Release number of selected component (if applicable):

procps version 3.2.6

How reproducible:
Very.  Happens every time.

Steps to Reproduce:
1.  ps jax --sort=uid,-ppid,+pid
2.
3.
  
Actual results:

ERROR: Unknown sort specifier.
********* simple selection *********  ********* selection by list *********
-A all processes                      -C by command name
-N negate selection                   -G by real group ID (supports names)
-a all w/ tty except session leaders  -U by real user ID (supports names)
-d all except session leaders         -g by session OR by effective group name
-e all processes                      -p by process ID
T  all processes on this terminal     -s processes in the sessions given
a  all w/ tty, including other users  -t by tty
g  OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
r  only running processes             U  processes for specified users
x  processes w/o controlling ttys     t  by tty
*********** output format **********  *********** long options ***********
-o,o user-defined  -f full            --Group --User --pid --cols --ppid
-j,j job control   s  signal          --group --user --sid --rows --info
-O,O preloaded -o  v  virtual memory  --cumulative --format --deselect
-l,l long          u  user-oriented   --sort --tty --forest --version
-F   extra full    X  registers       --heading --no-heading --context
                    ********* misc options *********
-V,V  show version      L  list format codes  f  ASCII art forest
-m,m,-L,-T,H  threads   S  children in sum    -y change -l format
-M,Z  security data     c  true command name  -c scheduling class
-w,w  wide output       n  numeric WCHAN,UID  -H process hierarchy

Expected results:

Sorted output from ps.

Additional info:
Comment 1 Karel Zak 2006-09-27 07:12:07 EDT
It seems almost all sort examples from the ps man page are broken. 

(Upstream maintainer added to CC)
Comment 2 Tomas Smetana 2007-05-07 05:06:00 EDT
Seems that 'ps' didn't like the '+' sign in a sort specifier (even in 3.2.7
version). I've commited the fix. It should be present in next release.
Comment 3 Fedora Update System 2007-05-07 22:21:38 EDT
procps-3.2.7-2.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 4 Fedora Update System 2007-05-14 13:13:31 EDT
procps-3.2.7-2.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

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