SG_TEST_RWBUF - Online Linux Manual PageSection : 8
Updated : January 2007
Source : sg3_utils−1.23
Note : SG3_UTILS
NAMEsg_test_rwbuf − Tests the SCSI host adapter by issuing write and read operations on a device's buffer and calculating checksums.
SYNOPSISsg_test_rwbuf [−−addrd=AR] [−−addwr=AW] [−−help] [−−quick] −−size=SZ [−−times=NUM] [−−verbose] [−−version] DEVICE or an older deprecated format sg_test_rwbuf DEVICE SZ [AW] [AR]
DESCRIPTION sg_test_rwbuf writes and reads back SZ bytes to the internal buffer of DEVICE (e.g. /dev/sda or /dev/sg0). A pseudo random pattern is written to the data buffer on the device then read back. If the same pattern is found 'Success' is reported. If they do not match (checksums unequal) then this is reported and up to 24 bytes from the first point of mismatch are reported; the first line shows what was written and the second line shows what was received. For testing purposes, you can ask it to write AW or read AR additional bytes.
OPTIONSArguments to long options are mandatory for short options as well. −r, −−addrd=AR Read an additional AR bytes (than indicated by SZ) from the data buffer. Checksum is performed over the first SZ bytes. −w, −−addwr=AW Write an additional AW bytes (than indicated by SZ) of zeros into the data buffer. Checksum is generated over the first SZ bytes. −h, −−help Print out a usage message the exit. −q, −−quick Perform a READ BUFFER descriptor command to find out the available data buffer length and offset, print them out then exit (without testing with write/read sequences). −s, −−size=SZ where SZis teh size of buffer in bytes to be written then read and checked. This number needs to be less than on equal to the size of the device's data buffer which can be seen from the −−quick option. Either this option or the −−quick option should be given. −t, −−times=NUM where NUM is the number of times to repeat the write/read to buffer test. Default value is 1 . −v, −−verbose increase verbosity of output. −V, −−version print version number (and data of last change) then exit.
NOTESThe microcode in a SCSI device is _not_ modified by doing a WRITE BUFFER command with its mode set to "data" (0x2) as done by this utility. Therefore this utility is safe in that respect. [Mode values 0x4, 0x5, 0x6 and 0x7 are the dangerous ones :−)] WARNING: If you access the device at the same time (e.g. because it's a hard disk with a mounted file system on it) the device's buffer may be used by the device itself for other data at the same time, and overwriting it may or may not cause data corruption! HOWEVER the SPC−3 draft standard does state in its WRITE BUFFER command: "This command shall not alter any medium of the logical unit when data mode ... is specified". This implies that it _is_ safe to use this utility with devices that have mounted file systems on them. Following this theme further, a disk with active mounted file systems may cause the data read back to be different (due to caching activity) to what was written and hence a checksum error.
EXIT STATUSThe exit status of sg_test_rwbuf is 0 when it is successful. Otherwise see the sg3_utils(8) man page.
AUTHORSWritten by D. Gilbert and K. Garloff
COPYRIGHTCopyright © 2000−2006 Douglas Gilbert, Kurt Garloff
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 : 13,011 byte
man-sg_test_rwbuf.8Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 201,808
Visitor ID : :
Visitor IP : 3.145.168.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.