Add descriptions for sysctls in kern_mib.c and sysctl.3 which lack them.
r343532 noted the difference between "hw.realmem" and "hw.physmem", which I was previously unaware of. I discovered that neither sysctl had a description visible via `sysctl -d', so I found where they were defined and added suitable descriptions. While in the file, I went ahead and added descriptions for all the others which lacked them. I also updated sysctl.3 accordingly Reviewed by: kib, bcr MFC after: 1 weeks Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D19007
This commit is contained in:
parent
8b3a3ef841
commit
557e162fe7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345457
@ -28,7 +28,7 @@
|
||||
.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 22, 2017
|
||||
.Dd March 22, 2019
|
||||
.Dt SYSCTL 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -284,6 +284,7 @@ privilege may change the value.
|
||||
.It Dv HW_FLOATINGPT Ta integer Ta no
|
||||
.It Dv HW_MACHINE_ARCH Ta string Ta no
|
||||
.It Dv HW_REALMEM Ta integer Ta no
|
||||
.It Dv HW_AVAILPAGES Ta integer Ta no
|
||||
.El
|
||||
.Bl -tag -width 6n
|
||||
.It Li HW_MACHINE
|
||||
@ -295,9 +296,10 @@ The number of cpus.
|
||||
.It Li HW_BYTEORDER
|
||||
The byteorder (4321 or 1234).
|
||||
.It Li HW_PHYSMEM
|
||||
The bytes of physical memory.
|
||||
Amount of physical memory (in bytes), minus the amount used by the kernel,
|
||||
pre-loaded modules, and (on x86) the dcons buffer.
|
||||
.It Li HW_USERMEM
|
||||
The bytes of non-kernel memory.
|
||||
Amount of memory (in bytes) which is not wired.
|
||||
.It Li HW_PAGESIZE
|
||||
The software page size.
|
||||
.\".It Fa HW_DISKNAMES
|
||||
@ -307,7 +309,13 @@ Nonzero if the floating point support is in hardware.
|
||||
.It Li HW_MACHINE_ARCH
|
||||
The machine dependent architecture type.
|
||||
.It Li HW_REALMEM
|
||||
The bytes of real memory.
|
||||
Amount of memory (in bytes) reported by the firmware.
|
||||
That value is sometimes not sane; in that case, the kernel reports the max
|
||||
memory address instead.
|
||||
.It Li HW_AVAILPAGES
|
||||
The same value as
|
||||
.Li HW_PHYSMEM ,
|
||||
measured in pages rather than bytes.
|
||||
.El
|
||||
.Ss CTL_KERN
|
||||
The string and integer information available for the CTL_KERN level
|
||||
|
@ -187,7 +187,8 @@ sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
|
||||
return (sysctl_handle_long(oidp, &val, 0, req));
|
||||
}
|
||||
SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG | CTLFLAG_RD,
|
||||
0, 0, sysctl_hw_physmem, "LU", "");
|
||||
0, 0, sysctl_hw_physmem, "LU",
|
||||
"Amount of physical memory (in bytes)");
|
||||
|
||||
static int
|
||||
sysctl_hw_realmem(SYSCTL_HANDLER_ARGS)
|
||||
@ -201,7 +202,8 @@ sysctl_hw_realmem(SYSCTL_HANDLER_ARGS)
|
||||
return (sysctl_handle_long(oidp, &val, 0, req));
|
||||
}
|
||||
SYSCTL_PROC(_hw, HW_REALMEM, realmem, CTLTYPE_ULONG | CTLFLAG_RD,
|
||||
0, 0, sysctl_hw_realmem, "LU", "");
|
||||
0, 0, sysctl_hw_realmem, "LU",
|
||||
"Amount of memory (in bytes) reported by the firmware");
|
||||
|
||||
static int
|
||||
sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
|
||||
@ -216,9 +218,11 @@ sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
|
||||
return (sysctl_handle_long(oidp, &val, 0, req));
|
||||
}
|
||||
SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG | CTLFLAG_RD,
|
||||
0, 0, sysctl_hw_usermem, "LU", "");
|
||||
0, 0, sysctl_hw_usermem, "LU",
|
||||
"Amount of memory (in bytes) which is not wired");
|
||||
|
||||
SYSCTL_LONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "");
|
||||
SYSCTL_LONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0,
|
||||
"Amount of physical memory (in pages)");
|
||||
|
||||
u_long pagesizes[MAXPAGESIZES] = { PAGE_SIZE };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user