History log of /openbsd-src/bin/ps/ps.c (Results 1 – 25 of 81)
Revision Date Author Comments
# 375f1517 18-May-2024 sobrado <sobrado@openbsd.org>

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

ok jmc@


# 52e706ca 10-Nov-2023 kn <kn@openbsd.org>

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


# 24ca0f25 01-Sep-2022 job <job@openbsd.org>

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 b

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@

show more ...


# acd8f640 01-Dec-2021 deraadt <deraadt@openbsd.org>

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


# bc5a8259 12-Jul-2021 beck <beck@openbsd.org>

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 A

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@

show more ...


# 0f1976c8 16-Dec-2019 guenther <guenther@openbsd.org>

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

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@

show more ...


# 4075259f 24-Mar-2019 deraadt <deraadt@openbsd.org>

detect -t argument being too long, rather than truncating


# 5db3b398 05-Feb-2019 florian <florian@openbsd.org>

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).

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

show more ...


# a0f924b8 16-Sep-2018 millert <millert@openbsd.org>

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


# 2f5bf968 08-Aug-2018 deraadt <deraadt@openbsd.org>

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


# 511be169 23-Sep-2016 bentley <bentley@openbsd.org>

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@


# 7220d8ec 17-Mar-2016 bentley <bentley@openbsd.org>

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

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@

show more ...


# 033e8ff0 10-Jan-2016 schwarze <schwarze@openbsd.org>

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 fo

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@.

show more ...


# 46a2cbd9 11-Nov-2015 deraadt <deraadt@openbsd.org>

fix pledge error message


# dcce26de 25-Oct-2015 deraadt <deraadt@openbsd.org>

need "getpw" pledge; spotted by matthieu


# 4120813f 23-Oct-2015 deraadt <deraadt@openbsd.org>

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


# 4bdadada 29-Jun-2015 bluhm <bluhm@openbsd.org>

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

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@

show more ...


# 3f36dab3 09-Apr-2015 okan <okan@openbsd.org>

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


# b9fc9a72 16-Jan-2015 deraadt <deraadt@openbsd.org>

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_N

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)

show more ...


# 925bd4b5 08-Jul-2014 deraadt <deraadt@openbsd.org>

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


# c2e41e89 05-Jun-2014 guenther <guenther@openbsd.org>

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@ mille

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@

show more ...


# 71633524 07-May-2014 tedu <tedu@openbsd.org>

convert calloc to use reallocarray instead. ok millert


# cd3e3e8c 21-Nov-2013 deraadt <deraadt@openbsd.org>

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


# 0adec678 31-Oct-2013 deraadt <deraadt@openbsd.org>

pull in less .h to do the same


# 9ea50c04 28-Oct-2013 okan <okan@openbsd.org>

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

ok guenther@ jmc@


1234