Man page - sg_z_act_query(8)
Packages contains this manual
- scsi_start(8)
- sginfo(8)
- sg_scan(8)
- sg_luns(8)
- sg_bg_ctl(8)
- sg3_utils_json(8)
- sg_safte(8)
- sg_referrals(8)
- sg_sat_datetime(8)
- sg_vpd(8)
- sg_decode_sense(8)
- sg_rdac(8)
- sg_inq(8)
- sg_start(8)
- sg_timestamp(8)
- sg_z_act_query(8)
- sg_write_buffer(8)
- sg_sat_phy_event(8)
- sg_get_elem_status(8)
- sg_wr_mode(8)
- sg_rep_pip(8)
- scsi_mandat(8)
- sg_test_rwbuf(8)
- scsi_stop(8)
- sg_modes(8)
- sg_rmsn(8)
- sg_ses_microcode(8)
- sg_read_buffer(8)
- sgm_dd(8)
- scsi_readcap(8)
- sg_write_same(8)
- sg_rbuf(8)
- sg_rep_zones(8)
- sg_ident(8)
- sg_sat_set_features(8)
- sg_zone(8)
- sg_opcodes(8)
- sg_logs(8)
- sg_read_block_limits(8)
- sg_write_attr(8)
- sg_rep_density(8)
- sg_dd(8)
- sg_sanitize(8)
- sg_seek(8)
- sg3_utils(8)
- sg_compare_and_write(8)
- sg_requests(8)
- sg_reset(8)
- scsi_temperature(8)
- scsi_ready(8)
- sg_verify(8)
- sg_prevent(8)
- sg_sat_read_gplog(8)
- sg_persist(8)
- scsi_logging_level(8)
- sg_rtpg(8)
- sg_write_long(8)
- sg_senddiag(8)
- sg_format(8)
- sg_read_long(8)
- sgp_dd(8)
- sg_ses(8)
- sg_reassign(8)
- sg_map26(8)
- sg_get_lba_status(8)
- sg_get_config(8)
- sg_reset_wp(8)
- sg_unmap(8)
- sg_read(8)
- sg_write_verify(8)
- sg_rem_rest_elem(8)
- scsi_satl(8)
- rescan-scsi-bus.sh(8)
- sg_map(8)
- sg_emc_trespass(8)
- sg_write_x(8)
- sg_sat_identify(8)
- sg_sync(8)
- sg_copy_results(8)
- sg_stpg(8)
- sg_raw(8)
- sg_xcopy(8)
- sg_read_attr(8)
- sg_stream_ctl(8)
- sg_readcap(8)
- sg_turs(8)
apt-get install sg3-utils
Manual
SG_Z_ACT_QUERY
NAMESYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
AUTHORS
REPORTING BUGS
COPYRIGHT
SEE ALSO
NAME
sg_z_act_query - send a SCSI ZONE ACTIVATE or ZONE QUERY command
SYNOPSIS
sg_z_act_query [ --activate ] [ --all ] [ --force ] [ --help ] [ --hex ] [ --inhex=FN ] [ --maxlen=LEN ] [ --num=ZS ] [ --other=ZDID ] [ --query ] [ --raw ] [ --verbose ] [ --version ] [ --zone=ID ] DEVICE
DESCRIPTION
Sends a SCSI ZONE ACTIVATE or ZONE QUERY command to the DEVICE . If the --activate option is not given, then a ZONE QUERY command is sent. These commands were added in the ZBC-2 draft revision 4 (zbc2r04.pdf).
Both of these commands have similar cdb_s and responses hence they are both placed in this utility. The difference is that only the ZONE ACTIVATE command will potentially activate or deactivate zones. Both commands will perform a "Verify activations operation" as defined in ZBC-2 .
OPTIONS
Arguments to
long options are mandatory for short options as well.
-A
,
--activate
sends a ZONE ACTIVATE command to the DEVICE . The default (i.e. without this option) is to send a ZONE QUERY command.
-a , --all
sets the ALL field in the cdb.
-f , --force
when decoding the response to this command, certain sanity checks are done and if they fail a message is sent to stderr and a non-zero exit status is set. If this option is given those sanity checks are bypassed.
-h , --help
output the usage message then exit.
-H , --hex
output the response in
hexadecimal to stdout. When used once the whole response is
output in ASCII hexadecimal with a leading address (starting
at 0) on each line. When used twice each zone activation
descriptor in the response is output separately in
hexadecimal. When used thrice the whole response is output
in hexadecimal with no leading address (on each line).
The output format when this option is given thrice is
suitable for a later invocation with the
--inhex=FN
option.
-i , --inhex = FN
where
FN
is a file name
whose contents are assumed to be ASCII hexadecimal. If
DEVICE
is also given then
DEVICE
is ignored, a
warning is issued and the utility continues, decoding the
file named
FN
. See the "HEX, BINARY AND JSON
FORMATS" section in the sg3_utils manpage for more
information. If the
--raw
option is also given then
the contents of
FN
are treated as binary.
By default it is assumed the response is from a ZONE QUERY
command but that shouldn’t matter because the response
of the ZONE ACTIVATE and ZONE QUERY commands is of the same
form.
-m , --maxlen = LEN
where
LEN
is the
(maximum) response length in bytes. It is placed in the
cdb’s "allocation length" field. If not
given (or
LEN
is zero) then 8192 is used. The maximum
allowed value of
LEN
is 1048576.
The draft standard disallows allocation lengths less than
64.
-n , --num = ZS
where ZS is placed in the "Number of zones" field in the cdb. This option is usually ignored if the --all option is given. If the --all option is not given, the default value of this field is 1 .
-o , --other = ZDID
where the ZDID value will be placed in the "Other zone domain ID" field of the cdb to be sent to the DEVICE .
-q , --query
causes the ZONE QUERY command to be sent to the DEVICE . Since this is the default action, this option is typically not needed. If both this option and the --activate option are given, an error will be reported (and no command will be sent).
-r , --raw
output response in binary (to stdout) unless the --inhex=FN option is also given. In that case the input file name ( FN ) is decoded as binary (and the output is _not_ in binary (but may be hex)).
-v , --verbose
increase the level of verbosity, (i.e. debug output).
-V , --version
print the version string and then exit.
-z , --zone = ID
where ID is placed in the cdb’s ZONE ID field. A zone id is a zone start logical block address (LBA). The default value is 0. ID is assumed to be in decimal unless prefixed with ’0x’ or has a trailing ’h’ which indicate hexadecimal. The maximum value that can be given is 2ˆ64 - 2. In the unlikely event of wanting to give 2ˆ64 - 1, enter "-1".
EXIT STATUS
The exit status of sg_z_act_query is 0 when it is successful. Otherwise see the sg3_utils(8) man page.
AUTHORS
Written by Douglas Gilbert.
REPORTING BUGS
Report bugs to <dgilbert at interlog dot com>.
COPYRIGHT
Copyright ©
2021-2023 Douglas Gilbert
This software is distributed under a BSD-2-Clause license.
There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
sg_zone,sg_rep_zones,sg_reset_wp(sg3_utils)