Usage: sg_stream_ctl [-brief] [--close] [--ctl=CTL] [-get] [--help] [--hex] [--id=SID] [--inhex=FN] [--json[=JO]] [--js-file=JFN] [--maxlen=LEN] [--open] [--raw] [--readonly] [--verbose] [--version] DEVICE where: --brief|-b for open, output assigned stream id to stdout, or -1 if error; for close, output 0, or -1; for get output list of stream id, 1 per line --close|-c close stream given by --id=SID --ctl=CTL|-C CTL CTL is stream control value, (STR_CTL field) 1 -> open; 2 -> close --get|-g do GET STREAM STATUS command (default if no other) --help|-h print out usage message --hex|-H print 'get' output in hex --id=SID|-i SID for close, SID is stream_id to close; for get, list from and including this stream id --inhex=FN|-I FN input taken from file FN rather than DEVICE, assume it is ASCII hex or, if --raw, in binary --json[=JO]|-j[=JO] output in JSON instead of plain text use --json=? for JSON help --js-file=JFN|-J JFN JFN is a filename to which JSON output is written (def: stdout); truncates then writes --maxlen=LEN|-m LEN length in bytes of buffer to receive data-in (def: 8 (for open and close); 252 (for get, but increase if needed) --open|-o open a new stream, return assigned stream id --raw|-R --hex output or --inhex= input: in binary instead of hex --readonly|-r open DEVICE read-only (if supported) --verbose|-v increase verbosity --version|-V print version string and exit Performs a SCSI GET STREAM STATUS or STREAM CONTROL command. If --open, --close or --ctl=CTL given (only one) then performs STREAM CONTROL command. If --get or no other selecting option given then performs a GET STREAM STATUS command. A successful --open will output the assigned stream id to stdout (and ignore --id=SID , if given).