BBS水木清华站∶精华区

发信人: sputer.bbs@csie.nctu.edu.tw (bird), 看板: linux 
标  题: Re: 请问 /proc 
发信站: 交大资工凤凰城资讯站 (Wed Jul 24 08:18:39 1996) 
转信站: maple!news.ee.nthu!news.csie.nctu!phoenix 
 
==> 在 jessy.bbs@bbs.cs.nccu.edu.tw (相思成灾) 的文章中提到: 
         请问为什麽我在 fstab 中已经 include 
         /proc proc /proc defaults 
         可是在  /proc 的目录下的档案都是  0 bytes 呢?怪怪. 
         (除了 kcore 是 8392704 bytes, self 是 64 bytes..) 
  As I know, it's a link to the kernel to the specific parameter like cpuinfo 
 interrupts... They are all links so with 0 byte. 
         请问 /proc 底下的 77/ 81/ 83/ 84/ ... 是做什麽的呢? 
  Each number present the process number of each process. And in every numbered 
directory, there are numerous attributes about each process. So you can use 
ps -ax to see all process in the system runnning or sleeping and you can find 
the process number entry under /proc/<number> present each process. 
 
         谢谢解答,感激不尽. :) 
 
  That's only I know and I don't guarentee anything!!! 
 
 -------------------------------------------------------------------------- < 
 
发信人: Hanky.bbs@cis.nctu.edu.tw (专收破烂的小阿吉), 看板: linux 
标  题: Re: 请问 /proc 
发信站: 交大资科_BBS (Wed Jul 24 20:34:41 1996) 
转信站: maple!news.ee.nthu!news.cis.nctu!cis_nctu 
 
==> 在 jessy.bbs@bbs.cs.nccu (相思成灾) 的文章中提到: 
         请问为什麽我在 fstab 中已经 include 
         /proc proc /proc defaults 
         可是在  /proc 的目录下的档案都是  0 bytes 呢?怪怪. 
         (除了 kcore 是 8392704 bytes, self 是 64 bytes..) 
         请问 /proc 底下的 77/ 81/ 83/ 84/ ... 是做什麽的呢? 
         谢谢解答,感激不尽. :) 
 
那个是 System V 的 proc file system, 给写 system program 一种 
更方便的东西......那些只是 process 及 system 的一些重要『资讯』. 
例如用个简单的 'cat /proc/loadavg' 就可以得到 load 值, 比较起 
一些 system call (例如利用 kmem) 那真是方便太多了。 
 
如果有兴趣研究它, procps-0.9x 这套工具的 source code 是很不错 
的□例。  另一个更棒的□例是 kernel source code 中, /usr/src/linux/fs/proc/ 
下的东东, 以及其他会用 procfs 来表达自己资讯的 *.c 档。 
 

BBS水木清华站∶精华区