In Linux it is common to use proc FS as a means to talk with a kernel module, receive statistics from the kernel or set up some flags. What can be used for these in Solaris?
procfs
was initially designed to permit access to process related information. On Linux, this goal derailed and various non process related pseudo files and directories started to be present there. This is slowly being corrected by relocating (some of) them in /sys
which uses sysfs
and not procfs
.
There has not been such issue with Solaris where procfs
is strictly restricted to process data. One main difference between Solaris and Linux procfs
implementations is Linux is often providing plain text data where Solaris is exposing binary structures.
For non process related statistics, the common Solaris interface is an API, kstat(3kstat)
which is used by many commands and can also be queried from the shell with the kstat(1)
command.
The way to set flags and "communicate" with the kernel depends on precisely what need to be done, there is no single interface. It also evolved depending on the Solaris releases.