\section{/proc}
\begin{frame}
   {/proc}

   \begin{itemize}
      \item A pseudo-file system: not stored
      anywhere on disk
      \item An interface to the kernel data
      structures
      \item Each active process has a subdirectory
      in this directory
   \end{itemize}

\end{frame}

\cprotect\note{

   This directory is the mount point for a
   \textbf{pseudo-filesystem} where all information
   resides only in memory, not on disk.  Like
   \filelink{/dev} the \filelink{/proc} directory is
   empty on a non-running system.

   The kernel exposes some important data structures
   through \filelink{/proc} entries.  Additionally,
   each active process on the system has its own
   subdirectory that gives detailed information about
   the state of the process, the resources it is using
   and its history.

   The entries in \filelink{/proc} are often termed
   \textbf{virtual files} and have interesting
   qualities. While most are listed as zero bytes in
   size, when viewed they can contain a large amount of
   information.

   In addition, most of the time and date settings on
   virtual files reflect the current time and date,
   indicative of the fact they are constantly
   changing. In fact, the information in these files is
   obtained only when they are viewed, they are not
   being constantly or periodically updated.

   Important pseudo-files including
   \filelink{/proc/interrupts},
   \filelink{/proc/meminfo}, \filelink{/proc/mounts},
   and \filelink{/proc/partitions}, provide an
   up-to-the-moment glimpse of the system's hardware.

   Others, like \filelink{/proc/filesystems} and the
   \filelink{/proc/sys/} directory, provide system
   configuration information and interfaces.

   For organizational purposes, files containing
   information on a similar topic are grouped into
   virtual directories and sub-directories. For
   instance, \filelink{/proc/scsi/} contains
   information for all physical \textbf{SCSI}
   devices. Likewise, the \textbf{process} directories
   contain information about each running process on
   the system.

   We will extensively examine entries in \filelink{/proc}
   throughout this course, and we will take a more detailed
   look at them in upcoming chapters about kernel
   configuration and system monitoring.

}

\begin{frame}
   {/proc Example}

   \begin{figure}[H]
      \includegraphics[width=4.5in]{IMAGES/lsprocubuntu}
      \caption{/proc Directory}
   \end{figure}
\end{frame}

\cprotect\note {

   Here are the contents of the \filelink{/proc} directory
   belonging to one particular process.

   \begin{figure}[H]
      \includegraphics[width=4.0in]{IMAGES/lsproc3589}
      \caption{/proc/[pid] Directory}
   \end{figure}
   \vspace{-30pt}

   One of many files showing important system information,
   \filelink{/proc/interrupts}.

   \begin{figure}[H]
      \includegraphics[width=4.0in]{IMAGES/procinterrupts}
      \caption{Contents of /proc/interrupts}
   \end{figure}
   \vspace{-30pt}

}
