lsscsi - list SCSI devices (or hosts) and their attributes
Uses information in sysfs (linux kernels 2.6.0 and later) to list scsi devices (or hosts) currently attached to the system. Options can be used to control the amount and form of information provided for each device.
If a <h:c:t:l> argument is given then it acts as a filter and only devices that match it are listed. The colons don't have to be present, and '-', '*', '?' or missing arguments at the end are wildcards. '-' needs to stand alone or else it is taken as the beginning of an option (e.g. '-:-:-:-' is illegal). '*' needs to be escaped from the shell. A leading '[' and trailing ']' are permitted (e.g. '[1:0:0]' matches all luns on 1:0:0).
By default in this utility device node names (e.g. "/dev/sda" or "/dev/root_disk") are obtained by noting the major and minor numbers for the listed device obtained from sysfs (e.g. the contents of /sys/block/sda/dev) and then looking for a match in the "/dev" directory. This "match by major and minor" will allow devices that have been given a different name by udev (for example) to be correctly reported by this utility.
In some situations it may be useful to see the device node name that linux would produce by default, so the '--kname' option is provided. An example of where this may be useful is kernel error logs which tend to report disk error messages using the disk's default kernel name.
Information for this command is derived from the the sysfs file system whose mount point is found by examining the contents of /proc/mounts . SCSI (pseudo) devices that have been detected by the SCSI mid level will be listed even if the required upper level drivers (i.e. sd, sr, st, osst or ch) have not been loaded. If the appropriate upper level driver has not been loaded then the device file name will appear as '-' rather than something like '/dev/st0'. Note that some devices (e.g. scanners and medium changers) do not have a primary upper level driver and can only be accessed via a scsi generic (sg) device name.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |