15

I'd like to know more about the advanced uses of the /proc and /sys virtual filesystems, but I don't know where to begin. Can anyone suggest any good sources to learn from? Also, since I think sys has regular additions, what's the best way to keep my knowledge current when a new kernel is released.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
xenoterracide
  • 57,918
  • 74
  • 184
  • 250

4 Answers4

11

You can look into the documentation which comes with the kernel source. (possibly greping for proc/sys ...).

Located at Documentation/filesystems: proc.txt and sysfs.txt.

wag
  • 35,104
  • 11
  • 66
  • 51
maxschlepzig
  • 56,316
  • 50
  • 205
  • 279
9

Read this blog post: Solving problems with proc

There are a few tips what you can do with the proc filesystem. Among other things, there is a tip how to get back a deleted disk image or how to staying ahead of the OOM killer.

Don't forget to read the comments, there are good tips, too.

Mei
  • 1,136
  • 9
  • 12
cahuk
  • 216
  • 1
  • 5
3

The documentation in the Linux source tree is a good place (usually found in /usr/src/linux/Documentation is source is installed). Some distros make a separate package out of it. But, alas, much of it can only be understood by looking at the kernel source code. I have tried to encapsulate some of it in Python modules, so you might also be interested in that. The procps source code is also a good source of information.

Keith
  • 7,828
  • 1
  • 27
  • 29
2

The IBM DeveloperWorks library is a good place for articles like this. I didn't find anything directly applicable, but the 'Resources' section of a paper led me to this. It has some good info...

http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlproc.html

pboin
  • 1,470
  • 1
  • 11
  • 12