procfs

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.

The proc file system acts as an interface to internal data structures about running processes in the kernel.

Tom J. Killian implemented the UNIX 8th Edition (V8) version of /proc: he presented a paper titled "Processes as Files" at USENIX in June 1984.

This kind of procfs supported the creation of ps, but the files could only be accessed with functions read(), write(), and ioctl().

[citation needed] As of February 2011[update], procfs is gradually becoming phased out in FreeBSD,[3] and it has turned to use the sysctl interface instead for process-related information.

[5] macOS did not implement procfs and user space programs have to use the sysctl interface for retrieving process data.

Linux first added a /proc filesystem in v0.97.3, September 1992, and first began expanding it to non-process related data in v0.98.6, December 1992.