Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: source-changes
Date: 05/25/2000 19:23:15
Module Name: syssrc
Committed By: simonb
Date: Fri May 26 02:23:15 UTC 2000
Modified Files:
syssrc/sys/kern: kern_sysctl.c
syssrc/sys/sys: proc.h sysctl.h
Log Message:
Add some new sysctls to help abolish the dreaded "proc size mismatch"
errors from ps(1) and some other kernel grovellers, and return some
data that has previously only been accessable with /dev/kmem read
access. The sysctls are:
+ KERN_PROC2 - return an array of fixed sized "struct kinfo_proc2"
structures that contain most of the useful user-level data in
"struct proc" and "struct user". The sysctl also takes the size of
each element, so that if "struct kinfo_proc2" grows over time old
binaries will still be able to request a fixed size amount of data.
+ KERN_PROC_ARGS - return the argv or envv for a particular process id.
envv will only be returned if the process has the same user id as the
requestor or if the requestor is root.
+ KERN_FSCALE - return the current kernel fixpt scale factor.
+ KERN_CCPU - return the scheduler exponential decay value.
+ KERN_CP_TIME - return cpu time state counters.
With input and suggestions from many people on tech-kern.
To generate a diff of this commit:
cvs rdiff -r1.61 -r1.62 syssrc/sys/kern/kern_sysctl.c
cvs rdiff -r1.91 -r1.92 syssrc/sys/sys/proc.h
cvs rdiff -r1.45 -r1.46 syssrc/sys/sys/sysctl.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.