Page MenuHomeFreeBSD

sysctlinfo interface
AbandonedPublic

Authored by asiciliano on Sep 18 2019, 3:55 AM.
Tags
None
Referenced Files
F81591533: D21700.diff
Thu, Apr 18, 3:20 PM
Unknown Object (File)
Feb 24 2024, 10:33 AM
Unknown Object (File)
Feb 11 2024, 7:47 PM
Unknown Object (File)
Feb 11 2024, 3:16 PM
Unknown Object (File)
Feb 10 2024, 5:59 AM
Unknown Object (File)
Dec 24 2023, 4:52 PM
Unknown Object (File)
Dec 21 2023, 4:43 AM
Unknown Object (File)
Nov 19 2023, 12:18 AM

Details

Reviewers
emaste
markj
imp
Group Reviewers
manpages
Summary

sysctlinfo is a new interface to explore the sysctl MIB-Tree and to pass objects info to userland,
https://papers.freebsd.org/2020/bsdcan/siciliano-sysctlinfo/
https://gitlab.com/alfix/sysctlinfo

After a refactoring the kernel computation is ~100% more efficient than the undocumented interface to pass all info about an object to userland.

Currently it is used by:
sysutils/sysctlbyname-improved-kmod
devel/libsysctlmibinfo2
audio/mixertui
sysutils/nsysctl
deskutils/sysctlview
sysctl-mib-html (https://gitlab.com/alfix/sysctl-mib-html)

Test Plan

The interface is used by several ports,
Furthermore https://gitlab.com/alfix/sysctlinfo has

testing/ misc tests (name, CTL_MAXNAME levels, etc)
testing/regression/ compatibility with the 'undocumented interface'
testing/time/: efficiency
testing/lock/: trivial nodes to test lock/system panic
converted/: converted tools (sysctl, sysctlbyname,sysctlnametomib)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

asiciliano edited the test plan for this revision. (Show Details)

Only a minor comma missing in the man page. Otherwise, it's great.
Thank you!

share/man/man3/sysctlinfo.3
169

s/format respectively/format, respectively/

This comment was removed by asiciliano.
share/man/man3/sysctlinfo.3
169

I' ll update, thank you

update the manual page to address revision feedback

OK from manpages. Someone else should look at the actual code to see if there are issues.

asiciliano edited the test plan for this revision. (Show Details)

Update sysctlinfo.h: CTL_SYSCTL is in sysctl.h
Improve lock (use a shared lock updating sysctl.h/kern_sysctl.c)
Move the implementation to kern_mib.c (sysctlinfo uses nothing from kern_sysctl.c)
Update man/man[3|4]/Makefile

asiciliano edited the test plan for this revision. (Show Details)
asiciliano edited the summary of this revision. (Show Details)
asiciliano edited the test plan for this revision. (Show Details)

Update sysctlinfo 20210222

Abandon: uses struct sysctl_oid definition previous FreeBSD 1400071