old-www/LDP/nag2/x-087-2-iface.procfs.html

221 lines
3.6 KiB
HTML

<HTML
><HEAD
><TITLE
>Mounting the /proc Filesystem</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
REL="HOME"
TITLE="Linux Network Administrators Guide"
HREF="index.html"><LINK
REL="UP"
TITLE="Configuring TCP/IP Networking"
HREF="x-087-2-iface.html"><LINK
REL="PREVIOUS"
TITLE="Configuring TCP/IP Networking"
HREF="x-087-2-iface.html"><LINK
REL="NEXT"
TITLE="Installing the Binaries"
HREF="x-087-2-iface.binaries.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Network Administrators Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x-087-2-iface.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 5. Configuring TCP/IP Networking</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x-087-2-iface.binaries.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="X-087-2-IFACE.PROCFS"
>5.1. Mounting the /proc Filesystem</A
></H1
><P
>Some of the configuration tools of the Linux NET-2 and NET-3 release
rely on the <TT
CLASS="FILENAME"
>/proc</TT
> filesystem for communicating
with the kernel. This interface permits access to kernel runtime
information through a filesystem-like mechanism. When mounted, you can
list its files like any other filesystem, or display their contents.
Typical items include the <TT
CLASS="FILENAME"
>loadavg</TT
> file, which
contains the system load average, and <TT
CLASS="FILENAME"
>meminfo</TT
>,
which shows current core memory and swap usage.</P
><P
>&#13;To this, the networking code adds the <TT
CLASS="FILENAME"
>net</TT
> directory.
It contains a number of files that show things like the kernel ARP tables,
the state of TCP connections, and the routing tables. Most network
administration tools get their information from these files.</P
><P
>&#13;The <TT
CLASS="FILENAME"
>proc</TT
> filesystem (or <TT
CLASS="FILENAME"
>procfs</TT
>, as
it is also known) is usually mounted on <TT
CLASS="FILENAME"
>/proc</TT
> at system
boot time. The best method is to add the following line to
<TT
CLASS="FILENAME"
>/etc/fstab</TT
>&#8201;:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
># procfs mount point:
none /proc proc defaults</PRE
></TD
></TR
></TABLE
>
Then execute <B
CLASS="COMMAND"
>mount /proc</B
> from your
<TT
CLASS="FILENAME"
>/etc/rc</TT
> script.</P
><P
>The <TT
CLASS="FILENAME"
>procfs</TT
> is now configured into most kernels by
default. If the <TT
CLASS="FILENAME"
>procfs</TT
> is not in your kernel, you
will get a message such as: <TT
CLASS="LITERAL"
>mount: fs type procfs not
supported by kernel</TT
>. You will then have to recompile the
kernel and answer &#8220;yes&#8221; when asked for
<TT
CLASS="FILENAME"
>procfs</TT
> support.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x-087-2-iface.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x-087-2-iface.binaries.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Configuring TCP/IP Networking</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="x-087-2-iface.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Installing the Binaries</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>