1lsscsi(8)                           LSSCSI                           lsscsi(8)
2
3
4

NAME

6       lsscsi - list SCSI devices (or hosts) and their attributes
7

SYNOPSIS

9       lsscsi    [--classic|-c]   [--device|-d]   [--generic|-g]   [--help|-h]
10       [--hosts|-H]   [--kname|-k]   [--long|-l]    [--verbose]    [--version]
11       [<h:c:t:l>]
12

DESCRIPTION

14       Uses  information in sysfs (linux kernels 2.6.0 and later) to list scsi
15       devices (or hosts) currently attached to the  system.  Options  can  be
16       used  to  control  the amount and form of information provided for each
17       device.
18
19       If a <h:c:t:l> argument is given then it acts  as  a  filter  and  only
20       devices  that match it are listed. The colons don't have to be present,
21       and '-', '*', '?' or missing arguments at the end  are  wildcards.  '-'
22       needs  to stand alone or else it is taken as the beginning of an option
23       (e.g. '-:-:-:-' is illegal). '*' needs to be escaped from the shell.  A
24       leading  '[' and trailing ']' are permitted (e.g. '[1:0:0]' matches all
25       luns on 1:0:0).
26
27       By default in this  utility  device  node  names  (e.g.  "/dev/sda"  or
28       "/dev/root_disk")  are  obtained  by noting the major and minor numbers
29       for the listed  device  obtained  from  sysfs  (e.g.  the  contents  of
30       /sys/block/sda/dev)  and  then looking for a match in the "/dev" direc‐
31       tory. This "match by major and minor" will allow devices that have been
32       given  a  different name by udev (for example) to be correctly reported
33       by this utility.
34
35       In some situations it may be useful to see the device  node  name  that
36       linux  would  produce  by default, so the '--kname' option is provided.
37       An example of where this may be useful is kernel error logs which  tend
38       to report disk error messages using the disk's default kernel name.
39
40       --classic | -c
41              The   output   is   similar   to   that   obtained   from   'cat
42              /proc/scsi/scsi'
43
44       --device | -d
45              After outputting the (probable) scsi device name the the  device
46              node  major  and  minor  numbers  are  shown  in  brackets (e.g.
47              "/dev/sda[8:0]").
48
49       --generic | -g
50              Output the scsi generic device file name. Note that  if  the  sg
51              driver  is  a  module  it  needs to be loaded otherwise '-' will
52              appear
53
54       --help | -h
55              Output the usage message and exit
56
57       --hosts | -H
58              List the SCSI hosts currently attached to the  system.  If  this
59              option is not given then SCSI devices are listed
60
61       --kname | -k
62              Use linux default algorithm for naming devices (e.g. block major
63              8, minor 0 is "/dev/sda") rather than the "match  by  major  and
64              minor" in the "/dev" directory as discussed above.
65
66       --long | -l
67              Output  additional  information for each SCSI device (host). Can
68              be used multiple times for more output in which case the shorter
69              form  is  more  convenient  (e.g. '-lll'). When used three times
70              (i.e. '-lll') outputs SCSI  device  (host)  attributes  one  per
71              line;     preceded     by    two    spaces;    in    the    form
72              "<attribute_name>=<value>".
73
74       --verbose | -v
75              outputs directory names where information is  found.  Use  twice
76              for more output.
77
78       --version | -V
79              outputs version number information and exits
80
81       Information  for this command is derived from the the sysfs file system
82       whose mount point is found by examining the contents of /proc/mounts  .
83       SCSI  (pseudo)  devices  that  have been detected by the SCSI mid level
84       will be listed even if the required upper level drivers (i.e.  sd,  sr,
85       st,  osst  or  ch) have not been loaded. If the appropriate upper level
86       driver has not been loaded then the device file name will appear as '-'
87       rather  than  something  like  '/dev/st0'. Note that some devices (e.g.
88       scanners and medium changers) do not have a primary upper level  driver
89       and can only be accessed via a scsi generic (sg) device name.
90

AUTHOR

92       Written by Doug Gilbert
93

REPORTING BUGS

95       Report bugs to <dgilbert at interlog dot com>.
96
98       Copyright © 2003-2005 Douglas Gilbert
99       This  software is distributed under the GPL version 2. There is NO war‐
100       ranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR  PUR‐
101       POSE.
102

SEE ALSO

104       lspci  lsusb and systool The latter utility can be found in the sysfsu‐
105       tils package.
106
107
108
109lsscsi-0.16                      December 2005                       lsscsi(8)
Impressum