?? sysctl.3
字號:
.Va struct kinfo_procstructures is returned,whose size depends on the current number of such objects in the system.The third and fourth level names are as follows:.Bl -column "Third level nameXXXXXX" "Fourth level is:XXXXXX" -offset indent.It Pa Third level name Fourth level is:.It KERN\_PROC\_ALL None.It KERN\_PROC\_PID A process ID.It KERN\_PROC\_PGRP A process group.It KERN\_PROC\_TTY A tty device.It KERN\_PROC\_UID A user ID.It KERN\_PROC\_RUID A real user ID.El.It Li KERN_PROFReturn profiling information about the kernel.If the kernel is not compiled for profiling,attempts to retrieve any of the KERN_PROF values willfail with EOPNOTSUPP.The third level names for the string and integer profiling information is detailed below.The changeable column shows whether a process with appropriateprivilege may change the value..Bl -column "GPROFXGMONPARAMXXX" "struct gmonparamXXX" -offset indent.It Sy Pa Third level name Type Changeable.It GPROF\_STATE integer yes.It GPROF\_COUNT u_short[\|] yes.It GPROF\_FROMS u_short[\|] yes.It GPROF\_TOS struct tostruct yes.It GPROF\_GMONPARAM struct gmonparam no.El.PpThe variables are as follows:.Bl -tag -width "123456".It Li GPROF_STATEReturns GMON_PROF_ON or GMON_PROF_OFF to show that profilingis running or stopped..It Li GPROF_COUNTArray of statistical program counter counts..It Li GPROF_FROMSArray indexed by program counter of call-from points..It Li GPROF_TOSArray of.Va struct tostructdescribing destination of calls and their counts..It Li GPROF_GMONPARAMStructure giving the sizes of the above arrays..El.It Li KERN_SAVED_IDSReturns 1 if saved set-group and saved set-user ID is available..It Li KERN_SECURELVLThe system security level.This level may be raised by processes with appropriate privilege.It may only be lowered by process 1..It Li KERN_VDISABLEReturns the terminal character disabling value..It Li KERN_VERSIONThe system version string..It Li KERN_VNODEReturn the entire vnode table.Note, the vnode table is not necessarily a consistent snapshot ofthe system.The returned data consists of an array whose size depends on thecurrent number of such objects in the system.Each element of the array contains the kernel address of a vnode.Va struct vnode *followed by the vnode itself.Va struct vnode ..El.Sh CTL_MACHDEPThe set of variables defined is architecture dependent.Most architectures define at least the following variables..Bl -column "CONSOLE_DEVICEXXX" "integerXXX" -offset indent.It Sy Pa Second level name Type Changeable.It Li CPU_CONSDEV dev_t no.El.Sh CTL_NETThe string and integer information available for the CTL_NET levelis detailed below.The changeable column shows whether a process with appropriateprivilege may change the value..Bl -column "Second level nameXXXXXX" "routing messagesXXX" -offset indent.It Sy Pa Second level name Type Changeable.It PF\_ROUTE routing messages no.It PF\_INET internet values yes.El.Pp.Bl -tag -width "123456".It Li PF_ROUTEReturn the entire routing table or a subset of it.The data is returned as a sequence of routing messages (see.Xr route 4for the header file, format and meaning).The length of each message is contained in the message header..PpThe third level name is a protocol number, which is currently always 0.The fourth level name is an address family, which may be set to 0 toselect all address families.The fifth and sixth level names are as follows:.Bl -column "Fifth level nameXXXXXX" "Sixth level is:XXX" -offset indent.It Pa Fifth level name Sixth level is:.It NET\_RT\_FLAGS rtflags.It NET\_RT\_DUMP None.It NET\_RT\_IFLIST None.El.It Li PF_INETGet or set various global information about the internet protocols.The third level name is the protocol.The fourth level name is the variable name.The currently defined protocols and names are:.Bl -column "Protocol nameXXXXXX" "Variable nameXXX" "integerXXX" -offset indent.It Pa Protocol name Variable name Type Changeable.It ip forwarding integer yes.It ip redirect integer yes.It ip ttl integer yes.It icmp maskrepl integer yes.It udp checksum integer yes.El.PpThe variables are as follows:.Bl -tag -width "123456".It Li ip.forwardingReturns 1 when IP forwarding is enabled for the host,meaning that the host is acting as a router..It Li ip.redirectReturns 1 when ICMP redirects may be sent by the host.This option is ignored unless the host is routing IP packets,and should normally be enabled on all systems..It Li ip.ttlThe maximum time-to-live (hop count) value for an IP packet sourced bythe system.This value applies to normal transport protocols, not to ICMP..It Li icmp.maskreplReturns 1 if ICMP network mask requests are to be answered..It Li udp.checksumReturns 1 when UDP checksums are being computed and checked.Disabling UDP checksums is strongly discouraged..El.Sh CTL_USERThe string and integer information available for the CTL_USER levelis detailed below.The changeable column shows whether a process with appropriateprivilege may change the value..Bl -column "USER_COLL_WEIGHTS_MAXXXX" "integerXXX" -offset indent.It Sy Pa Second level name Type Changeable.It USER\_BC\_BASE\_MAX integer no.It USER\_BC\_DIM\_MAX integer no.It USER\_BC\_SCALE\_MAX integer no.It USER\_BC\_STRING\_MAX integer no.It USER\_COLL\_WEIGHTS\_MAX integer no.It USER\_CS\_PATH string no.It USER\_EXPR\_NEST\_MAX integer no.It USER\_LINE\_MAX integer no.It USER\_POSIX2\_CHAR\_TERM integer no.It USER\_POSIX2\_C\_BIND integer no.It USER\_POSIX2\_C\_DEV integer no.It USER\_POSIX2\_FORT\_DEV integer no.It USER\_POSIX2\_FORT\_RUN integer no.It USER\_POSIX2\_LOCALEDEF integer no.It USER\_POSIX2\_SW\_DEV integer no.It USER\_POSIX2\_UPE integer no.It USER\_POSIX2\_VERSION integer no.It USER\_RE\_DUP\_MAX integer no.It USER\_STREAM\_MAX integer no.It USER\_TZNAME\_MAX integer no.El.Bl -tag -width "123456".Pp.It Li USER_BC_BASE_MAXThe maximum ibase/obase values in the.Xr bc 1utility..It Li USER_BC_DIM_MAXThe maximum array size in the.Xr bc 1utility..It Li USER_BC_SCALE_MAXThe maximum scale value in the.Xr bc 1utility..It Li USER_BC_STRING_MAXThe maximum string length in the.Xr bc 1utility..It Li USER_COLL_WEIGHTS_MAXThe maximum number of weights that can be assigned to any entry ofthe LC_COLLATE order keyword in the locale definition file..It Li USER_CS_PATHReturn a value for the.Ev PATHenvironment variable that finds all the standard utilities..It Li USER_EXPR_NEST_MAXThe maximum number of expressions that can be nested withinparenthesis by the.Xr expr 1utility..It Li USER_LINE_MAXThe maximum length in bytes of a text-processing utility's inputline..It Li USER_POSIX2_CHAR_TERMReturn 1 if the system supports at least one terminal type capable ofall operations described in POSIX 1003.2, otherwise 0..It Li USER_POSIX2_C_BINDReturn 1 if the system's C-language development facilities support theC-Language Bindings Option, otherwise 0..It Li USER_POSIX2_C_DEVReturn 1 if the system supports the C-Language Development Utilities Option,otherwise 0..It Li USER_POSIX2_FORT_DEVReturn 1 if the system supports the FORTRAN Development Utilities Option,otherwise 0..It Li USER_POSIX2_FORT_RUNReturn 1 if the system supports the FORTRAN Runtime Utilities Option,otherwise 0..It Li USER_POSIX2_LOCALEDEFReturn 1 if the system supports the creation of locales, otherwise 0..It Li USER_POSIX2_SW_DEVReturn 1 if the system supports the Software Development Utilities Option,otherwise 0..It Li USER_POSIX2_UPEReturn 1 if the system supports the User Portability Utilities Option,otherwise 0..It Li USER_POSIX2_VERSIONThe version of POSIX 1003.2 with which the system attempts to comply..It Li USER_RE_DUP_MAXThe maximum number of repeated occurrences of a regular expressionpermitted when using interval notation..It Li USER_STREAM_MAXThe minimum maximum number of streams that a process may have openat any one time..It Li USER_TZNAME_MAXThe minimum maximum number of types supported for the name of atimezone..El.Sh CTL_VMThe string and integer information available for the CTL_VM levelis detailed below.The changeable column shows whether a process with appropriateprivilege may change the value..Bl -column "Second level nameXXXXXX" "struct loadavgXXX" -offset indent.It Sy Pa Second level name Type Changeable.It VM\_LOADAVG struct loadavg no.It VM\_METER struct vmtotal no.El.Pp.Bl -tag -width "123456".It Li VM_LOADAVGReturn the load average history.The returned data consists of a.Va struct loadavg ..It Li VM_METERReturn the system wide virtual memory statistics.The returned data consists of a.Va struct vmtotal ..El.Sh RETURN VALUESIf the call to.Nm sysctlis successful, 0 is returned.Otherwise \-1 is returned and.Va errnois set appropriately..Sh ERRORSThe following errors may be reported:.Bl -tag -width Er.It Bq Er EFAULTThe buffer.Fa name ,.Fa oldp ,.Fa newp ,or length pointer.Fa oldlenpcontains an invalid address..It Bq Er EINVALThe.Fa namearray is less than two or greater than CTL_MAXNAME..It Bq Er EINVALA non-null.Fa newpis given and its specified length in.Fa newlenis too large or too small..It Bq Er ENOMEMThe length pointed to by.Fa oldlenpis too short to hold the requested value..It Bq Er ENOTDIRThe.Fa namearray specifies an intermediate rather than terminal name..It Bq Er EOPNOTSUPPThe.Fa namearray specifies a value that is unknown..It Bq Er EPERMAn attempt is made to set a read-only value..It Bq Er EPERMA process without appropriate privilege attempts to set a value..El.Sh FILES.Bl -tag -width <netinet/icmpXvar.h> -compact.It Pa <sys/sysctl.h>definitions for top level identifiers, second level kernel and hardwareidentifiers, and user level identifiers.It Pa <sys/socket.h>definitions for second level network identifiers.It Pa <sys/gmon.h>definitions for third level profiling identifiers.It Pa <vm/vm_param.h>definitions for second level virtual memory identifiers.It Pa <netinet/in.h>definitions for third level Internet identifiers andfourth level IP identifiers.It Pa <netinet/icmp_var.h>definitions for fourth level ICMP identifiers.It Pa <netinet/udp_var.h>definitions for fourth level UDP identifiers.El.Sh SEE ALSO.Xr sysctl 8.Sh HISTORYThe.Nm sysctlfunction first appeared in 4.4BSD.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -