SMP_PHY_TEST(8)
π SMP_PHY_TEST(8) β the smp_utils glow-up β¨
okay so bestie, welcome to smp_phy_test from the SMP_UTILS collection, section 8 of the manual, we love a system-administration moment π
πΈ NAME πΈ
smp_phy_test β literally just invokes the PHY TEST FUNCTION SMP function, no cap π
β¨ SYNOPSIS β¨
smp_phy_test [--control=CO] [--dwords=DW] [--expected=EX]
[--function=FN] [--help] [--hex] [--interface=PARAMS] [--linkrate=LR]
[--pattern=PA] [--phy=ID] [--raw] [--sa=SAS_ADDR] [--sata] [--spread=SC]
[--verbose] [--version] SMP_DEVICE[,N]
she's giving flags for days π¦
π«Ά DESCRIPTION π«Ά
so what she actually does: she sends a SAS Serial Management Protocol (SMP) PHY TEST FUNCTION function request to an SMP target. the SMP target gets identified by the SMP_DEVICE plus the SAS_ADDR. depending on which interface you're on, the SAS_ADDR might just be deduced from the SMP_DEVICE, cute. the mpt interface uses SMP_DEVICE to identify a HBA (an SMP initiator) and it needs that extra ,N to tell HBAs apart if there's more than one hanging around π
the PHY TEST FUNCTION function can start and stop test pattern transmission. and here's the tea β: when a phy associated with an SMP target (most likely an expander) starts test pattern transmission, then the attached phy (if there even is one) sees a link down π so yeah. that's the vibe.
SAS phys associated with SSP targets (e.g. a SAS disk) can generate similar test patterns by using the SEND DIAGNOSTIC SCSI command with page code 3fh. go check the sg_senddiag utility for that one π
π OPTIONS π
mandatory arguments to long options are mandatory for short options as well. yes bestie, the rules apply both ways π
-c,--control=COβ sets the 'phy test pattern dwords control' field.COcan be anywhere from0to255inclusive, and the default is0(which means each byte in 'dwords' gets sent as a data byte (Dxx.y) without scrambling). heads up: this is only active when 'pattern' is set to40h(i.e."two_dwords") β-d,--dwords=DWβ sets the 'phy test pattern dwords' field, which is8bytes long.DWwould normally be entered in hex with a leading0xor a trailingh(otherwise it's gonna be interpreted as decimal, oops). and due to a quirk in the command line parser, the argument valueffffffffffffffffh(i.e. all bits sets) needs to be entered as'-1'π quirky fr fr-E,--expected=EXβ sets the 'expected expander change count' field in the SMP request.EXgoes from0to65535inclusive, and0is the default. whenEXis greater than zero, then if the value doesn't match the expander change count of the SMP target (i.e. the expander) when the request arrives, then the target ignores the request and sets a function result of"invalid expander change count"in the response. it's giving β¨trust issuesβ¨-f,--function=FNβ sets the 'phy test function' field in the SMP request. values between0and255are accepted, default is0. the value0stops the selected phy from performing a phy test function. the value1starts the selected phy transmitting the test pattern (and anything that the phy receives is discarded, bye π).-h,--helpβ outputs the usage message then exits. classic π«Ά-H,--hexβ outputs the response (less the CRC field) in hexadecimal π-I,--interface=PARAMSβ interface specific parameters. in this case"interface"refers to the path through the operating system to the SMP initiator. go read thesmp_utilsman page for more info π-l,--linkrate=LRβ transmits the test pattern at the specified physical link rate:8β 1.5 Gbps,9β 3 Gbps,10β 6 Gbps,11β 12 Gbps. default value is0xa(i.e. 6 Gbps). and prior to version0.99the default value was9(i.e. 3 Gbps) β throwback era π-P,--pattern=PAβ specifies the type of test pattern to transmit. SPL-4 (rev 8) values are:1β JTPAT,2β CJTPAT,3β PRBS9,4β PRBS15,10hβ TRAIN,11hβ TRAIN_DONE,12hβ IDLE,13hβ SCRAMBLED_0,40hβ TWO_DWORDS. the default value is2(i.e. CJTPAT) π-p,--phy=IDβ phy identifier.IDis a value between0and254. default is0π¦-r,--rawβ sends the response (less the CRC field) tostdoutin binary. all error messages go tostderr. keepin' em separated, iconic π₯-s,--sa=SAS_ADDRβ specifies the SAS address of the SMP target device. typically this is an expander. this option may not be needed if theSMP_DEVICEhas the target's SAS address within it. theSAS_ADDRis in decimal but most SAS addresses are shown in hexadecimal. to give a number in hexadecimal either prefix it with0xor put a trailinghon it π-t,--sataβ sets phy test function SATA bit. the default action is to leave that bit clear (zero) π-S,--spread=SCβ sets the phy test function Spread Spectrum Clocking (SSC) field toSC. default value is zero (no spreading). other defined values are1for centre spreading and2for down spreading πΈ-v,--verboseβ increases the verbosity of the output. can be used multiple times π-V,--versionβ prints the version string and then exits. short and sweet β
π§ CONFORMING TO π§
the SMP PHY TEST function was introduced in SAS-1.1 and enhanced in SAS-2. she's been through eras, and she ate every time π
π AUTHORS π
written by Douglas Gilbert. king behaviour honestly π
π REPORTING BUGS π
report bugs to <dgilbert at interlog dot com>. bestie will hear you out π«Ά
π COPYRIGHT π
copyright Β© 2006-2017 Douglas Gilbert
this software is distributed under a FreeBSD license. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. so if it breaks, that's on you, no cap π
π SEE ALSO π
smp_utilssg_senddiag(sg3_utils)
π and that's the whole page, bestie! this was smp_utils-0.99, dated October 2017, and she's still serving. go forth and test those phys, you absolute main character ππβ¨
π¦ 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