xref: /aosp_15_r20/external/sg3_utils/scripts/README (revision 44704f698541f6367e81f991ef8bb54ccbf3fc18)
1*44704f69SBart Van Assche                      README for sg3_utils/scripts
2*44704f69SBart Van Assche                      ============================
3*44704f69SBart Van AsscheIntroduction
4*44704f69SBart Van Assche============
5*44704f69SBart Van AsscheThis directory contains bash shell scripts. Most of them call one or
6*44704f69SBart Van Asschemore utilities from the sg3_utils package. They assume the sg3_utils
7*44704f69SBart Van Asschepackage utilities are on the PATH of the user.
8*44704f69SBart Van Assche
9*44704f69SBart Van Asscherescan-scsi-bus.sh is written by Kurt Garloff (formerly from Suse Labs)
10*44704f69SBart Van Asschewith patches from Hannes Reinecke (Suse) and Redhat.
11*44704f69SBart Van Assche
12*44704f69SBart Van Asschescsi_logging_level is written by Andreas Herrmann <aherrman at de dot ibm
13*44704f69SBart Van Asschedot com>. It sets the logging level of the SCSI subsystem in the Linux
14*44704f69SBart Van Assche2.6 series kernels. See that file for more information.
15*44704f69SBart Van Assche
16*44704f69SBart Van AsscheThe other scripts are written by the author. Some do testing while others
17*44704f69SBart Van Asschedo bulk tasks (e.g. stopping multiple disks).
18*44704f69SBart Van Assche
19*44704f69SBart Van AsscheDetails
20*44704f69SBart Van Assche=======
21*44704f69SBart Van AsscheEach script supplies more information, typically by supplying a '-h'
22*44704f69SBart Van Asscheor '--help' option. The script source often contains explanatory
23*44704f69SBart Van Asscheinformation. Following is a usage summary with a one line description:
24*44704f69SBart Van Assche   rescan-scsi-bus.sh [OPTIONS]
25*44704f69SBart Van Assche        - see the output of 'rescan-scsi-bus.sh --help'
26*44704f69SBart Van Assche   scsi_logging_level [OPTIONS]
27*44704f69SBart Van Assche        - set Linux SCSI subsystem logging level
28*44704f69SBart Van Assche   scsi_mandat [-h] [-L] [-q] <device>
29*44704f69SBart Van Assche        - check for mandatory SCSI command support
30*44704f69SBart Van Assche   scsi_readcap [-b] [-h] [-v] <device>+
31*44704f69SBart Van Assche        - fetch capacity/size information for each <device>
32*44704f69SBart Van Assche   scsi_ready [-h] [-v] <device>+
33*44704f69SBart Van Assche        - check the media ready status on each <device>
34*44704f69SBart Van Assche   scsi_satl [-h] [-L] [-q] [-v] <device>
35*44704f69SBart Van Assche        - check <device> for SCSI to ATA Translation Layer (SATL)
36*44704f69SBart Van Assche   scsi_start [-h] [-v] [-w] <device>+
37*44704f69SBart Van Assche        - start media (i.e. spin up) in each <device>
38*44704f69SBart Van Assche   scsi_stop [-h] [-v] [-w] <device>+
39*44704f69SBart Van Assche        - stop media (i.e. spin down) in each <device>
40*44704f69SBart Van Assche   scsi_temperature [-h] [-v] <device>+
41*44704f69SBart Van Assche        - check temperature in each <device>
42*44704f69SBart Van Assche
43*44704f69SBart Van AsscheThese scripts assume that the main sg3_utils utilities are installed
44*44704f69SBart Van Asscheand are on the user's PATH.
45*44704f69SBart Van Assche
46*44704f69SBart Van AsscheThis directory, prior to sg3_utils-1.28, contained the sas_disk_blink
47*44704f69SBart Van Asschescript. Since it depends on the sdparm utility it has been moved to
48*44704f69SBart Van Asschethe sdparm package in its scripts directory.
49*44704f69SBart Van Assche
50*44704f69SBart Van Assche59-scsi-sg3_utils.rules is a Linux specific file for udev. These rules use
51*44704f69SBart Van Assche'sg_inq --export' to help udev create identifying device nodes, for example
52*44704f69SBart Van Assche/dev/disk/by-id/wwn-0x5001501234567890-part1.
53*44704f69SBart Van Assche
54*44704f69SBart Van AsscheDouglas Gilbert
55*44704f69SBart Van Assche4th October 2021
56