Why is procfs deprecated in favor of procstat?

Kelly Dean kellydeanch at yahoo.com
Tue Feb 22 08:59:16 UTC 2011

I see five different issues, so I need to clarify which one I was asking about.

1. How to request the data in question from the kernel: by reading a file, or by making a dedicated system call. Jeremy says read a file.

2. The format the kernel returns the data in. Oliver says the Plan 9 way of the kernel rendering text and then userland tools parsing text is silly. The kernel should return binary, which userland tools can then use directly, or render to text for a person to read.

3. Conflating /proc with Jeremy's /sysctl.

4. Whether /proc and/or /sysctl should be read-only.

5. Whether things in different security domains should see the same procfs.

The question I meant to ask was just the first one. What's wrong with requesting the data by reading a file instead of making a dedicated system call? What's the advantage of the system call?

But since the other issues came up: 2, I agree the kernel should return binary. 3, separate /proc and /sysctl. 4, no comment. 5, Oliver, didn't you answer your own objection? If things are supposed to be in the same security domain, then there can't be a vulnerability caused by them sharing a common procfs, and if they're supposed to be in different security domains, then put them in jails, where they don't share a common procfs.

Jeremy, when you said procfs should be removed, did you mean just for the same reasons Oliver said, or did you have other reasons?


More information about the freebsd-fs mailing list