Bug 208217

Summary: command "ps jax --sort=uid,-ppid,+pid" fails
Product: [Fedora] Fedora Reporter: Al Danial <al.danial>
Component: procpsAssignee: Tomas Smetana <tsmetana>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: albert
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 3.2.7-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-23 11:55:27 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 Al Danial 2006-09-27 03:29:41 UTC
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 11:12:07 UTC
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 09:06:00 UTC
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-08 02:21:38 UTC
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 17:13:31 UTC
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.