sg3_utils-1.47

Introduction to sg3_utils

The sg3_utils package contains low level utilities for devices that use a SCSI command set. Apart from SCSI parallel interface (SPI) devices, the SCSI command set is used by ATAPI devices (CD/DVDs and tapes), USB mass storage devices, Fibre Channel disks, IEEE 1394 storage devices (that use the "SBP" protocol), SAS, iSCSI and FCoE devices (amongst others).

This package is known to build and work properly using an LFS-11.0 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/sg3_utils

Installation of sg3_utils

Install sg3_utils by running the following commands:

./configure --prefix=/usr --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: rescan-scsi-bus.sh, scsi_logging_level, scsi_mandat, scsi_readcap, scsi_ready, scsi_satl, scsi_start, scsi_stop, scsi_temperature, sg_bg_ctl, sg_compare_and_write, sg_copy_results, sg_dd, sg_decode_sense, sg_emc_trespass, sg_format, sg_get_config, sg_get_lba_status, sg_ident, sg_inq, sg_logs, sg_luns, sg_map, sg_map26, sg_modes, sg_opcodes, sg_persist, sg_prevent, sg_raw, sg_rbuf, sg_rdac, sg_read, sg_read_attr, sg_read_block_limits, sg_read_buffer, sg_read_long, sg_readcap, sg_reassign, sg_referrals, sg_rep_pip, sg_rep_zones, sg_requests, sg_reset, sg_reset_wp, sg_rmsn, sg_rtpg, sg_safte, sg_sanitize, sg_sat_identify, sg_sat_phy_event, sg_sat_read_gplog, sg_sat_set_features, sg_scan, sg_seek, sg_senddiag, sg_ses, sg_ses_microcode, sg_start, sg_stpg, sg_stream_ctl, sg_sync, sg_test_rwbuf, sg_timestamp, sg_turs, sg_unmap, sg_verify, sg_vpd, sg_wr_mode, sg_write_buffer, sg_write_long, sg_write_same, sg_write_verify, sg_write_x, sg_xcopy, sg_zone, sginfo, sgm_dd, and sgp_dd
Installed Library: libsgutils2.so
Installed Directories: None

Short Descriptions

rescan-scsi-bus.sh

adds or removes SCSI devices without having to reboot

scsi_logging_level

accesses Linux SCSI logging level information

scsi_mandat

checks SCSI device support for mandatory commands

scsi_readcap

does the SCSI READ CAPACITY command on disks

scsi_ready

does the SCSI TEST UNIT READY on devices

scsi_satl

checks for SCSI to ATA Translation (SAT) device support

scsi_start

starts one or more SCSI disks

scsi_stop

stops one or more SCSI disks

scsi_temperature

fetches the temperature of a SCSI device

sg_bg_ctl

performs a SCSI BACKGROUND CONTROL command on a device to perform "advanced background operations"

sg_compare_and_write

sends the SCSI COMPARE AND WRITE command to device

sg_copy_results

sends the SCSI RECEIVE COPY RESULTS command (XCOPY related)

sg_dd

copies data to and from files and devices. Specialised for devices that understand the SCSI command set

sg_decode_sense

takes SCSI sense data in binary or as a sequence of ASCII hexadecimal bytes and decodes it

sg_emc_trespass

changes ownership of a LUN from another Service-Processor to this one

sg_format

formats or resizes a SCSI disk (perhaps changes its block size)

sg_get_config

sends a SCSI GET CONFIGURATION command (MMC-4 +)

sg_get_elem_status

sends a SCSI GET PHYSICAL ELEMENT STATUS command to a device

sg_get_lba_status

sends the SCSI GET LBA STATUS command

sg_ident

sends a SCSI REPORT or SET IDENTIFYING INFORMATION command

sginfo

access mode page information for a SCSI (or ATAPI) device

sg_inq

sends a SCSI INQUIRY or ATA IDENTIFY (PACKET) DEVICE command and outputs the response

sg_logs

access log pages with SCSI LOG SENSE command

sg_luns

sends the SCSI REPORT LUNS command

sg_map

displays mapping between linux sg and other SCSI devices

sg_map26

maps a special file to a SCSI generic (sg) device (or vice versa)

sgm_dd

copies data to and from files and devices. Specialized for devices that understand the SCSI command set and does memory mapped transfers from sg devices

sg_modes

reads mode pages with the SCSI MODE SENSE command

sg_opcodes

reports information on supported SCSI commands or task management functions

sgp_dd

copies data to and from files and devices. Specialized for devices that understand the SCSI command set

sg_persist

sends a SCSI PERSISTENT RESERVE (IN or OUT) command to manipulate registrations and reservations

sg_prevent

sends a SCSI PREVENT ALLOW MEDIUM REMOVAL command

sg_raw

sends an arbitrary SCSI command to a device

sg_rbuf

reads data using the SCSI READ BUFFER command

sg_rdac

displays or modifies the RDAC Redundant Controller Page

sg_read

reads blocks of data continually from the same offset

sg_read_attr

performs a SCSI READ ATTRIBUTE command on a device

sg_read_block_limits

sends a SCSI READ BLOCK LIMITS command

sg_read_buffer

sends a SCSI READ BUFFER command

sg_readcap

sends a SCSI READ CAPACITY command

sg_read_long

sends a SCSI READ LONG command

sg_reassign

sends a SCSI REASSIGN BLOCKS command

sg_referrals

sends a SCSI REPORT REFERRALS command

sg_rep_pip

sends a SCSI REPORT PROVISIONING INITIALIZATION PATTERN command

sg_rep_zones

sends a SCSI REPORT ZONES command

sg_requests

sends one or more SCSI REQUEST SENSE commands

sg_reset

sends a SCSI device, target, bus or host reset; or checks reset state

sg_reset_wp

sends a SCSI RESET WRITE POINTER command

sg_rmsn

sends a SCSI READ MEDIA SERIAL NUMBER command

sg_rtpg

sends a SCSI REPORT TARGET PORT GROUPS command

sg_safte

fetches status information from a SCSI Accessed Fault-Tolerant Enclosure (SAF-TE) device

sg_sanitize

sends a SCSI SANITIZE command

sg_sat_identify

sends an ATA IDENTIFY (PACKET) DEVICE command via a SCSI to ATA Translation (SAT) layer

sg_sat_phy_event

sends an ATA READ LOG EXT command via a SAT pass through to fetch log page 11h which contains SATA phy event counters

sg_sat_read_gplog

sends an ATA READ LOG EXT command via a SCSI to ATA Translation (SAT) layer

sg_sat_set_features

sends an ATA SET FEATURES command via a SCSI to ATA Translation (SAT) layer

sg_scan

does a scan of sg devices (or given SCSI/ATAPI/ATA devices) and prints the results

sg_seek

performs a SCSI SEEK or PRE-FETCH command on a device and it's cache

sg_senddiag

performs a SCSI SEND DIAGNOSTIC command

sg_ses

sends controls and fetches the current status from a SCSI Enclosure Services (SES) device

sg_ses_microcode

sends microcode to a SCSI enclosure

sg_start

sends a SCSI START STOP UNIT command to start, stop, load or eject medium

sg_stpg

sends a SCSI SET TARGET PORT GROUPS command

sg_stream_ctl

performs a SCSI STREAM CONTROL or GET STREAM STATUS command on a device to open or close an I/O stream

sg_sync

sends a SCSI command to synchronize the cache

sg_test_rwbuf

tests the SCSI host adapter by issuing write and read operations on a device's buffer and calculating checksums

sg_timestamp

reports or sets the timestamp on a SCSI device

sg_turs

sends one or more SCSI TEST UNIT READY commands

sg_unmap

sends a SCSI UNMAP command

sg_verify

invokes SCSI VERIFY command(s) on a block device

sg_vpd

fetches Vital Product Data (VPD) pages using a SCSI INQUIRY command

sg_write_buffer

sends a SCSI WRITE BUFFER command

sg_write_long

sends a SCSI WRITE LONG command

sg_write_same

sends a SCSI WRITE SAME command

sg_write_verify

sends a SCSI WRITE AND VERIFY command

sg_write_x

performs SCSI WRITE commands on a device

sg_wr_mode

writes mode pages

sg_xcopy

copies data to and from files and devices using SCSI EXTENDED COPY (XCOPY)

sg_zone

performs SCSI ZONE commands on a device, such as OPEN, CLOSE, FINISH or SEQUENTIALIZE

libsgutils2.so

contains the sg3_utils API functions

Last updated on Tue Nov 16 17:48:16 2021