From rwatson@tislabs.com  Tue Feb 27 14:30:50 2001
Return-Path: <rwatson@tislabs.com>
Received: from sentry.gw.tislabs.com (sentry.gw.tislabs.com [192.94.214.100])
	by hub.freebsd.org (Postfix) with ESMTP id DE8C337B71B
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Feb 2001 14:30:49 -0800 (PST)
	(envelope-from rwatson@tislabs.com)
Received: by sentry.gw.tislabs.com; id QAA28743; Tue, 27 Feb 2001 16:30:05 -0500 (EST)
Received: from sproing.gw.tislabs.com(10.33.40.80) by sentry.gw.tislabs.com via smap (V5.5)
	id xma028707; Tue, 27 Feb 01 16:30:02 -0500
Received: (from rwatson@localhost)
	by sproing.gw.tislabs.com (8.11.2/8.11.2) id f1RLU3R00762;
	Tue, 27 Feb 2001 16:30:03 -0500 (EST)
	(envelope-from rwatson)
Message-Id: <200102272130.f1RLU3R00762@sproing.gw.tislabs.com>
Date: Tue, 27 Feb 2001 16:30:03 -0500 (EST)
From: rwatson@freebsd.org
Reply-To: rwatson@freebsd.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: ps: sess: keyword not found
X-Send-Pr-Version: 3.113

>Number:         25435
>Category:       bin
>Synopsis:       ps -j asks for "sess" keyword, no longer defined
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 27 14:40:01 PST 2001
>Closed-Date:    Fri Apr 6 20:18:26 PDT 2001
>Last-Modified:  Fri Apr 06 20:18:59 PDT 2001
>Originator:     
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
NAI Labs
>Environment:
System: FreeBSD sproing.gw.tislabs.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Tue Feb 27 15:45:03 EST 2001 rwatson@sproing.gw.tislabs.com:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:

Just upgraded to recent current (this morning), and found that ps with the
-j parameter gives a warning about the "sess" (session leader) keyword
being undefined:

>How-To-Repeat:

sproing:~> ps ajx
ps: sess: keyword not found
USER      PID  PPID  PGID JOBC STAT  TT       TIME COMMAND
root        0     0     0    0 DWLs  ??    0:00.00  (swapper)
root        1     0     1    0 DWLs  ??    0:00.01 /sbin/init -d
...

>Fix:

No clear.  In any case, the "-j" arguments were not updated for whatever
removal of session leader from the list of valid fields when that occurred.

>Release-Note:
>Audit-Trail:

From: Dima Dorfman <dima@unixfreak.org>
To: rwatson@freebsd.org
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/25435: ps: sess: keyword not found 
Date: Tue, 27 Feb 2001 20:40:23 -0800

 > >Number:         25435
 > >Category:       bin
 > >Synopsis:       ps -j asks for "sess" keyword, no longer defined
 > 
 > No clear.  In any case, the "-j" arguments were not updated for whatever
 > removal of session leader from the list of valid fields when that occurred.
 
 Indeed, mckusick didn't update the -j arguments or the manual page
 when he introduced kproc_info.  The attached patch removes all
 references to keywords removed by that commit from the source and
 manual page.
 
 					Dima Dorfman
 					dima@unixfreak.org
 
 
 Index: ps.1
 ===================================================================
 RCS file: /st/src/FreeBSD/src/bin/ps/ps.1,v
 retrieving revision 1.30
 diff -u -r1.30 ps.1
 --- ps.1	2001/02/01 16:24:50	1.30
 +++ ps.1	2001/02/28 04:36:29
 @@ -99,7 +99,7 @@
  header per page of information.
  .It Fl j
  Print information associated with the following keywords:
 -user, pid, ppid, pgid, sess, jobc, state, tt, time and command.
 +user, pid, ppid, pgid, jobc, state, tt, time and command.
  .It Fl L
  List the set of available keywords.
  .It Fl l
 @@ -367,8 +367,6 @@
  job control count
  .It ktrace
  tracing flags
 -.It ktracep
 -tracing vnode
  .It lim
  memoryuse limit
  .It logname
 @@ -400,8 +398,6 @@
  wait channel (as an address)
  .It oublk
  total blocks written (alias oublock)
 -.It p_ru
 -resource usage (valid only for zombie)
  .It paddr
  swap address
  .It pagein
 @@ -427,8 +423,6 @@
  reverse link on run queue, or 0
  .It rss
  resident set size
 -.It rsz
 -resident set size + (text size / text use count) (alias rssize)
  .It rtprio
  realtime priority (101 = not a realtime process)
  .It ruid
 @@ -436,8 +430,6 @@
  .Tn ID
  .It ruser
  user name (from ruid)
 -.It sess
 -session pointer
  .It sig
  pending signals (alias pending)
  .It sigcatch
 Index: ps.c
 ===================================================================
 RCS file: /st/src/FreeBSD/src/bin/ps/ps.c,v
 retrieving revision 1.34
 diff -u -r1.34 ps.c
 --- ps.c	2001/01/24 12:59:50	1.34
 +++ ps.c	2001/02/28 04:36:29
 @@ -104,7 +104,7 @@
  static uid_t	*getuids(const char *, int *);
  
  char dfmt[] = "pid tt state time command";
 -char jfmt[] = "user pid ppid pgid sess jobc state tt time command";
 +char jfmt[] = "user pid ppid pgid jobc state tt time command";
  char lfmt[] = "uid pid ppid cpu pri nice vsz rss wchan state tt time command";
  char   o1[] = "pid";
  char   o2[] = "tt state time command";

From: Dima Dorfman <dima@unixfreak.org>
To: Dima Dorfman <dima@unixfreak.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/25435: ps: sess: keyword not found 
Date: Tue, 27 Feb 2001 21:37:38 -0800

 >  Indeed, mckusick didn't update the -j arguments or the manual page
 >  when he introduced kproc_info.  The attached patch removes all
 
 This should be kinfo_proc, of course.
 
 					Dima Dorfman
 					dima@unixfreak.org
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Fri Apr 6 20:18:26 PDT 2001 
State-Changed-Why:  
Fixed by brian in rev. 1.37 of bin/ps/ps.c (about time, too, 
considering I sent a patch for this almost one and a half months ago). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25435 
>Unformatted:
