Re: /proc through NFS

Linus Torvalds (torvalds@cs.helsinki.fi)
Wed, 13 Nov 1996 10:47:50 +0200 (EET)


On Tue, 12 Nov 1996, David Howells wrote:
> I would imagine this is because /proc files in general have zero lengths, and
> so anything that stat's them will assume that they don't contain anything.
>
> I find that less doesn't work on them either.

Indeed. To get /proc to work over NFS you have to give the files their
correct length, and that is not done by the normal kernel (because the length
calculations are non-trivial).

What you _can_ do to fake it and to generally make it work for most cases is
to just create a patched kernel that fakes the lengths to some random value.
I've used this once to debug a kernel problem over NFS. Sick, but potentially
useful (I made all /proc files be 4096 bytes in length, which happens to be a
nice round random number).

Linus