s2pexec

Section: User Commands (1)
Index  

NAME

s2pexec - SCSI2Pi SCSI/SASI command executor  

SYNOPSIS

s2pexec [--scsi-target/-i ID[:LUN]] [--sasi-target/-h ID[:LUN]] [--board-id/-B BOARD_ID] [--cdb/-c CDB] [--data/-c CDB] [--buffer-size/-b BUFFER_SIZE] [--log-level/-L LOG_LEVEL] {--binary-input-file/-f FILE] {--binary-output-file/-F FILE] {--hex-input-file/-t FILE] {--hex-output-file/-T FILE] {--timeout/-o TIMEOUT] [--no-request-sense/-n] [--reset-bus/-r] [--hex-only/] [--help/-H] [--version/-v]  

DESCRIPTION

s2pexec sends SCSI or SASI commands to a device and displays the results.

When launched without arguments s2pexec enters interactive mode, where you can enter commands on the command line. In interactive mode the target, initiator and log level settings are preserved between command invocations.

 

NOTES

s2pexec helps with advanced testing. The board s2pexec is running on must be a FULLSPEC board because s2pexec requires SCSI initiator support.

 

OPTIONS

--scsi-target/-i ID[:LUN]
ID and optional LUN (0-31) of the SCSI target device.
--sasi-target/-h ID[:LUN]
ID and optional LUN (0-1) of the SASI target device.
--board-id/-B BOARD_ID
Initiator ID used by s2pexec. If not specified, s2pexec will use the board (initiator) ID 7. Not relevant for SASI.
--cdb/-c CDB
Command block to send in hexecimal format. Hexadecimal numbers may be separated by a colon.
--data/-d DATA
Data to send with the command in hexedecimal format. These data are sent in the DATA OUT phase.
--buffer-size/-b BUFFER_SIZE
Buffer size for received data, the default is 131072 bytes. When sending data the buffer is automatically sized to match the size of data to be sent.
--log-level/-L LOG_LEVEL
Set the log level (trace, debug, info, warning, error, critical, off). The default log level is 'info'.
--binary-input-file/-f FILE
Optional file with binary data to send in the DATA OUT phase.
--binary-output-file/-F FILE
Optional file for binary data received in the DATA IN phase.
--hex-input-file/-t FILE
Optional file with data in hexadecimal (human-readable) format to send in the DATA OUT phase.
--hex-output-file/-T FILE
Optional file for data received in the DATA IN phase. The data in this file are coded in hexadecimal (human-readable) format.
--timeout/-o TIMEOUT
The command timeout in seconds, default is 3 seconds. Operations like formatting may take much longer.
--no-request-sense/-n
Do not automatically send REQUEST SENSE after an error in order to get the sense data.
--reset-bus/-r
Reset the bus.
--hex-only
Do not display/save the offsets and the ASCII representantion of the received data.
--help/-H
Show a help text.
--version/-v
Show the s2pexec version.

 

EXIT STATUS

0: No error. -1: There was a general error and the command could not be sent. Any other value means the command could be sent but the target device reported an error. In this case the return status contains the additional sense code (ASC).

 

EXAMPLE

s2pexec -i 0 -c 12:00:00:00:20:00
Send an INQUIRY command to the device with SCSI ID 0 and display the results.

s2pexec -i 5 -c 15:11:00:04:0c:00 -t data.dat
Send a MODE SELECT command to the device with SCSI ID 5, with the hexadecimally coded data in data.dat as parameters.

s2pexec -i 5:1 -c 15:11:00:04:0c:00 -d 00:00:00:08:00:00:00:00:00:00:02:00
Send a MODE SELECT command to the device with SCSI ID 5 and LUN 1, with explicit parameter data.

 

SEE ALSO

s2p(1), s2pctl(1), s2pdump(1), s2pproto(1)
  Also see <https://www.scsi2pi.net> and <https://github.com/uweseimet/scsi2pi>.


 

Index

NAME
SYNOPSIS
DESCRIPTION
NOTES
OPTIONS
EXIT STATUS
EXAMPLE
SEE ALSO

This document was created by man2html, using the manual pages.