Talk:Procfs

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 85.148.224.39 (talk) at 19:33, 15 December 2008 (Added two remarks). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Jump to navigation Jump to search

Procfs does not merely display information, but it can be used to implement kernel options (ie. ACPI) by for example using echo to change a proc value. However I am unclear on how the kernel treats procfs, does it read from the "file" constantly? John Riemann Soong 04:17, 25 July 2006 (UTC)[reply]

Procfs does not contain "real" files, it is a virtual filesystem that communicates with the kernel. Techefnet 00:16, 8 November 2006 (UTC)[reply]
It is a pseudo-filesystem (in the developers terms), which translates filesystem changes into kernel configuration options (such as the ip_forward option), and kernel information is exposed as files in the subdirectories of /proc/. In real terms it is not separate from the kernel to the extent that the kernel would need to read it constantly, it is a translation layer which resides entirely in the kernel itself, and because all filesystem changes or reads must go through the kernel anyway they are translated at this point into various options instead of altering the files (Which don't really exist). When you read the /proc filesystem with commands such as "ls" or "cat" you are effectively asking the kernel for this information directly. Mrsteveman1 06:02, 3 August 2007 (UTC)[reply]

The linux section is written somewhat like a tutorial, there is one line which is specifically written as if the writer is speaking to the reader, i think it says something like 'the one i have used the most', just seems a little un-wikipedia like for lack of a better term. It would be better to simply list a few (not all) of the various /proc interfaces, perhaps the most significant such as cpuinfo and meminfo, a few options that can literally change kernel behavior, and things such as the process, module, and partition lists. Everthing else is a bit excessive considering the relative lack of similar info given for other operating systems. Mrsteveman1 06:02, 3 August 2007 (UTC)[reply]

pseudo-file

pseudo-file as in device node/device file? --Abdull 11:08, 30 August 2007 (UTC)[reply]

No, at least not as described by those articles - these files appear as regular files, except that their size is usually shown as 0. Once one reads from them, their content is displayed by the kernel. --Joy [shallot] 00:06, 31 August 2007 (UTC)[reply]

Refreshs

How often are statistics in /proc updated? The article doesn't say. --Gwern (contribs) 02:18 11 December 2007 (GMT)

They are calculated when you read the pseudo-files: remember, they aren't traditional files, they don't occupy space on a filesystem. -- anon —Preceding unsigned comment added by 128.240.229.68 (talk) 12:51, 19 February 2008 (UTC)[reply]

/proc/cpuinfo table seems to think that Intel/x86 is the only ISA in the world

It should at least mention what Linux does on other processors than Intel x86 ones, or, possibly, that this only is implemented on Intel x86.

"ps operates entirely in user mode"?

The remark "For example the GNU version of ps operates entirely in user mode, using the procfs to obtain its data" does not make much sense to me. One has to make kernel calls to read procfs. I do not see how that is different from doing other kernel calls to obtain process information.