SG_SCAN - Online Linux Manual PageSection : 8
Updated : December 2006
Source : sg3_utils−1.23
Note : SG3_UTILS
NAMEsg_scan − does a scan of sg devices (or given SCSI/ATAPI/ATA devices) and prints the results
SYNOPSISsg_scan [−a] [−i] [−n] [−w] [−x] [DEVICE]*
DESCRIPTION If no DEVICE names are given, sg_scan does a scan of the sg devices and outputs a line of information for each sg device that is currently bound to a SCSI device. If one or more DEVICEs are given only those devices are scanned. Each device is opened with the O_NONBLOCK flag so that the scan will not "hang" on any device that another process holds an O_EXCL lock on. Any given DEVICE name is expected to comply with (to some extent) the Storage Architecture Model (SAM see www.t10.org). Any device names associated with the Linux SCSI subsystem (e.g. /dev/sda and /dev/st0m) are suitable. Devices names associated with ATAPI devices (e.g. most CD/DVD drives and ATAPI tape drives) are also suitable. If the device does not fall into the above categories then an ATA IDENTIFY command is tried.
OPTIONS−a do alphabetical scan (i.e. sga, sgb, sgc). Note that sg device nodes with an alphabetical index have been deprecated since the linux kernel 2.2 series. −i do a SCSI INQUIRY, output results in a second (indented) line. If the device is an ATA disk then output information from an ATA IDENTIFY command −n do numeric scan (i.e. sg0, sg1...) [default] −w use a read/write flag when opening sg device (default is read−only) −x extra information output about queuing
NOTESThis utility was written at a time when hotplugging of SCSI devices was not supported in Linux. It used a simple algorithm to scan sg device nodes in ascending numeric or alphabetical order, stopping after there were 4 consecutive errors. In the linux kernel 2.6 series, this utility uses sysfs to find which sg device nodes are active and only checks those. Hence there can be large "holes" in the numbering of sg device nodes (e.g. after an adapter has been removed) and still all active sg device nodes will be listed. This utility assumes that sg device nodes are named using the normal conventions and searches from /dev/sg0 to /dev/sg4095 inclusive.
EXIT STATUSThe exit status of sg_scan is 0 when it is successful. Otherwise see the sg3_utils(8) man page.
AUTHORSWritten by D. Gilbert and F. Jansen
COPYRIGHTCopyright © 1999−2006 Douglas Gilbert
This software is distributed under the GPL version 2. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 0
Johanes Gumabo
Data Size : 8,111 byte
man-sg_scan.8Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 237,125
Visitor ID : :
Visitor IP : 18.217.237.68 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.