---- sysctl.3.orig 2008-10-21 16:45:53.000000000 -0700
-+++ sysctl.3 2008-10-22 09:33:13.000000000 -0700
+--- sysctl.3.orig 2010-04-28 23:38:49.000000000 -0700
++++ sysctl.3 2010-04-29 10:13:28.000000000 -0700
@@ -32,7 +32,7 @@
.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95
.\" $FreeBSD: src/lib/libc/gen/sysctl.3,v 1.63 2004/07/02 23:52:10 ru Exp $
.Dt SYSCTL 3
.Os
.Sh NAME
-@@ -182,13 +182,21 @@
+@@ -182,13 +182,21 @@ for (i = 0; i < 100; i++) {
}
.Ed
.Pp
+-- to print whatever data deemed necessary from the large
+.Vt kinfo_proc
+structure (
-+.In sysctl.h
++.In sys/sysctl.h
+) -- is left as an exercise for the reader.
+.Pp
The top level names are defined with a CTL_ prefix in
.It Sy "Name Next level names Description"
.It "CTL_DEBUG sys/sysctl.h Debugging"
.It "CTL_VFS sys/mount.h File system"
-@@ -197,7 +205,8 @@
+@@ -197,7 +205,8 @@ listed here, and described in separate s
.It "CTL_MACHDEP sys/sysctl.h Machine dependent"
.It "CTL_NET sys/socket.h Networking"
.It "CTL_USER sys/sysctl.h User-level"
.El
.Pp
For example, the following retrieves the maximum number of processes allowed
-@@ -456,16 +465,6 @@
+@@ -279,7 +288,7 @@ privilege may change the value.
+ .It Sy "Second level name Type Changeable"
+ .It "HW_MACHINE string no"
+ .It "HW_MODEL string no"
+-.It "HW_NCPU integer no"
++.It "HW_NCPU integer no (DEPRECATED)"
+ .It "HW_BYTEORDER integer no"
+ .It "HW_PHYSMEM integer no"
+ .It "HW_MEMSIZE integer no"
+@@ -296,8 +305,16 @@ privilege may change the value.
+ The machine class.
+ .It Li HW_MODEL
+ The machine model
+-.It Li HW_NCPU
+-The number of cpus.
++.It Li HW_NCPU (DEPRECATED)
++The number of cpus. It is recommended that you use "hw.physicalcpu" "hw.physicalcpu_max" "hw.logicalcpu" or "hw.logicalcpu_max" instead.
++.It Li "hw.physicalcpu"
++The number of physical processors available in the current power management mode.
++.It Li "hw.physicalcpu_max"
++The maximum number of physical processors that could be available this boot.
++.It Li "hw.logicalcpu"
++The number of logical processors available in the current power management mode.
++.It Li "hw.logicalcpu_max"
++The maximum number of logical processors that could be available this boot.
+ .It Li HW_BYTEORDER
+ The byteorder (4,321, or 1,234).
+ .It Li HW_PHYSMEM
+@@ -346,7 +363,7 @@ information.
+ .It "KERN_OSREV integer no"
+ .It "KERN_OSTYPE string no"
+ .It "KERN_POSIX1 integer no"
+-.It "KERN_PROC struct proc no"
++.It "KERN_PROC struct kinfo_proc no"
+ .It "KERN_PROF node not applicable"
+ .It "KERN_QUANTUM integer yes"
+ .It "KERN_SAVED_IDS integer no"
+@@ -440,10 +457,8 @@ with which the system
+ attempts to comply.
+ .It Li KERN_PROC
+ Return the entire process table, or a subset of it.
+-An array of pairs of
+-.Va struct proc
+-followed by corresponding
+-.Va struct eproc
++An array of
++.Va struct kinfo_proc
+ structures is returned,
+ whose size depends on the current number of such objects in the system.
+ The third and fourth level names are as follows:
+@@ -456,16 +471,6 @@ The third and fourth level names are as
.It "KERN_PROC_UID A user ID"
.It "KERN_PROC_RUID A real user ID"
.El
.It Li KERN_PROF
Return profiling information about the kernel.
If the kernel is not compiled for profiling,
-@@ -731,7 +730,6 @@
+@@ -731,7 +736,6 @@ privilege may change the value.
.Bl -column "Second level nameXXXXXX" "struct loadavgXXX" -offset indent
.It Sy "Second level name Type Changeable"
.It "VM_LOADAVG struct loadavg no"
.It "VM_PAGEOUT_ALGORITHM integer yes"
.It "VM_SWAPPING_ENABLED integer maybe"
.It "VM_V_CACHE_MAX integer yes"
-@@ -748,10 +746,6 @@
+@@ -748,10 +752,6 @@ privilege may change the value.
Return the load average history.
The returned data consists of a
.Va struct loadavg .
.It Li VM_PAGEOUT_ALGORITHM
0 if the statistics-based page management algorithm is in use
or 1 if the near-LRU algorithm is in use.
-@@ -848,7 +842,7 @@
+@@ -848,7 +848,7 @@ identifiers, and user level identifiers
definitions for second level network identifiers
.It In sys/gmon.h
definitions for third level profiling identifiers