|
|
procfsprocfs, a.k.a. "/proc", is the primary method for interacting with processes on OpenSolaris. Most other operating systems view /proc as a primary interface (i.e. "cat /proc/<pid>/map"), and application must either parse the text output or do more complicated manipulation through a system call. In Solaris, we have taken a different approach, where /proc is the de facto programmatic interface, and tools are designed to be layered on top of this interface. This results in a much more robust implementation that has some truly unique features. One thing to note is that /proc is not a repository for system-wide information (as some OSes do), only processes. The primary documenation for /proc can be found in proc(4). For a history of /proc and a (brief) comparison with other operating systems, check out Eric Schrock's blog on the subject. Using the interfaces effectively can be quite a challenge. If you are buliding a project in OpenSolaris (the interfaces are not public), take a look at libproc, a simplified abstraction layer built on top of /proc. Finding the SourceYou can find the source code in [usr/src/uts/common/fs/proc]. The code combines the vnode and VFS interfaces, as well as some general infrastructure that other parts of the kernel commonly use. Here's a brief description of each file.
Understanding the SourceXXX in progress |