From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1dc3e364e2f3419d X-Google-Attributes: gidfee84,public From: john@iastate.edu (John Hascall) Subject: Re: about /proc Date: 1997/11/21 Message-ID: <653d90$uuu$1@news.iastate.edu>#1/1 X-Deja-AN: 291170336 References: <01bcf549$fbad5630$5b210060@hacker> Organization: Iowa State University, Ames, Iowa USA Newsgroups: comp.unix.osf.osf1 Vincent Huang wrote: }Hello! }I use DU4.0B OS in my dec1000a server, }and I found one directory called "proc" in root directory If you do "man 4 proc" it'll explain a lot. }somebody said that these files in the /proc directory means the total }process running in this environment ,if this point of view is right. }here is my questions.... }1). What does it mean about the size of one file in /proc directory , } the space of that process occuppied in RAM? or...? The "size" of the file is the size of the process's address space (and the filename is the pid). Example: lambda.cc> ls -l /proc/01314 -rw------- 1 root system 8806400 Nov 21 01:22 /proc/01314 lambda.cc> ps l01314 UID PID PPID CP PRI NI VSZ RSS WCHAN S TTY TIME COM 0 1314 1 0 42 0 800K 0K 6b8f98 U ?? 0:09.70 /sb }2). why the usauge of /proc always to be 100% The proc filesystem is not real, it takes no actual space. lambda.cc> df -k -t procfs Filesystem 1024-blocks Used Available Capacity Mounted on /proc 0 0 0 100% /proc I'd have called 0 of 0 0%, but they called it 100%, but it makes little difference. }3). the total size of these files in /proc equal to the size of RAM? No (see #1). }4). those process in swap space would also show up in /proc directory? Yup. All processes, even swapped ones: lambda.cc> ps l15735 UID PID PPID CP PRI NI VSZ RSS WCHAN S TTY TIME COM 0 15735 1 0 44 0 432K 0K ttyin IW + console 0:00.06 /us lambda.cc> ls -l /proc/15735 -rw------- 1 root system 8642560 Nov 21 01:25 /proc/15735 John -- John Hascall, Software Engr. Shut up, be happy. The conveniences you ISU Computation Center demanded are now mandatory. -Jello Biafra mailto:john@iastate.edu http://www.cc.iastate.edu/staff/systems/john/welcome.html <-- the usual crud