summaryrefslogtreecommitdiffstats
path: root/share/man/man5/kernfs.5
blob: fbf797a70ee80cc82d156f7704b3278ea41b624e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.\" Copyright (c) 1996
.\"	Mike Pritchard <mpp@FreeBSD.org>.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by Mike Pritchard.
.\" 4. Neither the name of author nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"	$Id: kernfs.5,v 1.3 1997/03/07 03:28:02 jmg Exp $
.\"
.Dd December 14, 1996
.Dt kernfs 5
.Os BSD 4.4
.Sh NAME
.Nm kernfs
.Nd kernel file system
.Sh SYNOPSIS
.Bd -literal
kern		/kern	kernfs	rw 0 0
.Ed
.Sh DESCRIPTION
The kernel file system, or
.Nm kernfs ,
provides access to information on the currently running kernel.
It is normally mounted on
.Pa /kern .
The file system includes several regular file which can be
read, and some of which can also be written.
The contents of the files in in a machine-independent format,
either a string, or and integer in decial ASCII.  A trailing
newline character is added when a number is returned.
.Pp
The mount point contains the following  files:
.Bl -tag -width copyright
.It Pa bootfile
The path from which the current kernel was booted.
.It Pa boottime
The time at which the system was last booted (decimal ASCII).
.It Pa copyright
The kernel copyright message.
.It Pa hostname
The current hostname, with a trailing newline.  The
current hostname can be changed by writing to this file.
A trailing newline will be stripped from the hostname being
wirtten.
.It Pa hz
The frequency of the system clock (decimal ASCII).
.It Pa  loadavg
the 1, 5 and 15 minute load averages in kernel fixed-point
format.  The final integer is the fix-point scaling factor.
All numbers are in decimal ASCII.
.It Pa pagesize
The machine pagesize (decimal ASCII).
.It Pa physmem
The number of pages of physical memory in the machine (decimal ASCII).
.It Pa root
The system root directory.  In a chroot'ed environment,
.Xr mount_kernfs 8
can be used to create a new 
.Pa /kern
mount point.
.Pa /kern/root
will then refer to the system global root, not the current
process root.  Not currently enabled..
.It Pa rootdev
The root device.  Not currently enabled.
.It Pa rrootdev
The raw root device.  Not currently enabled.
.It Pa time
The second and microsecond values of the system clock (decimal ASCII).
.It Pa version
The kernel version string.  The head line for
.Pa /etc/motd
can be generated by running
.Dq Ic "sed 1q /kern/version"
.El
.Pp
Most of the information provided by the
.Nm
is also available from
.Xr sysctl 8 .
.Sh FILES
.Bl -tag -width /kern/XXXXXXX
.It Pa /kern
normal mount point for the
.Nm kernfs .
.El
.Sh SEE ALSO
.Xr sysctl 3 ,
.Xr mount_kernfs 8 ,
.Xr sysctl 8
.Sh HISTORY
The
.Nm
first appeared in
.Bx 4.4 .
The
.Nm
manual page first appeared in
.Fx 2.2 .
.Sh AUTHORS
This manual page was written by
.An Mike Pritchard Aq mpp@FreeBSD.org ,
and was adapted from the
.Xr mount_kernfs 8
manual page written by
.An Jan-Simon Pendry .
OpenPOWER on IntegriCloud