Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jun 2002 05:23:45 +0200
From:      Cyrille Lefevre <cyrille.lefevre@laposte.net>
To:        "Tim J. Robbins" <tjr@FreeBSD.org>
Cc:        "J. Mallett" <jmallett@FreeBSD.org>, standards@FreeBSD.org
Subject:   Re: cvs commit: www/en/projects/c99 index.sgml
Message-ID:  <20020611032345.GC14401@gits.dyndns.org>
In-Reply-To: <20020607123628.A60618@treetop.robbins.dropbear.id.au>
References:  <200206070217.g572HH584853@freefall.freebsd.org> <20020606194448.A23497@FreeBSD.ORG> <20020607123628.A60618@treetop.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 07, 2002 at 12:36:28PM +1000, Tim J. Robbins wrote:
> On Thu, Jun 06, 2002 at 07:44:49PM -0700, J. Mallett wrote:
> 
> > Which essentially means:  If you have patches for ps(1) wrt SUSv3 conformance,
> > or want to discuss which options of ours should go in favor of SUSv3 ones that
> > conflict, which should be optional, etc., speak up.
> 
> My opinion is that we shouldn't remove the traditional BSD options where
> they conflict with the XSI extensions. POSIX.2 UPE conformance would be
> a good thing, though.
> 
> Here is the synopsis from P1003.2a:
> 
>  5.23.1  Synopsis
> 
>  ps  [-aA] [-G grouplist] [-o format] ...  [-p proclist] [-t termlist]
>      [-U userlist]
> 
> We are missing -A and -G, and the -p and -o options may have other problems.

that's not so simple. even "compatible" options may differ in their
output or whatever. let's try -j, -l, and -u.

$ ps -j
USER   PID  PPID  PGID   SESS JOBC STAT  TT       TIME COMMAND
root  1326     1    74 c0efca80    0 I     p0-   0:00.22 /bin/sh /etc/rc.local.n
e
$ ps -l
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
      0  1326     1  16  10  0   712  304 wait   I     p0-   0:00.22 /bin/sh /etc
$ ps -u
USER   PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
root 16604  0.0  0.5   804  572  v1  R+    5:15AM   0:00.00 -ksh (ksh)

$ ps5 -j
ps5: sid: keyword not found
  PID  PGID  TT       TIME COMMAND
   1326    74  p0-  00:00:00 sh
(oop! incomplete work, sid is missing, forgot about that)
$ ps5 -l
      F    S   UID   PID  PPID C PRI  NI     ADDR   VSZ WCHAN    TT       TIME COMMAND
	   86 I        0  1326     1 0  32   0 c84c6ba0   712 wait     p0-  00:00:00 sh
$ ps5 -u
(different meaning)

also, the current ps(1) implementation is a lot ugly when combining
format options, let's try -lu :

$ ps -lu
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
    USER   PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
    0 16635  8064   1  28  0   236  104 -      R+    v1    0:00.01 head -2
    root 16635  0.0  0.1   236  104  v1  R+    5:20AM   0:00.01 head -2

compared to :

$ ps -Blu
USER   UID   PID  PPID CPU PRI  NI %CPU %MEM   VSZ   RSS WCHAN    TT  STAT START
ED      TIME COMMAND
root     0 16636  8064   2  28   0  0.0  0.3   504   332 -        v1  R+    5:21
AM   0:00.00 ps5 -Blu

-B stands for BSD ps(1) option treatment. see my previous post about that.

Cyrille.
-- 
Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020611032345.GC14401>