The /proc Filesystem

Updated: October 28, 2024

If you need to gather information about the processes running on your machine, you can use the /proc filesystem. There's a section about it in the Processes chapter of the QNX Neutrino Programmer's Guide. This appendix describes the main features of the /proc filesystem so you can use it in your own utilities.

CAUTION:
This interface is intended for gathering information and debugging. Don't use it in production systems to control the behavior of processes and threads.

First of all, the /proc filesystem is a virtual filesystem — it doesn't actually exist on disk; it exists only as a figment of the process manager's imagination.

The /proc filesystem contains a number of entities:

Our main focus in this chapter is the first item, the directories describing each process in the system. We'll describe the functions available to get information about the processes (and their threads).

For completeness, however, we'll just briefly mention the other two items.