OpenBSD CVS

CVS log for src/bin/ps/ps.c


[BACK] Up to [local] / src / bin / ps

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.81 / (download) - annotate - [select for diffs], Sat May 18 13:08:09 2024 UTC (2 weeks, 1 day ago) by sobrado
Branch: MAIN
CVS Tags: HEAD
Changes since 1.80: +4 -4 lines
Diff to previous 1.80 (colored)

prefixing flags to ps(1) by a hyphen is optional; while here, make synopsis
fit in a 80-column display.

ok jmc@

Revision 1.80 / (download) - annotate - [select for diffs], Fri Nov 10 09:17:02 2023 UTC (6 months, 3 weeks ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.79: +22 -8 lines
Diff to previous 1.79 (colored)

accept numerical user IDs

Turn [-U username] into [-U user] to match top(1)/pgrep(1)/fstat(1) -U/-u
taking both "root" and "0".

Feedback OK millert

Revision 1.79 / (download) - annotate - [select for diffs], Thu Sep 1 21:15:54 2022 UTC (21 months ago) by job
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.78: +144 -22 lines
Diff to previous 1.78 (colored)

Add forest (-f) mode

In -f mode group & display parent/child process relationships using ASCII art.

Borrows heavily from Brian Somers' work on FreeBSD ps(1).

With input from deraadt@ and tb@

OK benno@ claudio@

Revision 1.78 / (download) - annotate - [select for diffs], Wed Dec 1 18:21:23 2021 UTC (2 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.77: +3 -2 lines
Diff to previous 1.77 (colored)

further improvements in sys/param.h annotation and removal.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Jul 12 15:09:18 2021 UTC (2 years, 10 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.76: +6 -6 lines
Diff to previous 1.76 (colored)

Change the error reporting pattern throughout the tree when unveil
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.

Work done and verified by Ashton Fagg <ashton@fagg.id.au>

ok deraadt@ semarie@ claudio@

Revision 1.76 / (download) - annotate - [select for diffs], Mon Dec 16 19:21:16 2019 UTC (4 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.75: +1 -3 lines
Diff to previous 1.75 (colored)

Delete tests for P_THREAD that predate the existence of
KERN_PROC_SHOW_THREADS and have been rendered superfluous by it.
Similarly, some P_SYSTEM tests can be deleted or pushed to the
kernel by using KERN_PROC_ALL instead of KERN_PROC_KTHREAD.

ok visa@ mpi@

Revision 1.75 / (download) - annotate - [select for diffs], Sun Mar 24 05:30:35 2019 UTC (5 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.74: +8 -5 lines
Diff to previous 1.74 (colored)

detect -t argument being too long, rather than truncating

Revision 1.74 / (download) - annotate - [select for diffs], Tue Feb 5 18:13:20 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

Let ps(1) work in single user mode where /var/run does not exist.
Give the same treatment if /dev doesn't exist. While things will be
real interesting without /dev there is no reason to stop ps(1).

Fix suggested by & OK deraadt
OK millert

Revision 1.73 / (download) - annotate - [select for diffs], Sun Sep 16 02:44:06 2018 UTC (5 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.72: +2 -6 lines
Diff to previous 1.72 (colored)

Use uid_from_user(3) and gid_from_group(3) in utilities that
do repeated lookups.  OK tb@

Revision 1.72 / (download) - annotate - [select for diffs], Wed Aug 8 14:38:31 2018 UTC (5 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.71: +14 -1 lines
Diff to previous 1.71 (colored)

unveil dev.db "r" for devname(), /dev "r", and in the non-sysctl case
some kernel memory/symbol files.

Revision 1.71 / (download) - annotate - [select for diffs], Fri Sep 23 06:28:08 2016 UTC (7 years, 8 months ago) by bentley
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.70: +5 -2 lines
Diff to previous 1.70 (colored)

Attempt to use stdout, stderr, or stdin terminal widths if they exist.

This behavior already existed but was unintentionally lost in revision
1.70 of ps.c.

ok millert@ tb@

Revision 1.70 / (download) - annotate - [select for diffs], Thu Mar 17 05:27:10 2016 UTC (8 years, 2 months ago) by bentley
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.69: +9 -17 lines
Diff to previous 1.69 (colored)

Switch (non-curses, non-ksh) programs that use COLUMNS to a single idiom.

Previously behaviors were all over the map. This changes them to
use COLUMNS first, and either terminal width or a hardcoded value
(typically 80) as appropriate.

ok deraadt@; man bits ok jmc@

Revision 1.69 / (download) - annotate - [select for diffs], Sun Jan 10 14:04:16 2016 UTC (8 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.68: +4 -1 lines
Diff to previous 1.68 (colored)

UTF-8 support:
In a UTF-8 locale, columnate correctly and replace valid, but non-
printable characters with the Unicode replacement character U+FFFD.
No change in the C/POSIX locale, and no change for invalid bytes.
Grand total, the code becomes shorter by almost 30 lines.
Feedback from czarkoff@, OK millert@.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Nov 11 03:20:02 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

fix pledge error message

Revision 1.67 / (download) - annotate - [select for diffs], Sun Oct 25 09:39:00 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

need "getpw" pledge; spotted by matthieu

Revision 1.66 / (download) - annotate - [select for diffs], Fri Oct 23 03:26:24 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.65: +4 -1 lines
Diff to previous 1.65 (colored)

With new pledge "ps" and "vminfo" requests, ps/top/w become possible.

Revision 1.65 / (download) - annotate - [select for diffs], Mon Jun 29 15:03:33 2015 UTC (8 years, 11 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.64: +4 -6 lines
Diff to previous 1.64 (colored)

After removing the p_swtime from the kernel, ps always printed 0.0
as %cpu time.  Remove the calculation in ps that includes the process
lifetime.  Just print the p_pctcpu value, that was done before when
ps was called with -C.  Keep -C as a no-op for existing scripts.
OK millert@

Revision 1.64 / (download) - annotate - [select for diffs], Thu Apr 9 19:48:25 2015 UTC (9 years, 1 month ago) by okan
Branch: MAIN
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

kflag and wflag don't need to be counters; wflag only needs to know if
greater than 0 for its one test case.

ok deraadt

Revision 1.63 / (download) - annotate - [select for diffs], Fri Jan 16 06:39:32 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.62: +4 -3 lines
Diff to previous 1.62 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.62 / (download) - annotate - [select for diffs], Tue Jul 8 23:31:22 2014 UTC (9 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.61: +1 -2 lines
Diff to previous 1.61 (colored)

sys/user.h can now be substantially gutted.
ok guenther

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jun 5 07:29:20 2014 UTC (10 years ago) by guenther
Branch: MAIN
Changes since 1.60: +18 -9 lines
Diff to previous 1.60 (colored)

Add support for COLUMNS env variable, inspired by FreeBSD but with a dash
of strtonum() from millert@ sprinkled on top.
Also, we've always supported TZ for formatting dates, so say so.

ok jmc@ millert@

Revision 1.60 / (download) - annotate - [select for diffs], Wed May 7 01:31:25 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

convert calloc to use reallocarray instead. ok millert

Revision 1.59 / (download) - annotate - [select for diffs], Thu Nov 21 15:54:45 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.58: +4 -3 lines
Diff to previous 1.58 (colored)

add unsigned char casts for specific calls to ctype.h macros.
ok guenther step

Revision 1.58 / (download) - annotate - [select for diffs], Thu Oct 31 01:59:33 2013 UTC (10 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.57: +2 -1 lines
Diff to previous 1.57 (colored)

pull in less .h to do the same

Revision 1.57 / (download) - annotate - [select for diffs], Mon Oct 28 13:05:53 2013 UTC (10 years, 7 months ago) by okan
Branch: MAIN
Changes since 1.56: +10 -6 lines
Diff to previous 1.56 (colored)

add -A (-ax) support; from Lauri Tirkkonen with some option sorting.

ok guenther@ jmc@

Revision 1.56 / (download) - annotate - [select for diffs], Sun Sep 22 17:28:34 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

Stop merging the per-thread and per-process flags when reporting
them via sysctl(KERN_PROC).  In struct kinfo_proc the per-process
flags move to p_psflags, leaving the per-thread flags in p_flags.
Flag descriptions in ps(1) updated to be less obtuse.

discussed with matthew@ some time ago; ok jca@, manpage bits ok jmc@

Revision 1.55 / (download) - annotate - [select for diffs], Sat Apr 21 03:14:50 2012 UTC (12 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.54: +1 -3 lines
Diff to previous 1.54 (colored)

Remove a check made superfluous by the KERN_PROC_SHOW_THREADS flag.
This lets new binaries work (at least w/o the -H option) with old kernels.

ok pirofti@ deraadt@

Revision 1.54 / (download) - annotate - [select for diffs], Tue Apr 17 23:17:53 2012 UTC (12 years, 1 month ago) by pirofti
Branch: MAIN
Changes since 1.53: +3 -1 lines
Diff to previous 1.53 (colored)

Make it optional for kvm_getprocs() (and related sysctl) to return
thread information.

Add a KERN_PROC_SHOW_THREADS flag that has to be set in order to get the
thread info and make it off by default. This creates backwards compatibility
for applications that relied on a given size/number of items to be returned.

Modify ps(1) and top(1) accordingly.

Okay guenther@.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Apr 12 14:59:19 2012 UTC (12 years, 1 month ago) by pirofti
Branch: MAIN
Changes since 1.52: +5 -1 lines
Diff to previous 1.52 (colored)

Add per thread accounting, mainly for usage & friends.

This expands the already bloated FILL_KPROC macro to take an extra
parameter that indicates if the callee is a thread or a process.

The userland bits are adjusted accordingly and ps(1) and top(1) now
display per thread usage times when -H is used.

Also pkill(1) had to be adjusted so that duplicates don't pop up.

libkvm does basically the same thing as the kernel bits.

Okay guenther@.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Apr 4 16:13:11 2012 UTC (12 years, 2 months ago) by jsing
Branch: MAIN
Changes since 1.51: +7 -2 lines
Diff to previous 1.51 (colored)

Add "tid" as a formatting keyword. If the -H option is specified, include
the thread ID in the default format.

ok deraadt@ sthen@

Revision 1.51 / (download) - annotate - [select for diffs], Thu Oct 13 01:15:04 2011 UTC (12 years, 7 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.50: +2 -12 lines
Diff to previous 1.50 (colored)

Remove support for systems that lack CPUs.  (i.e., stop looking up
HW_NCPU when the only test was whether it's non-zero)

ok millert@

Revision 1.50 / (download) - annotate - [select for diffs], Sun Sep 25 00:29:59 2011 UTC (12 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.49: +10 -5 lines
Diff to previous 1.49 (colored)

Add -H option to show rthreads, hiding them by default

Diff from uwe@

Revision 1.49 / (download) - annotate - [select for diffs], Sun Apr 10 03:20:58 2011 UTC (13 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.48: +5 -5 lines
Diff to previous 1.48 (colored)

Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc now
that we've got name we want for the API we want

"ZAP!" deraadt@

Revision 1.48 / (download) - annotate - [select for diffs], Fri Jul 2 15:43:15 2010 UTC (13 years, 11 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.47: +6 -30 lines
Diff to previous 1.47 (colored)

ps uses libkvm, so it doesn't need its own copy of the "get process info
via sysctl" logic.
ok millert@

Revision 1.47 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:22 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.46: +1 -15 lines
Diff to previous 1.46 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.46 / (download) - annotate - [select for diffs], Fri Jul 18 14:24:18 2008 UTC (15 years, 10 months ago) by kevlo
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

remove unnessasary cast.
ok millert@

Revision 1.45 / (download) - annotate - [select for diffs], Sat Mar 8 19:20:12 2008 UTC (16 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.44: +9 -3 lines
Diff to previous 1.44 (colored)

Instead of calling donlist() in the format print routines, call it
a single time before we print anything, if needed.  Uses a flag to
specify which formats need the kernel info donlist() provides.
OK deraadt@

Revision 1.44 / (download) - annotate - [select for diffs], Fri Dec 28 19:17:28 2007 UTC (16 years, 5 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

printf field widths are always int, so add a cast to remove
"warning: field width is not type int"

"looks good" otto@

Revision 1.43 / (download) - annotate - [select for diffs], Sat Sep 1 19:32:19 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

malloc(n * m) -> calloc(n, m); from zinovik

Revision 1.42 / (download) - annotate - [select for diffs], Wed Nov 1 19:07:18 2006 UTC (17 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.41: +3 -4 lines
Diff to previous 1.41 (colored)

simplify synopsis and sync usage();

Revision 1.41 / (download) - annotate - [select for diffs], Tue Apr 25 15:41:07 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.40: +5 -5 lines
Diff to previous 1.40 (colored)

various small lint cleanups; ok otto

Revision 1.40 / (download) - annotate - [select for diffs], Wed Nov 24 19:17:10 2004 UTC (19 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.39: +10 -2 lines
Diff to previous 1.39 (colored)

on MP machines, in STAT field, add /# where # is the cpu number so that
you can see processes move around; ok pval millert

Revision 1.39 / (download) - annotate - [select for diffs], Tue Sep 14 23:45:35 2004 UTC (19 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.38: +4 -4 lines
Diff to previous 1.38 (colored)

remove unused variable

Revision 1.38 / (download) - annotate - [select for diffs], Tue Feb 24 11:53:45 2004 UTC (20 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

- `C' before `c'
- replace `<' and `>'
- sync usage()

Revision 1.37 / (download) - annotate - [select for diffs], Sun Feb 8 19:28:19 2004 UTC (20 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.36: +5 -3 lines
Diff to previous 1.36 (colored)

'ps' should not act like 'ps a'. Resolves PR 3676.
ok tdeval@ millert@

Revision 1.36 / (download) - annotate - [select for diffs], Wed Feb 4 12:58:27 2004 UTC (20 years, 4 months ago) by otto
Branch: MAIN
Changes since 1.35: +8 -8 lines
Diff to previous 1.35 (colored)

(uid_t) -1 is a valid uid, so do not use it as a flag.
From Joris Vink <nimadeus at pandora dot be> with tweaks from me.
ok tdeval@ hshoexer@ henning@

Revision 1.35 / (download) - annotate - [select for diffs], Thu Jan 8 18:18:35 2004 UTC (20 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.34: +57 -78 lines
Diff to previous 1.34 (colored)

Convert to kinfo_proc2.  The sort order for -u and -m will be different
due to a bug fix in the sort routine.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Jul 29 00:24:15 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.33: +7 -7 lines
Diff to previous 1.33 (colored)

spacing

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jun 11 23:42:12 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.32: +8 -13 lines
Diff to previous 1.32 (colored)

ansification, art ok

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jun 2 23:32:09 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.31: +3 -7 lines
Diff to previous 1.31 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Apr 15 01:19:34 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.30: +6 -4 lines
Diff to previous 1.30 (colored)

mix of tdeval and my string cleaning

Revision 1.30 / (download) - annotate - [select for diffs], Wed Jun 12 03:44:35 2002 UTC (21 years, 11 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

unused variable

Revision 1.29 / (download) - annotate - [select for diffs], Sun Jun 9 05:46:44 2002 UTC (21 years, 11 months ago) by art
Branch: MAIN
Changes since 1.28: +8 -16 lines
Diff to previous 1.28 (colored)

Fix the start time on sysctl kvm.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Jun 8 22:41:46 2002 UTC (21 years, 11 months ago) by art
Branch: MAIN
Changes since 1.27: +9 -14 lines
Diff to previous 1.27 (colored)

Use KVM_NO_FILES and remove the setgid.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Apr 6 23:55:40 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

Fix a typo and sync usage() with man page; Brian Poole

Revision 1.26 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:07 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.25: +7 -7 lines
Diff to previous 1.25 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jan 30 17:52:40 2002 UTC (22 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.24: +4 -4 lines
Diff to previous 1.24 (colored)

right, just check more for nulls; from Dan Harnett <danh@wzrd.com>

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 30 17:02:55 2002 UTC (22 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

always check for kvm_openfiles failure; pointed out by juan@coredump.com.ar in pr/2362

Revision 1.23 / (download) - annotate - [select for diffs], Thu Sep 27 12:53:47 2001 UTC (22 years, 8 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

If kvm_openfiles() fail the systctl() should work.
Spotted by: mike <mike@gravitino.net>
Patch from millert@

Revision 1.22 / (download) - annotate - [select for diffs], Thu Sep 6 13:29:08 2001 UTC (22 years, 9 months ago) by mpech
Branch: MAIN
Changes since 1.21: +9 -7 lines
Diff to previous 1.21 (colored)

o) __progname aria;

millert@ ok.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jun 3 04:48:15 2001 UTC (23 years ago) by angelos
Branch: MAIN
Changes since 1.20: +10 -8 lines
Diff to previous 1.20 (colored)

Use kern.nprocs

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jun 3 04:30:47 2001 UTC (23 years ago) by angelos
Branch: MAIN
Changes since 1.19: +37 -13 lines
Diff to previous 1.19 (colored)

Use sysctl to get process information, if kvm has not been initialized
(which is still not the case).

Revision 1.19 / (download) - annotate - [select for diffs], Tue Apr 17 21:12:07 2001 UTC (23 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.18: +5 -9 lines
Diff to previous 1.18 (colored)

Missing bits from last commit here; kstailey@disclosure.com

Revision 1.18 / (download) - annotate - [select for diffs], Tue Apr 17 00:50:16 2001 UTC (23 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.17: +4 -10 lines
Diff to previous 1.17 (colored)

Updated version of last patch from kstailey@disclosure.com.
We should always save the user area since we are sorting on
start time (which lives there).

Revision 1.17 / (download) - annotate - [select for diffs], Sun Apr 15 23:32:31 2001 UTC (23 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.16: +14 -3 lines
Diff to previous 1.16 (colored)

Randomized PIDs uglifies "ps -ax" output since it sorts on tty then
PID and it makes no sense to sort on a strong random number.
This patch changes the default to be the start time so output looks
logical to a human.  From kstailey@disclosure.com

Revision 1.16 / (download) - annotate - [select for diffs], Mon Feb 5 00:31:51 2001 UTC (23 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

[-] outside braces

Revision 1.15 / (download) - annotate - [select for diffs], Mon Feb 5 00:30:45 2001 UTC (23 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

extra - in usage too

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jun 18 17:59:54 2000 UTC (23 years, 11 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.13: +11 -5 lines
Diff to previous 1.13 (colored)

Mark kernel threads as system processes.  Make ps hide them by default,
show them with -k.  Do not try to show RSS based values for them as they
mess up column alignment.  vmstat -f now shows kernel threads separately
from rforks too.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Apr 16 02:19:55 2000 UTC (24 years, 1 month ago) by ericj
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

correct getopt

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jun 21 20:47:59 1999 UTC (24 years, 11 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

stop casting the third argument to kvm_read to char *. it is a void *.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Apr 28 20:55:14 1999 UTC (25 years, 1 month ago) by alex
Branch: MAIN
Changes since 1.10: +17 -5 lines
Diff to previous 1.10 (colored)

Implement -U <username> option from FreeBSD.  Original code by Peter Wemm.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jul 8 22:14:25 1998 UTC (25 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.9: +5 -2 lines
Diff to previous 1.9 (colored)

whack kmem gid after kvm_openfiles()

Revision 1.9 / (download) - annotate - [select for diffs], Mon Aug 4 05:37:05 1997 UTC (26 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.8: +2 -10 lines
Diff to previous 1.8 (colored)

toast non-NEWVM code; freebsd

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jun 13 00:37:39 1997 UTC (26 years, 11 months ago) by michaels
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

return 1 if the process does not exist.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Dec 22 02:57:50 1996 UTC (27 years, 5 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.6: +5 -3 lines
Diff to previous 1.6 (colored)

Deal with _POSIX_SAVED_IDS when relinquishing privileges

Revision 1.6 / (download) - annotate - [select for diffs], Sat Dec 14 12:18:10 1996 UTC (27 years, 5 months ago) by mickey
Branch: MAIN
Changes since 1.5: +4 -4 lines
Diff to previous 1.5 (colored)

-Wall'ing.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Aug 6 19:33:47 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored)

_POSIX2_LINE_MAX errbuf for kvm_openfiles()

Revision 1.4 / (download) - annotate - [select for diffs], Fri Aug 2 12:41:02 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +2 -3 lines
Diff to previous 1.3 (colored)

zap getopt() case of -?, come on, it is the default!

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jun 23 14:20:51 1996 UTC (27 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

update rcsid

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jun 16 01:17:08 1996 UTC (27 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

allocate large enough buffer; netbsd pr#2550; gsstark@mit.edu

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:37:19 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:37:19 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.