SMP_REP_ZONE_PERM_TBL(8)
π¦ NAME π¦
smp_rep_zone_perm_tbl β bestie, all it does is invoke the REPORT ZONE PERMISSION TABLE function. iconic. that's the whole job. π
β¨ SYNOPSIS β¨
smp_rep_zone_perm_tbl [--append] [--bits=COL] [--help] [--hex]
[--interface=PARAMS] [--multiple] [--nocomma] [--num=MD] [--permf=FN]
[--raw] [--report=RT] [--sa=SAS_ADDR] [--start=SS] [--verbose]
[--version] SMP_DEVICE[,N]
πΈ DESCRIPTION πΈ
okay so. this little utility sends one or more SAS Serial Management Protocol (SMP) REPORT ZONE PERMISSION TABLE function requests to an SMP target. π
which target, you ask? that's the SMP_DEVICE plus the --sa=SAS_ADDR. depending on which interface you're using, the SAS_ADDR might just be deduced from the SMP_DEVICE β convenient! β¨ but the mpt interface is a little extra: it uses SMP_DEVICE to identify a HBA (aka an SMP initiator), and it needs that extra ,N on the end to tell HBAs apart when there's more than one hanging around. no cap. π
so what do you actually get back? this SMP function returns zone permission descriptors, and each one represents a row of the zone permission table. there's a row for every source zone group, starting at zone group 0 and finishing at zone group 127 or zone group 255. π¦
here's the annoying part: the SMP response size is restricted to 1028 bytes (and yes, that includes the trailing CRC π). that means not all the zone permission table rows can be returned in one REPORT ZONE PERMISSION TABLE function response. so you might need multiple function calls, and on the later calls you use the --start=SS option to say which source zone group to start at next. it's giving relay race. πββοΈ
and then there's --multiple, which is the queen of convenience π β it keeps firing off REPORT ZONE PERMISSION TABLE requests until all source zone groups (or all of them starting from --start=SS) have been output. this is genuinely the most convenient way to dump the whole zone permission table, periodt. but heads up: if you don't pass --multiple, only one REPORT ZONE PERMISSION TABLE request gets sent. one and done. π
one more thing and it's lowkey the best part: the output of this utility is designed to be usable as input to the smp_conf_zone_perm_tbl utility. so basically these two are a duo β save and restore your zone permission table settings. π«Άπ
π OPTIONS π
just so you know: mandatory arguments to long options are mandatory for short options as well. no exceptions, bestie. π
-a,--appendβ used together with--permf=FNso you append toFNif it already exists. and ifFNdoesn't exist? it gets created. either way you win. β¨-B,--bits=COLβ this is an alternate zone permission table representation that shows single bits, with the origin (i.e.ZP[0,0]) sitting up in the top left. the output is a bit array withCOLcolumns and up toCOLrows. this format resembles the example zone permission tables in the SAS draft documents (over at t10.org). the default (i.e. without this option) is output that reflects the byte oriented, big endian nature of SCSI (and hence SMP) commands. β οΈ careful though: the output produced by this option is not suitable as input for thesmp_conf_zone_perm_tblutility. it's pretty, not portable. π-f,--start=SSβ the starting (first and lowest numbered) source zone group. default is zone group0. π±-h,--helpβ outputs the usage message and then dips. bye! π-H,--hexβ outputs the response (less the CRC field) in hexadecimal. π’-I,--interface=PARAMSβ interface specific parameters. and in this case "interface" means the path through the operating system to the SMP initiator. go read thesmp_utilsman page for more info, iykyk. π§-m,--multipleβ starting at source zone group0(orSS), multipleREPORT ZONE PERMISSION TABLErequests get issued until the last (127th and 255th) source zone descriptor is output. π but bestie, this option should not be given together with the--num=MDoption. pick a lane. π-N,--nocommaβ outputs each zone group descriptor as one long string of hexadecimal digits, two digits per byte. the default action is to output a comma separated list of hexadecimal ASCII bytes for each zone group descriptor. commas are cancelled. π«-n,--num=MDβ whereMDis the maximum number of descriptors that can be reported in the one response. the default value is63. and63is the maximum number of "128 zone groups" sized descriptors that can fit in one response. but if the expander is using "256 zone groups" sized descriptors, then a maximum of31descriptors can fit in one response. also, this option should not be given together with the--multipleoption. same energy as above. π ββοΈ-P,--permf=FNβFNis a file to write the zone permission descriptors to. the default action is to output the zone permissions descriptors tostdout. note that the whole permissions table may not fit in one response (we talked about this π). ifFNalready exists then it gets truncated prior to the write β unless--appendis given. to append to the existingFN, add the--appendoption. π-r,--rawβ sends the response (less the CRC field) tostdoutin binary. all error messages go tostderr. messy but honest. π-R,--report=RTβ sets the 'report type' field in the SMP request.RTmay take these values:0for report current values (default);1for report the shadow values;2for report saved values;3for report default values. pick your timeline. β³-s,--sa=SAS_ADDRβ specifies the SAS address of the SMP target device. themptinterface needs this option, and it will typically be an expander's SAS address. theSAS_ADDRis in decimal, but most SAS addresses are shown in hexadecimal. to give a number in hexadecimal, either prefix it with'0x'or put a trailing'h'on it. π-f,--start=SSβ see the entry above, listed in order by its short option letter (i.e.-f). yes it's here twice, that's just how it's listed, don't come for me. π-v,--verboseβ increases the verbosity of the output. can be used multiple times, so go off. π’-V,--versionβ prints the version string and then exits. β
π NOTES π
when --permf=FN is given and SS is greater than zero, then a line of the form "--start=SS" gets written to FN just before the first row of zone permissions. cute, right? π₯°
also there are some examples of the --permf=FN format in the examples directory. go look. π
π§ CONFORMING TO π§
the SMP REPORT ZONE PERMISSION TABLE function was introduced in SAS-2. so it's a legacy queen at this point. π
π AUTHORS π
Written by Douglas Gilbert. we stan. π«Ά
π REPORTING BUGS π
report bugs to <dgilbert at interlog dot com>. please be nice, it's giving constructive. π
π₯ COPYRIGHT π₯
Copyright Β© 2011 Douglas Gilbert
this software is distributed under a FreeBSD license. and there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. like, none. zero. nada. π
π SEE ALSO π
smp_utilssmp_conf_zone_perm_tblsmp_zone_lock(smp_utils)
okay bestie, that's the whole page, you ate it. π
β¨ this was smp_utils-0.96, from June 2011 β yes it's an elder but it's still iconic, SMP_REP_ZONE_PERM_TBL(8) forever. ππ¦π
π¦ where this page comes from
- debian bookworm: smp-utils 0.99-1 Β· BSD-3-Clause
- debian trixie: smp-utils 0.99-1 Β· BSD-3-Clause
- epel 10: smp_utils 0.99-1.el10_0 Β· BSD-3-Clause
- epel 9: smp_utils 0.99-5.el9 Β· BSD
- fedora 43: smp_utils 0.99-14.fc43 Β· BSD-3-Clause
- fedora 44: smp_utils 0.99-15.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: smp_utils 0.99-bp160.1.6 Β· BSD-3-Clause AND GPL-2.0-only
- opensuse-leap 16.0: smp_utils 0.99-bp160.1.6 Β· BSD-3-Clause AND GPL-2.0-only
- opensuse-leap 16.0: smp_utils 0.99-bp160.1.6 Β· BSD-3-Clause AND GPL-2.0-only
- opensuse-leap 16.0: smp_utils 0.99-bp160.1.6 Β· BSD-3-Clause AND GPL-2.0-only
- ubuntu jammy: smp-utils 0.99-1 Β· BSD-3-Clause
- ubuntu noble: smp-utils 0.99-1 Β· BSD-3-Clause
- ubuntu resolute: smp-utils 0.99-1build1 Β· BSD-3-Clause
- ubuntu stonking: smp-utils 0.99-1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms