Date: Sat, 12 Mar 2011 14:42:15 GMT From: Galimov Albert <wtfcrap@mail.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/155489: [sysctl][patch] Document some sys/kern sysctls Message-ID: <201103121442.p2CEgFqP095739@red.freebsd.org> Resent-Message-ID: <201103121450.p2CEoBlU045638@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 155489
>Category: kern
>Synopsis: [sysctl][patch] Document some sys/kern sysctls
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Mar 12 14:50:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Galimov Albert
>Release: FreeBSD 9.0-CURRENT #0 r219510
>Organization:
>Environment:
>Description:
Working on documenting sysctls
>How-To-Repeat:
>Fix:
Patch included
Patch attached with submission follows:
Index: sys/kern/kern_ntptime.c
===================================================================
--- sys/kern/kern_ntptime.c (revision 219510)
+++ sys/kern/kern_ntptime.c (working copy)
@@ -301,13 +301,13 @@
0, sizeof(struct ntptimeval) , ntp_sysctl, "S,ntptimeval", "");
#ifdef PPS_SYNC
-SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shiftmax, CTLFLAG_RW, &pps_shiftmax, 0, "");
-SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shift, CTLFLAG_RW, &pps_shift, 0, "");
+SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shiftmax, CTLFLAG_RW, &pps_shiftmax, 0, "max interval duration (s) (shift)");
+SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shift, CTLFLAG_RW, &pps_shift, 0, "interval duration (s) (shift)");
SYSCTL_LONG(_kern_ntp_pll, OID_AUTO, time_monitor, CTLFLAG_RD,
- &time_monitor, 0, "");
+ &time_monitor, 0, "last time offset scaled (ns)");
-SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD, &pps_freq, sizeof(pps_freq), "I", "");
-SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD, &time_freq, sizeof(time_freq), "I", "");
+SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD, &pps_freq, sizeof(pps_freq), "I", "scaled frequency offset (ns/s)");
+SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD, &time_freq, sizeof(time_freq), "I", "frequency offset (ns/s)");
#endif
/*
Index: sys/kern/kern_shutdown.c
===================================================================
--- sys/kern/kern_shutdown.c (revision 219510)
+++ sys/kern/kern_shutdown.c (working copy)
@@ -604,7 +604,7 @@
static int poweroff_delay = POWEROFF_DELAY;
SYSCTL_INT(_kern_shutdown, OID_AUTO, poweroff_delay, CTLFLAG_RW,
- &poweroff_delay, 0, "");
+ &poweroff_delay, 0, "Delay before poweroff to write disks caches (usecs)");
static void
poweroff_wait(void *junk, int howto)
@@ -624,7 +624,7 @@
*/
static int kproc_shutdown_wait = 60;
SYSCTL_INT(_kern_shutdown, OID_AUTO, kproc_shutdown_wait, CTLFLAG_RW,
- &kproc_shutdown_wait, 0, "");
+ &kproc_shutdown_wait, 0, "Max wait time(secs) to stop for each process");
void
kproc_shutdown(void *arg, int howto)
Index: sys/kern/kern_thr.c
===================================================================
--- sys/kern/kern_thr.c (revision 219510)
+++ sys/kern/kern_thr.c (working copy)
@@ -65,7 +65,7 @@
static int max_threads_hits;
SYSCTL_INT(_kern_threads, OID_AUTO, max_threads_hits, CTLFLAG_RD,
- &max_threads_hits, 0, "");
+ &max_threads_hits, 0, "kern.threads.max_threads_per_proc hits count");
#ifdef COMPAT_FREEBSD32
Index: sys/kern/uipc_sockbuf.c
===================================================================
--- sys/kern/uipc_sockbuf.c (revision 219510)
+++ sys/kern/uipc_sockbuf.c (working copy)
@@ -1051,4 +1051,4 @@
SYSCTL_OID(_kern_ipc, KIPC_MAXSOCKBUF, maxsockbuf, CTLTYPE_ULONG|CTLFLAG_RW,
&sb_max, 0, sysctl_handle_sb_max, "LU", "Maximum socket buffer size");
SYSCTL_ULONG(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW,
- &sb_efficiency, 0, "");
+ &sb_efficiency, 0, "socket buffer size mbufs waste factor");
Index: sys/kern/vfs_syscalls.c
===================================================================
--- sys/kern/vfs_syscalls.c (revision 219510)
+++ sys/kern/vfs_syscalls.c (working copy)
@@ -878,7 +878,10 @@
static int chroot_allow_open_directories = 1;
SYSCTL_INT(_kern, OID_AUTO, chroot_allow_open_directories, CTLFLAG_RW,
- &chroot_allow_open_directories, 0, "");
+ &chroot_allow_open_directories, 0, "Allow a process to chroot(2) if it has a directory open:\n"
+ "\t0: disallowed for all processes.\n"
+ "\t1: allowed for processes that were not already chroot(2)'ed.\n"
+ "\t2: allowed for all processes.");
/*
* Change notion of root (``/'') directory.
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103121442.p2CEgFqP095739>
