From owner-cvs-all Wed Apr 11 15:24:31 2001 Delivered-To: cvs-all@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id E472937B422; Wed, 11 Apr 2001 15:24:23 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from spike.unixfreak.org (spike [63.198.170.139]) by bazooka.unixfreak.org (Postfix) with ESMTP id 39B3C3E09; Wed, 11 Apr 2001 15:24:21 -0700 (PDT) To: Bruce Evans Cc: John Baldwin , Kirk McKusick , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Brian Somers Subject: Re: cvs commit: src/bin/ps ps.c In-Reply-To: ; from bde@zeta.org.au on "Wed, 11 Apr 2001 21:59:03 +1000 (EST)" Date: Wed, 11 Apr 2001 15:24:20 -0700 From: Dima Dorfman Message-Id: <20010411222421.39B3C3E09@bazooka.unixfreak.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce Evans writes: > On Tue, 10 Apr 2001, John Baldwin wrote: > > > [ more to Brian than to Kirk ] > > If all that is needed is a uniquifier for sessions, then why not use > > the actual session ID itself: s_sid? It's already provided in > > kinfo_proc as ki_sid even, ps(1) just doesn't use it at the moment. > > That is probably much easier to parse than a kernel address. > > I agree that this would be better. In fact, Kirk added both ki_sid and > ki_tsid. He apparently just forgot to actually use them :-). Then we're all in agreement. Now all we need is a patch. See attached. :-) Dima Dorfman dima@unixfreak.org Index: keyword.c =================================================================== RCS file: /st/src/FreeBSD/src/bin/ps/keyword.c,v retrieving revision 1.29 diff -u -r1.29 keyword.c --- keyword.c 2001/02/14 18:54:34 1.29 +++ keyword.c 2001/04/11 22:22:47 @@ -148,6 +148,8 @@ {"ruid", "RUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_ruid), UINT, UIDFMT}, {"ruser", "RUSER", NULL, LJUST|DSIZ, runame, s_runame, USERLEN}, + {"sid", "SID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_sid), UINT, + PIDFMT}, {"sig", "PENDING", NULL, 0, kvar, NULL, 8, KOFF(ki_siglist), INT, "x"}, {"sigcatch", "CAUGHT", NULL, 0, kvar, NULL, 8, KOFF(ki_sigcatch), UINT, "x"}, @@ -167,6 +169,8 @@ {"time", "TIME", NULL, USER, cputime, NULL, 9}, {"tpgid", "TPGID", NULL, 0, kvar, NULL, 4, KOFF(ki_tpgid), UINT, PIDFMT}, + {"tsid", "TSID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_tsid), UINT, + PIDFMT}, {"tsiz", "TSIZ", NULL, 0, tsize, NULL, 4}, {"tt", "TT ", NULL, 0, tname, NULL, 4}, {"tty", "TTY", NULL, LJUST, longtname, NULL, 8}, Index: ps.1 =================================================================== RCS file: /st/src/FreeBSD/src/bin/ps/ps.1,v retrieving revision 1.32 diff -u -r1.32 ps.1 --- ps.1 2001/04/07 11:22:26 1.32 +++ ps.1 2001/04/11 22:22:47 @@ -430,6 +430,8 @@ .Tn ID .It ruser user name (from ruid) +.It sid +session ID .It sig pending signals (alias pending) .It sigcatch @@ -457,6 +459,8 @@ .Tn ID .\".It trss .\"text resident set size (in Kbytes) +.It tsid +control terminal session ID .It tsiz text size (in Kbytes) .It tt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message