]> git.saurik.com Git - apple/libc.git/blob - gen/FreeBSD/sysctl.3.patch
Libc-594.1.4.tar.gz
[apple/libc.git] / gen / FreeBSD / sysctl.3.patch
1 --- sysctl.3.orig 2008-10-21 16:45:53.000000000 -0700
2 +++ sysctl.3 2008-10-22 09:33:13.000000000 -0700
3 @@ -32,7 +32,7 @@
4 .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95
5 .\" $FreeBSD: src/lib/libc/gen/sysctl.3,v 1.63 2004/07/02 23:52:10 ru Exp $
6 .\"
7 -.Dd January 23, 2001
8 +.Dd October 21, 2008
9 .Dt SYSCTL 3
10 .Os
11 .Sh NAME
12 @@ -182,13 +182,21 @@
13 }
14 .Ed
15 .Pp
16 +Note: Implementation of
17 +.Fn printkproc
18 +-- to print whatever data deemed necessary from the large
19 +.Vt kinfo_proc
20 +structure (
21 +.In sysctl.h
22 +) -- is left as an exercise for the reader.
23 +.Pp
24 The top level names are defined with a CTL_ prefix in
25 .In sys/sysctl.h ,
26 and are as follows.
27 The next and subsequent levels down are found in the include files
28 listed here, and described in separate sections below.
29 .Pp
30 -.Bl -column CTLXMACHDEPXXX "Next level namesXXXXXX" -offset indent
31 +.Bl -column CTLXMACHDEP "Next level names" -offset indent
32 .It Sy "Name Next level names Description"
33 .It "CTL_DEBUG sys/sysctl.h Debugging"
34 .It "CTL_VFS sys/mount.h File system"
35 @@ -197,7 +205,8 @@
36 .It "CTL_MACHDEP sys/sysctl.h Machine dependent"
37 .It "CTL_NET sys/socket.h Networking"
38 .It "CTL_USER sys/sysctl.h User-level"
39 -.It "CTL_VM vm/vm_param.h Virtual memory"
40 +.It "CTL_VM sys/resources.h Virtual memory (struct loadavg)"
41 +.It "CTL_VM sys/vmmeter.h Virtual memory (struct vmtotal)"
42 .El
43 .Pp
44 For example, the following retrieves the maximum number of processes allowed
45 @@ -456,16 +465,6 @@
46 .It "KERN_PROC_UID A user ID"
47 .It "KERN_PROC_RUID A real user ID"
48 .El
49 -.Pp
50 -If the third level name is KERN_PROC_ARGS then the command line argument
51 -array is returned in a flattened form, i.e., zero-terminated arguments
52 -follow each other.
53 -The total size of array is returned.
54 -It is also possible for a process to set its own process title this way.
55 -.Bl -column "Third level nameXXXXXX" "Fourth level is:XXXXXX" -offset indent
56 -.It Sy "Third level name Fourth level is:"
57 -.It "KERN_PROC_ARGS A process ID"
58 -.El
59 .It Li KERN_PROF
60 Return profiling information about the kernel.
61 If the kernel is not compiled for profiling,
62 @@ -731,7 +730,6 @@
63 .Bl -column "Second level nameXXXXXX" "struct loadavgXXX" -offset indent
64 .It Sy "Second level name Type Changeable"
65 .It "VM_LOADAVG struct loadavg no"
66 -.It "VM_METER struct vmtotal no"
67 .It "VM_PAGEOUT_ALGORITHM integer yes"
68 .It "VM_SWAPPING_ENABLED integer maybe"
69 .It "VM_V_CACHE_MAX integer yes"
70 @@ -748,10 +746,6 @@
71 Return the load average history.
72 The returned data consists of a
73 .Va struct loadavg .
74 -.It Li VM_METER
75 -Return the system wide virtual memory statistics.
76 -The returned data consists of a
77 -.Va struct vmtotal .
78 .It Li VM_PAGEOUT_ALGORITHM
79 0 if the statistics-based page management algorithm is in use
80 or 1 if the near-LRU algorithm is in use.
81 @@ -848,7 +842,7 @@
82 definitions for second level network identifiers
83 .It In sys/gmon.h
84 definitions for third level profiling identifiers
85 -.It In vm/vm_param.h
86 +.It In mach/vm_param.h
87 definitions for second level virtual memory identifiers
88 .It In netinet/in.h
89 definitions for third level IPv4/IPv6 identifiers and