History log of /freebsd-current/bin/ps/keyword.c
Revision Date Author Comments
# e043f372 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 90aea514 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 2423585b 19-Jul-2021 Alex Richardson <arichardson@FreeBSD.org>

bin/ps: Avoid function name conflict with libc uname()

This prevents ps from being built with address sanitizer instrumentation.

Reviewed By: trasz
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31048


# 4f47f511 27-Jun-2020 Piotr Pawel Stefaniak <pstef@FreeBSD.org>

ps(1): reuse keyword "cpu" to show CPU number

This flag will now show the processor number on which a process is running.

This change was inspired by PR129965. Initially I didn't think that the
patch attached to it was correct -- it sacrificed ki_estcpu use in "cpu"
for ki_lastcpu and I thought that the old functionality should be kept and
the new (cpu#) one added to it. But I've since discovered that ki_estcpu is
sched_4bsd-specific. What's worse, it represents the same thing as
ki_pctcpu, except ki_pctcpu is universal -- so "%cpu" has been using it
successfully. Therefore, I've decided to replace information based on
ki_estcpu with information based on ki_oncpu/ki_lastcpu.

Key parts of the code and manual changes were borrowed from top(1).

PR: 129965
Reported by: Nikola Knežević
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25377


# aa8ab146 07-Jun-2020 Yuri Pankov <yuripv@FreeBSD.org>

ps: use %hs instead of %s format specifiers

Use %hs (locale-based encoding) instead of %s (UTF-8) format for
strings that are expected to be in current locale encoding (date/time,
process names/argument list).

PR: 241491
Reviewed by: phil
Differential Revision: https://reviews.freebsd.org/D22160


# 2f5a9b76 13-Mar-2018 John Baldwin <jhb@FreeBSD.org>

Add a "jail" keyword to list the name of a jail rather than its ID.

Inspired by: mwlucas
Reviewed by: jamie
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14683


# faf5dd87 23-Jan-2018 John Baldwin <jhb@FreeBSD.org>

Remove some KSE references from ps(1).

- Simplify the description of -H to assume 1:1 threading.
- Drop 'process' from description of 'lwp' field and the corresponding
XO field name.
- Do add an expansion of LWP in the description of 'lwp' and 'nlwps'.
- Add 'tid' as an alias for the 'lwp' field.

Reviewed by: imp, kib (older version)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14021


# 53606209 01-Dec-2017 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add "vmaddr" ps(1) keyword.

Obtained from: CheriBSD
MFC after: 2 weeks
Sponsored by: DARPA, AFRL


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# 4363782b 09-Oct-2017 Edward Tomasz Napierala <trasz@FreeBSD.org>

Undocument "tdnam" (leaving it as an alias), and rename the column
to TDNAME.

Suggested by: bde
MFC after: 2 weeks
Sponsored by: DARPA, AFRL


# 42ee5c33 09-Oct-2017 Edward Tomasz Napierala <trasz@FreeBSD.org>

Fix long name (used by libxo) for the "tdnam" ps(1) keyword.

Reported by: pluknet
MFC after: 2 weeks
Sponsored by: DARPA, AFRL


# a8373a7c 09-Oct-2017 Edward Tomasz Napierala <trasz@FreeBSD.org>

Document "tdnam" keyword to ps(1), and add "tdname" alias.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 45ed6753 01-Jun-2016 Conrad Meyer <cem@FreeBSD.org>

ps(1): Expand variables to match expanded fields

ki_flag and ki_tdflag have been 'long', not 'int', since 2000 and 2005,
respectively.

Submitted by: Shawn Wills <swills at isilon dot com>
Sponsored by: EMC / Isilon Storage Division


# 8beb1a2f 22-May-2015 Marcel Moolenaar <marcel@FreeBSD.org>

Convert to use libxo. Document use of libxo as well.

Obtained from: Phil Shafer <phil@juniper.net>
Sponsored by: Juniper Networks, Inc.


# 8b04bbef 28-Aug-2014 Mateusz Guzik <mjg@FreeBSD.org>

Return real parent pid in kinfo (used by e.g. ps)

Add a separate field which exports tracer pid and add a new keyword
("tracer") for ps to display it.

This is a follow up to r270444.

Reviewed by: kib
MFC after: 1 week
Relnotes: yes


# 38d22923 06-Jun-2014 Sergey Kandaurov <pluknet@FreeBSD.org>

Add support for inspecting process flags set in p_flag2.

Reviewed by: jhb
MFC after: 1 week


# 5e9ccc87 26-Aug-2013 Will Andrews <will@FreeBSD.org>

Add the ability to display the default FIB number for a process to the
ps(1) utility, e.g. "ps -O fib".

bin/ps/keyword.c:
Add the "fib" keyword and default its column name to "FIB".

bin/ps/ps.1:
Add "fib" as a supported keyword.

sys/compat/freebsd32/freebsd32.h:
sys/kern/kern_proc.c:
sys/sys/user.h:
Add the default fib number for a process (p->p_fibnum)
to the user land accessible process data of struct kinfo_proc.

Submitted by: Oliver Fromme <olli@fromme.com>, gibbs


# 38f2be1c 17-Sep-2012 Andrey Zonov <zont@FreeBSD.org>

- Add 'dsiz' and 'ssiz' keywords to show data and stack size respectively.

Approved by: kib (mentor)
MFC after: 1 week


# 4f1e1f86 23-May-2012 Konstantin Belousov <kib@FreeBSD.org>

Add 'cow' keyword to show per-process cow count.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week


# 1d1143ec 29-Sep-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Make ps(1) automatically size its column widths.


# 925af544 18-Jul-2011 Bjoern A. Zeeb <bz@FreeBSD.org>

Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.
Provide backward compatibility defines under BURN_BRIDGES.

Suggested by: jhb
Reviewed by: emaste
Sponsored by: Sandvine Incorporated
Approved by: re (kib)


# 9acd9127 14-Jun-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add "gid" and "group" keywords to display the effective group ID
and effective group name. Also, add "egid", "egroup" and "euid" aliases.

PR: bin/146331
Submitted by: Jeremie Le Hen <jeremie at le-hen dot org>


# 649fde88 12-Apr-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Get rid of DSIZ; instead just call the sizing function if provided.


# f9db2550 24-Mar-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add proper width calculation for time fields (time, cputime and usertime).
This fixes the ugly overflow in "ps aux" output for "[idle]".


# 3bf92dec 24-Mar-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Make "LOGIN" and "CLASS" columns width scale properly instead of wasting space.


# a870bf2c 17-Mar-2011 Konstantin Belousov <kib@FreeBSD.org>

Implement the usertime and systime keywords for ps, printing the
corresponding times reported by getrusage().

Submitted by: Dan Nelson <dnelson allantgroup com>
MFC after: 1 week


# 7123f4cd6 05-Mar-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Export login class information via kinfo and make it possible to view
it using "ps -o class".


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 6239ef1d 07-Oct-2010 Ed Maste <emaste@FreeBSD.org>

Make a thread's address available via the kern proc sysctl, just like the
process address.

Add "tdaddr" keyword to ps(1) to display this thread address.

Distilled from Sandvine's patch set by Mark Johnston.


# ab8d4d57 24-Jul-2010 Edward Tomasz Napierala <trasz@FreeBSD.org>

Fix alignment for the 'flags' label, and make more room for 'tdev'.

MFC after: 1 month


# 41ded75d 17-Mar-2010 Juli Mallett <jmallett@FreeBSD.org>

o) Add a keyword to displaying elapsed time in integer seconds, "etimes".
o) Give slightly better (i.e. any) documentation of the format of "etime".

Reviewed by: jilles


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# c8cfdb07 24-Nov-2009 Alexander Leidinger <netchild@FreeBSD.org>

MFC r199351:
Fix small resource leak (memory).

Reviewed by: gad


# 5b412ffb 17-Nov-2009 Alexander Leidinger <netchild@FreeBSD.org>

Fix small resource leak (memory).

Reviewed by: gad
MFC after: 1 week


# 1575bd0a 03-Nov-2009 Xin LI <delphij@FreeBSD.org>

Increase width for %CPU, RSS and VSZ columns for now. Modern systems
tend to have larger memory, larger process, and more CPU.


# 4610a811 26-Feb-2009 Attilio Rao <attilio@FreeBSD.org>

[1] When showing threads, the thread name just appears if the comm
label is choosen as last printout (ucomm suffers of this such bug
too). That bug is caused by the fact that the fixed size of
printout doesn't leave enough space for them to be printed out.
Implement ucomm and comm commands with a dynamic size lenght for
buffers.

[2] On AMD64 architecture pointers don't have enough chars space to
be shown (8 chars while they need 16). Fix them by providing
a variadic space so that it fits well on both 64 and 32 bits
architectures.

[3] Check a return value of malloc() that wasn't checked before.

PR: bin/128841, bin/128842
Reviewed by: jhb, emaste
Sponsored by: Sandvine Incorporated


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# c36b9f62 28-Oct-2007 Julian Elischer <julian@FreeBSD.org>

fix sorting of 'tdnam' keyword in keyword list.


# 7ab24ea3 26-Oct-2007 Julian Elischer <julian@FreeBSD.org>

Introduce a way to make pure kernal threads.
kthread_add() takes the same parameters as the old kthread_create()
plus a pointer to a process structure, and adds a kernel thread
to that process.

kproc_kthread_add() takes the parameters for kthread_add,
plus a process name and a pointer to a pointer to a process instead of just
a pointer, and if the proc * is NULL, it creates the process to the
specifications required, before adding the thread to it.

All other old kthread_xxx() calls return, but act on (struct thread *)
instead of (struct proc *). One reason to change the name is so that
any old kernel modules that are lying around and expect kthread_create()
to make a process will not just accidentally link.

fix top to show kernel threads by their thread name in -SH mode
add a tdnam formatting option to ps to show thread names.

make all idle threads actual kthreads and put them into their own idled process.
make all interrupt threads kthreads and put them in an interd process
(mainly for aesthetic and accounting reasons)
rename proc 0 to be 'kernel' and it's swapper thread is now 'swapper'

man page fixes to follow.


# 6331f11e 05-Apr-2006 Garance A Drosehn <gad@FreeBSD.org>

Re-correct commit 1.73, but this time in a way that does not cause
all column-headers to print in lowercase by default. I was in too
much of a rush in committing 1.75, and didn't notice that the case
had changed. This time I did considerably more testing, and used
'diff' instead of just quickly eyeballing the results...

Apologies. I expect this means the dunce cap is mine for awhile.
If this doesn't work, I'll just drop back to 1.72 and hide under
my desk for awhile.


# a9f48b44 05-Apr-2006 Garance A Drosehn <gad@FreeBSD.org>

Fix a problem introduced by change 1.73, which causes a seg-fault if
the user specifies a keyword which is an alias to some other keyword.
E.g.: stat (for state) or pcpu (for %cpu)..

Submitted by: Kostik Belousov
MFC plans: "soon"


# 88985aed 08-Mar-2006 Garance A Drosehn <gad@FreeBSD.org>

Collapse strncpy/strncat/strncat into a single snprintf, as suggested
by pjd.

MFC after: 3 weeks


# ec716487 08-Mar-2006 Garance A Drosehn <gad@FreeBSD.org>

Fix the case where the user specifies an alternate heading for some
output-format keyword, and the keyword they picked is an alias to
some other keyword. E.g.: ps -o stat=Zustand $$
('stat' is defined as an alias for 'state')

PR: bin/57833
MFC after: 3 weeks


# a990344f 20-Mar-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Add and document the 'jid' keyword for the '-o' option.

Reviewed by: gad
MFC after: 3 days


# 237d4cef 06-Feb-2005 Christian S.J. Peron <csjp@FreeBSD.org>

Since it is not un-common for a process's resident set size (rss)
to exceed 10 megabytes in size (especially in X), bump the max
column width from 4 bytes to 5. This will make the ps auxw output
uniform again when a process's rss exceeds 10 megs.

It should be noted that when 5 digits becomes to small, other
solutions should be explored such as displaying them in megabytes
or having ps automatically re-size column widths.

Discussed with: gad
MFC after: 1 week


# bdf8ab46 23-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Change "struct varent" to use the standard queue(8) macros, instead of
using it's own version of the same basic algorithm.

Submitted by: part by Cyrille Lefevre, part of it done by me


# 820434b2 23-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Make sure the value of "upr" (scheduling priority on return from system call)
is scaled in the same way that "pri" (scheduling priority) is scaled.

Submitted by: Cyrille Lefevre


# 15b87b53 20-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Add the `-O emul' format option, which prints the name of the system-call
emulation environment the process is in. "emul" as a keyword is picked
up from OpenBSD.

PR: bin/65803
Submitted by: Cyrille Lefevre


# 76adc1fd 20-Jun-2004 Garance A Drosehn <gad@FreeBSD.org>

Add new output-format keywords of LWP and NLWP, which show the thread-id
and number-of-threads tied to a process. Result can be seen by typing,
e.g.: ps -HO lwp,nlwp
These new options are not documented yet. More options will be coming,
and I will update the man page after I get farther along.

PR: bin/65803 (though adjusted to fit our present source)
Submitted by: Cyrille Lefevre


# 6195fb41 06-Apr-2004 Mark Murray <markm@FreeBSD.org>

Remove clause 3 from the UCB licenses.

OK'ed by: imp, core


# 7cb9663b 08-Feb-2004 Juli Mallett <jmallett@FreeBSD.org>

MFp4 @46705:

Support "uprocp" exactly like "paddr" with the former having been
documented in the manual but not implemented.

PR: 42484


# de244df7 13-Aug-2003 Hartmut Brandt <harti@FreeBSD.org>

Implement the nwchan keyword that has been in the man page, but was
not implemented. This is just handy if you want to ddb the address
some process is waiting on.


# e2c9ac69 12-Apr-2003 Tim J. Robbins <tjr@FreeBSD.org>

Display residency and sleep times (re and sl fields) larger than 127 as 127.
This is what the manual page says ps should do, and what OpenBSD and NetBSD do.
Based on a patch from Ken Stailey.

PR: 27433, 46232


# 6f15bc16 05-Feb-2003 Maxim Sobolev <sobomax@FreeBSD.org>

Fix slight disorder that broke sorting. Put in bold warning about the
fact that in this case order matters.

Submitted by: Peter Edwards <pmedwards@eircom.net>


# eaed5652 05-Feb-2003 Philippe Charnier <charnier@FreeBSD.org>

Display elapsed time (-o etime) using [[dd-]hh:]mm:ss, which according to
Solaris man page is the POSIX way.

Reviewed by: jmallett


# 78b1878a 18-Jan-2003 Juli Mallett <jmallett@FreeBSD.org>

Per-variable\ entry headers, to allow the 'ps -otime -otime=FOO' or similar
case to do the right thing and affect exactly one column. This is consistent
with GNU ps(1) in BSD mode, and POLA.


# fde411d5 18-Jan-2003 Juli Mallett <jmallett@FreeBSD.org>

When inserting a non-user-specified (e.g. not via -o or -O) format, don't dupe
one that is already there. This is consistent with GNU ps(1)'s BSD mode, and
POLA.

Reported by: Andy Farkas <andyf@speednet.com.au>
Tested by: Andy Farkas <andyf@speednet.com.au>


# 2af538eb 23-Oct-2002 Robert Watson <rwatson@FreeBSD.org>

Use the MAC interface to list process MAC labels rather than using
the LOMAC-specific interface (which is being deprecated). The
revised LOMAC using the MAC framework will export levels listable
using this mechanism.

Approved by: re
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories


# 0d632649 02-Oct-2002 John Baldwin <jhb@FreeBSD.org>

Catch up to SMTX -> SLOCK changes.


# 8dd2eb05 26-Sep-2002 Juli Mallett <jmallett@FreeBSD.org>

List valid keywords, ala kill(1), rather than the csh builtin kill, which
tells people to type kill -l, when no valid ones are specified.

Sponsored by: Bright Path Solutions
MFC after: 4 days


# 36b025da 26-Sep-2002 Juli Mallett <jmallett@FreeBSD.org>

Ala kill(1), tell people to type 'ps -L' for a list of format keywords.

Sponsored by: Rachel Hestilow <rachel@jerkcity.com>
MFC after: 2 weeks


# 362d62ba 17-Sep-2002 Juli Mallett <jmallett@FreeBSD.org>

Rename new PLONG type to PGTOK as the conversion is more important than the
size (which is mostly undefined anyway).

Submitted by: bde


# 760bbf7d 16-Sep-2002 Juli Mallett <jmallett@FreeBSD.org>

Conglomerate printing of ps_pgtok'd data into a PLONG type. I couldn't think
of a better name, except PINT, but I decided to go with assuming LONG to
be safe, rather than assuming INT.


# f3073b05 16-Sep-2002 Juli Mallett <jmallett@FreeBSD.org>

Perform keyword.c:1.27 properly, implement -orss in the New World Order of
ps(1) formatting, using pgtok() to get the value in K, rather than printing
it in pages. This is consistent with behaviour before keyword.c:1.26 (et al)
which exists in STABLE today, and which uses the same metric as VSZ.

Submitted by: bde


# 4086fd8e 16-Sep-2002 Juli Mallett <jmallett@FreeBSD.org>

Remove some NOTINUSE stuff. Good housekeeping.


# a755f1c9 08-Jul-2002 Robert Drehmel <robert@FreeBSD.org>

- Use (MAXLOGNAME - 1) where UT_NAMESIZE was used to be able to
(-)remove the inclusions of <utmp.h>.


# 2749b141 29-Jun-2002 David E. O'Brien <obrien@FreeBSD.org>

Consistently use FBSDID


# 2dda9fe9 08-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

Allow whitespace to act as a delimiter in the keywords list given to the -o,
again, but also allow it in the user-specified header, too. This is far more
backwards compatible and SUSv3-happy than allowing only comma to seperate the
keywords list.

Submitted by: tjr


# 76e1a9fe 06-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

Implement a SUSv3-ignorant but "time"-similar format for "etime", elapsed
run time (NOT cpu time). cputime() and elapsed() both need to honour SUSv3
now.


# e8eef4bb 06-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

Support the SUSv3 `rgroup' format.

Clean up some local style bogons.


# 03334017 06-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

SUSv3 conform on the "comm" and "args" formats, and make correct the "command"
format, since it's BSDlike, and "comm" is actually different.


# 40fea9c3 06-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

As per behaviour on SVR4 systems, to allow any desirable type of header in the
override, seperate by comma (',') only, rather than any type of whitespace
(the literal space character (' ') had already been removed from this list).

This allows things like:
miamivice# ps -opid='Process
> Identifier'
Process
Identifier
1350
1445
1450

To work.


# 4fa7d788 05-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

Widen the scope of fmt.c::1.19 and consistently use errx(3) if malloc(3) [or
realloc(3)] happens to fail, everywhere in ps(1).

Discussed with: bde, charnier (a while ago)

fmt_argv() can no longer return NULL, so don't bother checking.

Submitted by: bde


# d9cd71b6 04-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

Support the 'comm' keyword, which is equivalent to our 'command', but
specified by SUSv3.


# cf77c2ce 04-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

A space cannot be a header string seperator it appears given the SUSv3
description of ps(1), which uses them. I question whether newline and tab
can be either, but I'm not touching them. Yet.


# 6d041cc8 04-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

To comply with SUSv3, duplicate the variable contents for each given format,
so that multiple -ovar=header lines do not overwrite eachother.

This means that ps -ouser=USERNAME -ouser=WHO would now possibly print:
USERNAME WHO
juli juli

Whereas before it would be:
WHO WHO
juli juli


# a89d0c4d 04-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

Duplicate the pointer to the string containing the header so it does not get
frobbed when/if the pointer it is actually a part of gets freed.


# d9a5f890 21-Feb-2002 Matthew Dillon <dillon@FreeBSD.org>

Revert wchan functionality. Add 'mwchan' to supply new duel mutex/msleep
functionality and make it the default.

With additional improvements by: Mark Peek <mp@FreeBSD.org>


# 871e8d8c 03-Feb-2002 Mark Murray <markm@FreeBSD.org>

WARNS=4 fixes (incomplete, so set NO_WERROR), and lots of extra
cleanup courtesy of automatic checking (lint).


# 46251dde 01-Feb-2002 Warner Losh <imp@FreeBSD.org>

o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.


# a2e4c36a 04-Jan-2002 Peter Wemm <peter@FreeBSD.org>

Put the "mtxname" keyword in alphabetical order (t comes after s) so
that the keyword is recognized.


# 7304f61f 26-Nov-2001 Brian Feldman <green@FreeBSD.org>

Add LOMAC options (the "Z" flag in both cases) to display extra information
in ls(1) and ps(1).

Sponsored by: DARPA, NAI Labs


# 7d1192a7 24-Aug-2001 Peter Wemm <peter@FreeBSD.org>

On today's kernels masking with ~KERNBASE is turning out to be less
than useful. It still hits at least 8 digits. Adjust for reality.

This is still not satisfactory for the alpha if you add "-O paddr".


# 25bba4f6 03-May-2001 Mark Murray <markm@FreeBSD.org>

Depollute headers now that the VM headers DTRT.


# 325a83b4 01-May-2001 Mark Murray <markm@FreeBSD.org>

Compensate for header dethreading.


# ff1b168b 11-Apr-2001 Brian Somers <brian@FreeBSD.org>

Introduce -osid and -otsid

Submitted by: dd


# f6213d47 14-Feb-2001 Jonathan Lemon <jlemon@FreeBSD.org>

Do not coredump if no options are supplied. (ps -o,)

Submitted by: rgrimes
Obtained from: NetBSD


# 4c85452b 11-Feb-2001 Jake Burkholder <jake@FreeBSD.org>

Catch up to new priority interface.


# 640b0e08 15-Dec-2000 Kirk McKusick <mckusick@FreeBSD.org>

Restore the rss (-u) keyword that got deleted in my somewhat over-zealous
cleanup effort.

Submitted by: Mark Peek <mark@whistle.com>


# 1f7d2501 12-Dec-2000 Kirk McKusick <mckusick@FreeBSD.org>

Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather
only scalar values and structures that are already part of the
kernel/user interface, specifically rusage and rtprio. It no
longer contains proc, session, pcred, ucred, procsig, vmspace,
pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If
any of these changed in size, ps, w, fstat, gcore, systat, and
top would all stop working. The new structure has over 200 bytes
of unassigned space for future values to be added, yet is nearly
100 bytes smaller per entry than the structure that it replaced.


# fd5f30bf 29-Nov-2000 John Baldwin <jhb@FreeBSD.org>

Introduce a 'mtxname' keyword that displays the current mutex that a
process is blocked on or '-'.


# 2a456239 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 88c5ea45 25-Jan-1999 Julian Elischer <julian@FreeBSD.org>

Enable Linux threads support by default.
This takes the conditionals out of the code that has been tested by
various people for a while.
ps and friends (libkvm) will need a recompile as some proc structure
changes are made.

Submitted by: "Richard Seaman, Jr." <dick@tar.com>


# d8c85307 12-Jan-1999 Julian Elischer <julian@FreeBSD.org>

Re-enable the options in ps(1) that were disabled with the Linux
threads support.

Submitted by: "Richard Seaman, Jr." <dick@tar.com>


# 6626c604 18-Dec-1998 Julian Elischer <julian@FreeBSD.org>

Reviewed by: Luoqi Chen, Jordan Hubbard
Submitted by: "Richard Seaman, Jr." <lists@tar.com>
Obtained from: linux :-)

Code to allow Linux Threads to run under FreeBSD.

By default not enabled
This code is dependent on the conditional
COMPAT_LINUX_THREADS (suggested by Garret)
This is not yet a 'real' option but will be within some number of hours.


# 3929d518 14-Sep-1998 Doug Rabson <dfr@FreeBSD.org>

Portability fixes when sizeof(int) != sizeof(long).


# ad863cac 24-May-1998 Steve Price <steve@FreeBSD.org>

If no value is present for the login name set it to '-'.
Also pretty-up the display of 'ps -Ortprio'.

PR: 4947
Submitted by: Martin Kammerhofer <dada@sbox.tu-graz.ac.at>


# c1cee2f6 10-Aug-1997 Steve Price <steve@FreeBSD.org>

Oops, add #include's (forgotten in last commit) to make this
compile again.


# aeb7f2b6 10-Aug-1997 Steve Price <steve@FreeBSD.org>

Remove #ifdef NEWVM code and remove extra "key.name = p" line.


# e27525d9 10-Aug-1997 Steve Price <steve@FreeBSD.org>

Fix seg fault when invalid keywords are used.

PR: bin/4253
Submitted by: Jesse Rosenstock <jmr@ugcs.caltech.edu>


# 6a2d726b 28-Apr-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Dynamically adjust size of displayed username to the longest username which
appears, not the longest _maximum_ username (this should probably also go
into 2.2, for the day when we bump up the username length there too).

Submitted-By: Terry Lambert <terry@lambert.org>


# 32f6553e 03-Mar-1997 Andrey A. Chernov <ache@FreeBSD.org>

Big usernames fixes


# 33c4e65a 03-Mar-1997 Andrey A. Chernov <ache@FreeBSD.org>

Use MAXLOGNAME-1 for width because MAXLOGNAME includes NUL


# b97fa2ef 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 78b09ffe 13-Dec-1996 Steve Price <steve@FreeBSD.org>

-Wall cleaning.


# dc01a4f7 31-Jul-1996 David Greenman <dg@FreeBSD.org>

Updated to match kernel changes for timer/run queue.


# 8b9b0e39 28-Oct-1995 Poul-Henning Kamp <phk@FreeBSD.org>

I add #include <sys/user.h>


# c55931c7 26-Sep-1995 Peter Wemm <peter@FreeBSD.org>

Correct the alignment of the tty column, which was affected by my change to
allow more than two tty characters.

David Greenman pointed out that when a process that had been revoked from
it's controlling tty, the "-" sign was detached from any two-character
names.


# 69267920 03-Sep-1995 Peter Wemm <peter@FreeBSD.org>

Increase the tty column width from 2 to 3 characters.

This gives us more room to breath with tty names, especially with drivers
that support large numbers of ports.. eg: specialix and digiboard.

This does not actually change the current tty names, it just allows room
for reporting more characters if the drivers use them.


# 8b6f5f5f 02-Oct-1994 David Greenman <dg@FreeBSD.org>

On second thought...back out previous commit.


# 793ced0e 02-Oct-1994 David Greenman <dg@FreeBSD.org>

Include rtprio.h


# 89730b29 23-Sep-1994 David Greenman <dg@FreeBSD.org>

Added $Id$


# a837235a 01-Sep-1994 David Greenman <dg@FreeBSD.org>

Added rtprio option/field.

Submitted by: Henrik Vestergaard Draboel


# 4b88c807 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite bin Sources