Menu

Tree [9a7ced] master /
 History

HTTPS access


File Date Author Commit
 mount_sysctlfs 2018-11-06 WHR WHR [885ba1] Import Pawel Jakub Dawidek's sysctlfs code
 Makefile 2018-11-06 WHR WHR [885ba1] Import Pawel Jakub Dawidek's sysctlfs code
 README 2018-11-06 WHR WHR [885ba1] Import Pawel Jakub Dawidek's sysctlfs code
 sysctlfs.h 2018-11-08 WHR WHR [087626] Get the module built on FreeBSD 9.3
 sysctlfs_subr.c 2021-05-08 WHR WHR [9a7ced] Support kFreeBSD 11
 sysctlfs_vfsops.c 2018-11-08 WHR WHR [087626] Get the module built on FreeBSD 9.3
 sysctlfs_vnops.c 2021-05-08 WHR WHR [9a7ced] Support kFreeBSD 11
 vnode_4.h 2018-11-07 WHR WHR [7a6afc] Get the module built on FreeBSD 5.3

Read Me

/*
 * 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>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.