Date: Tue, 28 Jan 2003 16:20:03 -0800 (PST) From: Ken Stailey <kstailey@bsdlab.tf-md.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/46232: ps(1) re an sl fields are broken Message-ID: <200301290020.h0T0K3cr052640@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR bin/46232; it has been noted by GNATS.
From: Ken Stailey <kstailey@bsdlab.tf-md.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc:
Subject: Re: bin/46232: ps(1) re an sl fields are broken
Date: Tue, 28 Jan 2003 19:08:46 -0500 (EST)
Yet more evidence:
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#ifndef lint
char copyright[] =
"@(#) Copyright (c) 1980 Regents of the University of California.\n\
All rights reserved.\n";
#endif not lint
#ifndef lint
static char sccsid[] = "@(#)ps.c 5.15 (Berkeley) 4/13/88";
#endif not lint
[...skip ahead...]
=
" SIZE PID TT STAT TIME SL RE PAGEIN SIZE RSS LIM TSIZ TRS %CPU %MEM"+5;
vpr(sp)
struct savcom *sp;
{
register struct vsav *vp = sp->s_un.vp;
register struct asav *ap = sp->ap;
printf("%5u ", ap->a_pid);
ptty(ap->a_tty);
printf(" %-2.3s", state(ap));
ptime(ap);
printf(" %2d %2d %6d %5d %5d",
ap->a_slptime > 99 ? 99 : ap-> a_slptime,
ap->a_time > 99 ? 99 : ap->a_time, vp->v_majflt,
pgtok(ap->a_size), pgtok(ap->a_rss));
if (ap->a_maxrss == (RLIM_INFINITY/NBPG))
printf(" xx");
else
printf(" %5d", pgtok(ap->a_maxrss));
printf(" %4d %3d %4.1f %4.1f",
pgtok(ap->a_tsiz), pgtok(ap->a_txtrss), vp->v_pctcpu, pmem(ap));
}
Do you see what vpr() from pre-reno 4.3BSD is doing to the RE and SL
fields? It's limited them to 99 max which is analogous to the modern
one limiting RE and SL to 127. The man page for post-4.3BSD-reno and
beyond says:
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\"
.Dd April 18, 1994
.Dt PS 1
.Os BSD 4
[...skip ahead...]
.It re
core residency time (in seconds; 127 = infinity)
.It rgid
[...skip ahead...]
.It sl
sleep time (in seconds; 127 = infinity)
.It start
but it was never implemented, just documented. That's what you get
for writing the documentation first as a specification instead of
blindly hacking code (just kidding.)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301290020.h0T0K3cr052640>
