1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>The /proc filesystem</TITLE>
<META NAME="description" CONTENT="The /proc filesystem">
<META NAME="keywords" CONTENT="sag">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<LINK REL=STYLESHEET HREF="sag.css">
</HEAD>
<BODY LANG="EN" >
<A NAME="tex2html626" HREF="node28.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html624" HREF="node20.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html620" HREF="node26.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html628" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html629" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html627" HREF="node28.html">Using Disks and Other </A>
<B>Up:</B> <A NAME="tex2html625" HREF="node20.html">Overview of the Directory </A>
<B> Previous:</B> <A NAME="tex2html621" HREF="node26.html">The /var filesystem</A>
<BR> <P>
<A NAME="943"> </A><H1><A NAME="SECTION00450000000000000000">The <tt>/proc</tt> filesystem</A></H1>
<P>
The <tt>/proc</tt><A NAME="945"> </A> filesystem contains a illusionary filesystem.
It does not exist on a disk. Instead, the kernel creates it
in memory. It is used to provide information about the
system (originally about processes, hence the name). Some
of the more important files and directories are explained
below. The <tt>/proc</tt><A NAME="947"> </A> filesystem is described in more detail
in the <em>proc</em><A NAME="949"> </A> manual page.
<DL ><DT><STRONG><tt>/proc/1</tt><A NAME="951"> </A></STRONG>
<DD>
A directory with information about process number 1.
Each process has a directory below <tt>/proc</tt><A NAME="953"> </A> with
the name being its process identification number.
<DT><STRONG><tt>/proc/cpuinfo</tt><A NAME="955"> </A></STRONG>
<DD>
Information about the processor, such as its type, make,
model, and perfomance.
<DT><STRONG><tt>/proc/devices</tt><A NAME="957"> </A></STRONG>
<DD>
List of device drivers configured into the currently
running kernel.
<DT><STRONG><tt>/proc/dma</tt><A NAME="959"> </A></STRONG>
<DD>
Shows which DMA channels are being used at the moment.
<DT><STRONG><tt>/proc/filesystems</tt><A NAME="961"> </A></STRONG>
<DD>
Filesystems configured into the kernel.
<DT><STRONG><tt>/proc/interrupts</tt><A NAME="963"> </A></STRONG>
<DD>
Shows which interrupts are in use, and how many of each
there have been.
<DT><STRONG><tt>/proc/ioports</tt><A NAME="965"> </A></STRONG>
<DD>
Which I/O ports are in use at the moment.
<DT><STRONG><tt>/proc/kcore</tt><A NAME="967"> </A></STRONG>
<DD>
An image of the physical memory of the system. This
is exactly the same size as your physical memory, but
does not really take up that much memory; it is generated
on the fly as programs access it. (Remember: unless you
copy it elsewhere, nothing under <tt>/proc</tt><A NAME="969"> </A> takes up
any disk space at all.)
<DT><STRONG><tt>/proc/kmsg</tt><A NAME="971"> </A></STRONG>
<DD>
Messages output by the kernel. These are also routed
to <tt>syslog</tt><A NAME="973"> </A>.
<DT><STRONG><tt>/proc/ksyms</tt><A NAME="975"> </A></STRONG>
<DD>
Symbol table for the kernel.
<DT><STRONG><tt>/proc/loadavg</tt><A NAME="977"> </A></STRONG>
<DD>
The `load average' of the system; three meaningless
indicators of how much work the system has to do at
the moment.
<DT><STRONG><tt>/proc/meminfo</tt><A NAME="979"> </A></STRONG>
<DD>
Information about memory usage, both physical and swap.
<DT><STRONG><tt>/proc/modules</tt><A NAME="981"> </A></STRONG>
<DD>
Which kernel modules are loaded at the moment.
<DT><STRONG><tt>/proc/net</tt><A NAME="983"> </A></STRONG>
<DD>
Status information about network protocols.
<DT><STRONG><tt>/proc/self</tt><A NAME="985"> </A></STRONG>
<DD>
A symbolic link to the process directory of the program
that is looking at <tt>/proc</tt><A NAME="987"> </A>. When two processes look
at <tt>/proc</tt><A NAME="989"> </A>, they get different links. This is mainly
a convenience to make it easier for programs to get
at their process directory.
<DT><STRONG><tt>/proc/stat</tt><A NAME="991"> </A></STRONG>
<DD>
Various statistics about the system, such as the number
of page faults since the system was booted.
<DT><STRONG><tt>/proc/uptime</tt><A NAME="993"> </A></STRONG>
<DD>
The time the system has been up.
<DT><STRONG><tt>/proc/version</tt><A NAME="995"> </A></STRONG>
<DD>
The kernel version.
<P>
</DL>
Note that while the above files tend to be easily readable text
files, they can sometimes be formatted in a way that is not
easily digestable. There are many commands that do little more
than read the above files and format them for easier understanding.
For example, the <tt>free</tt><A NAME="997"> </A> program reads <tt>/proc/meminfo</tt><A NAME="999"> </A>
and converts the amounts given in bytes to kilobytes (and adds
a little more information, as well).
<P>
<HR><A NAME="tex2html626" HREF="node28.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html624" HREF="node20.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html620" HREF="node26.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html628" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html629" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html627" HREF="node28.html">Using Disks and Other </A>
<B>Up:</B> <A NAME="tex2html625" HREF="node20.html">Overview of the Directory </A>
<B> Previous:</B> <A NAME="tex2html621" HREF="node26.html">The /var filesystem</A>
<P><ADDRESS>
<I>Lars Wirzenius <BR>
Sat Nov 15 02:32:11 EET 1997</I>
</ADDRESS>
</BODY>
</HTML>
|