blob: 1a782f6591a97ecd568c2a96fd0d8cbd87998009 [file] [log] [blame] [raw]
/*
* sysctlfs file system README
*
* (c) 2002 Pawel Jakub Dawidek <nick@garage.freebsd.pl>
*
* $Id: README,v 1.2 2002/12/24 08:50:52 jules Exp $
*
*/
With this kld module You can mount sysctl tree as file system.
Sysctlfs is based on procfs(5).
Instalation is simple:
# cd /path/to/sysctlfs
# make ; make install ; make load
# cd mount_sysctlfs
# make
# mkdir -m 755 /sysctl
# ./mount_sysctlfs sysctlfs /sysctl
Now try opartions like:
# ls -l /sysctl
total 6
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 compat
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 debug
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 hw
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 jail
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 kern
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 machdep
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 net
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 p1003_1b
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 sysctl
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 user
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 vfs
dr-xr-xr-x 1 root wheel 512 24 Gru 08:06 vm
# cd /sysctl/kern
# ls -ld hostname init_path ipc
-rw-r--r-- 1 root wheel 23 24 Gru 08:08 hostname
-r--r--r-- 1 root wheel 56 24 Gru 08:08 init_path
dr-xr-xr-x 1 root wheel 512 24 Gru 08:08 ipc
# sysctl kern.maxfiles
kern.maxfiles: 5096
# cat maxfiles
5096
# echo 8888 > maxfiles
# sysctl kern.maxfiles
kern.maxfiles: 8888
# cat hostname
leila.mikrus.pw.edu.pl
# echo test.mikrus.pw.edu.pl > hostname
# hostname
test.mikrus.pw.edu.pl
TODO:
- Better file inodes generation.
- Some realistic statistics for file system (statfs(2), etc.).
- Some locks are needed I think.
--
Pawel Jakub Dawidek <nick@garage.freebsd.pl>