The OutRider Computing Journal: Using sysctl the Command and the Subroutine
Aug 19, 2000, 20:41 (0 Talkback[s])
(Other stories by Jason Fink)
Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers
[ Thanks to Jason R.
Fink for this link. ]
"Coming from a hybrid Sys V and BSD system, the first time I
began maintaining a BSD system I was immediately plunged into
making system level changes and finding out very specific
information about the system. There is a tool for just such a task,
sysctl. Along with that, however, I had come across an unusual
program that needed access to such information as well. The program
needed the information "hard coded", something I did not like.
Luckily, the sysctl calls are easily (and extraordinarily well
documented) accessible via a simple system subroutine. This article
will cover two aspects of sysctl:
- Some examples using the sysctl command.
- Examples with sample code on using the sysctl subroutines.
Note: Examples were drawn from all three free BSDs (I have run all
three of them at one time or another): NetBSD, FreeBSD and
"What About sysctl for Linux...
To the best_of_my_knowledge system parms associated with sysctl
can be viewed and modified under /proc/sys (for the most part) on
Linux systems. When programmatic access is required it is
recommended to use /proc as well."