| Age | Commit message (Collapse) | Author |
|
And fix few more typos along the way in comments and man pages.
|
|
|
|
|
|
|
|
|
|
|
|
Since 2021-01-31, lint no longer warns about 'do ... while (0)'.
No functional change.
|
|
|
|
|
|
|
|
Add -G to take a single group argument heading towards POSIX.2 compliance.
Patch from jperkin and reviewed by simonb.
|
|
|
|
- add a safe_strftime() to handle error cases
|
|
column header is specified.
Fixes bug pointed out by Ted Spradley in
https://mail-index.netbsd.org/netbsd-users/2021/04/05/msg026808.html .
|
|
|
|
sysctl fails. We've got bigger problems if the sysctl fail anyway.
|
|
No more leaks are detected by LSan/NetBSD as of the LLVM snapshot
(clang10svn) from 2019-09-15.
|
|
pinfo is allocated in setpinfo() with calloc(3).
Free it when no longer used, just before the program termination.
Detected with LSan.
|
|
The RSS related statistics are now back in the NetBSD kernel.
These values were disabled since day0 until today.
libkvm(3) users will still receive inappropriate values as RSS statistics
are updated upon sysctl(3) call.
Patch submitted by <Krzysztof Lasocki>
|
|
The symbol is no longer available in headers.
Requested by <mrg>
|
|
LSDEAD is not used since NetBSD-5.0 and will be gone.
The same conditional usage is already in ps.c in the same program.
|
|
it, or there's nothing and we print "-".
|
|
|
|
|
|
rawcpu of type int, is declared inside main(){} and it can be passed as
uninitialized to setpinfo().
The setpinfo() function has a switch checking the value of rawcpu:
if (!rawcpu)
pi[i].pcpu /= 1.0 - exp(ki[i].p_swtime * log_ccpu);
rawcpu is set to 1 with the command line argument "-C".
-C Change the way the CPU percentage is calculated by using a
"raw" CPU calculation that ignores "resident" time (this
normally has no effect).
Bug reproducible with an invocation: "ps u". It hides with "ps uC".
Initialize rawcpu by default to 0, before the getopt(3) machinery.
Detected with MSan running on NetBSD/amd64.
Sponsored by <The NetBSD Foundation>
|
|
This removes symbol name routine clash with libc's uname(3).
This allows to build ps(1) against LLVM Sanitizers.
Sponsored by <The NetBSD Foundation>
|
|
|
|
This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.
This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.
This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.
Remove:
- /proc/#/ctl from mount_procfs(8)
- P_FSTRACE note from the documentation of ps(1)
- /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
- KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
- source code file miscfs/procfs/procfs_ctl.c
- PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
- KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
- PSL_FSTRACE (0x00010000) from sys/sys/proc.h
- P_FSTRACE (0x00010000) from sys/sys/sysctl.h
Reduce code complexity after removal of this functionality.
Update TODO.ptrace accordingly: remove two entries about /proc tracing.
Do not keep legacy notes as comments in the headers about removed
PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).
Proposed on tech-kern@.
All filesystem tracing utility users are encouraged to switch to ptrace(2).
Sponsored by <The NetBSD Foundation>
|
|
|
|
|
|
|
|
|
|
significantly improves performance for slow machines when output is sorted
by pcpu.
ok martin
|
|
- obtain log_ccpu = log(ccpu) rather than ccpu itself
- use common default values and warn users appropriately when errors occur
ok martin
|
|
ok martin
|
|
|
|
Unfortunately only the source code for the compiler is present for that
release. The v2 archive is missing the manuals & only contains a some of the
commands.
Switch to v3 and reference manual category eight, as per r1.32 of
src/bin/ps/ps.1 from OpenBSD.
Heads up from Ingo Schwarze.
|
|
|
|
|
|
nullness.
|
|
% ps -tfoo
ps: /dev/ttyfoo: Undefined error: 0
Exit 1
|
|
initialization value.
|
|
been checked.
|
|
|
|
|
|
|
|
|
|
depend on new devname_r(3) as heart. Add /dev/pts magic directly to
devname(3). While it can lead to returning non-existing paths, the
behavior is more consistent that way. Drop caching layer in devname(3),
it doesn't buy anything for the common case of having access to the
database. Teach devname(3) proper fallback behavior of scanning /dev.
Create both old-style and new-style database for now in /etc/rc.d/sysdb.
|
|
function. Improve dealing with ptyfs by explicitly handling missing
pts/%d entries, if the kernel supports the pts device (PR 40813).
|
|
|