#### Beyond Linux® From Scratch (systemd Edition) - Version 10.1

### Chapter 12. System Utilities

- Prev

  Redland-1.0.17

- Next

  Sysstat-12.5.3

- Up
- Home

# sg3_utils-1.45

## 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-10.1 platform.

### Package Information

- Download (HTTP): http://sg.danny.cz/sg/p/sg3_utils-1.45.tar.xz

- Download MD5 sum: 3a1ba25fe7b43577de4a5c1edb018526

- Download size: 968 KB

- Estimated disk space required: 24 MB

- Estimated build time: 0.2 SBU

User Notes: http://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: 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_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_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

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 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 SCSI READ BUFFER command
sg_rdac | displays or modifies 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 the SCSI REPORT REFERRALS command
sg_rep_zones | sends a SCSI REPORT ZONES command
sg_requests | sends one or more SCSI REQUEST SENSE commands
sg_reset | sends 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 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 | uses 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 fetch 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 the scsi command synchronize cache
sg_test_rwbuf | tests the SCSI host adapter by issuing write and read operations on a device's buffer and calculating checksums
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 the SCSI WRITE LONG command
sg_write_same | sends the SCSI WRITE SAME command
sg_write_verify | sends the SCSI WRITE AND VERIFY command
sg_write_x | performs SCSI WRITE commands on a device
sg_wr_mode | writes mode page
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 2021-02-20 11:35:58 -0800

- Prev

  Redland-1.0.17

- Next

  Sysstat-12.5.3

- Up
- Home