222 lines
3.9 KiB
HTML
222 lines
3.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Proc pseudo file system</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="The Linux 2.4 SCSI subsystem HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Modules and their Parameters"
|
|
HREF="modparams.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Mid Level, Unifying layer"
|
|
HREF="mlevel.html"></HEAD
|
|
><BODY
|
|
CLASS="chapter"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>The Linux 2.4 SCSI subsystem HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="modparams.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="mlevel.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="chapter"
|
|
><H1
|
|
><A
|
|
NAME="procfs"
|
|
></A
|
|
>Chapter 7. Proc pseudo file system</H1
|
|
><P
|
|
> The proc pseudo file system provides some useful information about the
|
|
SCSI subsystem. The kernel configuration option that selects "proc_fs"
|
|
is CONFIG_PROC_FS and in almost all cases it should be selected. SCSI
|
|
specific information
|
|
is found under the directory <TT
|
|
CLASS="filename"
|
|
>/proc/scsi</TT
|
|
>. Probably
|
|
the most commonly accessed entry is <B
|
|
CLASS="command"
|
|
>cat /proc/scsi/scsi</B
|
|
>
|
|
which lists the attached SCSI devices. See
|
|
<A
|
|
HREF="mlproc.html"
|
|
>Section 8.3</A
|
|
> for more details.
|
|
</P
|
|
><P
|
|
> The lower level drivers are allocated proc_fs entries of the form:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> /proc/scsi/<driver_name>/<scsi_adapter_number>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
where the <driver_name> is something like "aic7xxx" or "BusLogic". The
|
|
<scsi_adapter_number> (also known as the host number) is the same number
|
|
that was discussed in <A
|
|
HREF="scsiaddr.html"
|
|
>Section 3.1</A
|
|
>. Note that one driver
|
|
may control one or more hosts.
|
|
What is stored in this file is lower level driver dependent (and in the
|
|
case of some adapter drivers it
|
|
is possible to set parameters via this file). When reporting problems
|
|
to newsgroups or maintainers it is useful to include the output of this
|
|
file (e.g. <B
|
|
CLASS="command"
|
|
>cat /proc/scsi/aic7xxx/0 </B
|
|
>).
|
|
</P
|
|
><P
|
|
> The cdrom driver provides information about attached cdrom devices
|
|
in the <TT
|
|
CLASS="filename"
|
|
>/proc/sys/dev/cdrom</TT
|
|
> directory. This will
|
|
include both SCSI devices (i.e. those controlled by the sr driver) and
|
|
IDE devices (i.e. those controlled by the ide-cd driver).
|
|
See <A
|
|
HREF="sr.html#srproc"
|
|
>Section 9.2.3</A
|
|
>.
|
|
</P
|
|
><P
|
|
> The sg driver provides information about its state and attached hosts and
|
|
devices in the <TT
|
|
CLASS="filename"
|
|
>/proc/scsi/sg</TT
|
|
> directory.
|
|
See <A
|
|
HREF="sg.html#sgproc"
|
|
>Section 9.4.3</A
|
|
>.
|
|
</P
|
|
><P
|
|
> More general information on the proc pseudo file system can be found in
|
|
the kernel source file:
|
|
<TT
|
|
CLASS="filename"
|
|
>/usr/src/linux/Documentation/filesystems/proc.txt</TT
|
|
>.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="modparams.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="mlevel.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Modules and their Parameters</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Mid Level, Unifying layer</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |