Why is procfs deprecated in favor of procstat?

Julian Elischer julian at freebsd.org
Thu Feb 24 02:59:29 UTC 2011

On 2/21/11 9:07 AM, Oliver Fromme wrote:
> Kelly Dean<kellydeanch at yahoo.com>  wrote:
>   >  http://ivoras.sharanet.org/freebsd/freebsd8.html says that
>   >  procfs is deprecated in favor of procstat. But Plan 9 says
>   >  that procfs is the right way to do things.
> Linux says the same.  But it's irrelevant what they say.
> FreeBSD is not Plan 9, and FreeBSD is not Linux.
> Procfs has a long history of security vulnerabilities and
> other problems.  I do not mount procfs on most machines
> I'm responsible for, especially not on machines that have
> user accounts or services that are not restricted to jails.
> I also think it is inefficient to let the kernel render
> data to ASCII, and then have userland tools parse that
> ASCII data again.  That's ridiculous.
I disagree. It was ridiculous when pdp-11s had 500,000  instructions 
per second
but there are many cases to day where it is not ridiculous.
I don't think that procfs is by definition bad, and I am no really 
sure where this
"edict" has come from.

At fusion-io  we have abstracted the control stuff
to export as sysctl when compiled in the freebsd driver and procfs in 
the linux driver.
While sysctl is 'ok' I will admit that the procfs variant is a bit 
more convenient to use.
simply because you can enumerate the damned tree  without seeing all 
the contents.

>   There is no sane
> reason for putting kernel data as ASCII text into a pseudo
> file system.
> Best regards
>     Oliver

More information about the freebsd-fs mailing list