why does /proc/sys/fs/file-nr not match total of /proc/<pid>/fd entries?

From: Chris Friesen
Date: Thu Jan 20 2011 - 15:40:12 EST



Someone asked me a question that I couldn't answer, so I'm passing it on
to you.

Why do the values in /proc/sys/fs/file-nr not match up with the value
given by "ls -al /proc/[0-9]*/fd/ | grep '>' | wc -l" ?


For instance, on my desktop /proc/sys/fs/file-nr gives "9728 0
306699" but the other command gives "2894".


Where is the discrepancy coming from?

Thanks,
Chris

--
Chris Friesen
Software Developer
GENBAND
chris.friesen@xxxxxxxxxxx
www.genband.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/