kernfs(5)

NAME
kernfs - kernel file system

SYNOPSIS

    kern		/kern	kernfs	rw 0 0

DESCRIPTION
The kernel file system, or kernfs, provides access to information on the currently running kernel. It is normally mounted on /kern. The file system includes several regular files which can be read, and some of which can also be written. The contents of the files are in a machine-independent format, either a string or an integer in decimal ASCII. A trailing newline character is added when a number is returned.

The mount point contains the following files:

bootfile
    The path from which the current kernel was booted.

boottime
    The time at which the system was last booted (decimal ASCII).

copyright
    The kernel copyright message.

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 written.

hz  The frequency of the system clock (decimal ASCII).

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.

pagesize
    The machine pagesize (decimal ASCII).

physmem
    The number of pages of physical memory in the machine (decimal ASCII).

root
    The system root directory. In a chroot'ed environment, mount_kernfs(8) can be used to create a new /kern mount point. /kern/root will then refer to the system global root, not the current process root. Not currently enabled.

rootdev
    The root device. Not currently enabled.

rrootdev
    The raw root device. Not currently enabled.

time
    The second and microsecond values of the system clock (decimal ASCII).

version
    The kernel version string. The head line for /etc/motd can be generated by running “sed 1q /kern/version”

Most of the information provided by the kernfs is also available from sysctl(8).

FILES

/kern
    normal mount point for the kernfs.

SEE ALSO
sysctl(3), mount_kernfs(8), sysctl(8)

HISTORY
The kernfs first appeared in 4.4BSD. The kernfs manual page first appeared in FreeBSD 2.2.

AUTHORS
This manual page was written by Mike Pritchard <mpp@FreeBSD.org>, and was adapted from the mount_kernfs(8) manual page written by Jan-Simon Pendry.