SMP_CONF_PHY_EVENT(8)

πŸ’– SMP_CONF_PHY_EVENT πŸ’–

okay bestie, welcome to smp_conf_phy_event from the smp_utils squad β€” this is the little utility that goes and invokes the CONFIGURE PHY EVENT function. it's giving very specific, very SAS, very ✨niche✨ and we're gonna understand it together.


✨ SYNOPSIS ✨

smp_conf_phy_event [--clear] [--enumerate] [--expected=EX] [--file=FILE]
[--help] [--hex] [--interface=PARAMS] [--pes=PES,PES...]  [--phy=ID]
[--raw] [--sa=SAS_ADDR] [--thres=THR,THR...] [--verbose] [--version]
SMP_DEVICE[,N]

like yes, that's a lot of brackets, breathe. we'll go one by one 🫢


🌸 DESCRIPTION 🌸

so what this actually does: it sends a SAS Serial Management Protocol (SMP) CONFIGURE PHY EVENT function request to an SMP target. that's the whole vibe.

the SMP target gets identified by the SMP_DEVICE and the --sa=SAS_ADDR. depending on which interface you're using, the SAS_ADDR might just be deduced from the SMP_DEVICE β€” free of charge, no extra work πŸ’…. the mpt interface is the needy one: it uses SMP_DEVICE to identify a HBA (that's an SMP initiator) and it needs the extra ,N to tell the difference between HBAs when there's more than one hanging around. multiple HBAs? gotta specify. periodt.

now the function request itself contains zero or more phy event configuration descriptors. and each descriptor is 8 bytes long, containing:

  • a phy event source β€” one byte long
  • and optionally a peak value detector threshold β€” 32 bits long (4 bytes)

these values can either be handed over on the command line as the arguments to the --pes and --thres options, or tucked inside a FILE given to the --file option. your call, bestie.

once a phy event source has been configured by this function, its counters should be readable with the REPORT PHY EVENT or REPORT PHY EVENT LIST functions. and listen β€” peak value detector thresholds should only be non-zero for phy event sources whose type is "peak value detector". if the threshold value gets exceeded, the expander will originate a Broadcast(Expander). iconic behavior honestly.


πŸŽ€ OPTIONS πŸŽ€

mandatory arguments to long options are mandatory for short options as well. yes, the short ones aren't getting a free pass. no cap.
  • -C, --clear β€” sets the CLEAR PEAKS bit in the function request. this will cause all peak value detectors associated with this phy (i.e. ID) to be cleared to zero. clean slate energy 🌈
  • -e, --enumerate β€” enumerate all of the known Phy Event Source names, one per line, preceded by its value in hex. ignores SMP_DEVICE if it's given; most other options are also ignored. exits after displaying the names. it's like a little parade of names and then it dips πŸ‘‘
  • -E, --expected=EX β€” set the 'expected expander change count' field in the SMP request. EX is from 0 to 65535 inclusive, with 0 being the default value. when EX is 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, the target ignores the request and sets a function result of "invalid expander change count" in the response. it's giving ✨trust but verify✨
  • -f, --file=FILE β€” where FILE is a file name containing pairs of values. the first member of each pair is a phy event source and the second member of the pair is a peak value detector threshold. values are interpreted as decimal unless prefixed by '0x' or '0X' (or it has a trailing 'h' or 'H'). everything from and including a "#" on a line is ignored, as are blank lines. values may be comma, space and tab separated or appear on separate lines. this option cannot be present with the --pes option. pick a lane bestie, you can't have both 🚫
  • -h, --help β€” output the usage message then exit. the classic cry for help (affectionate) πŸ™ˆ
  • -H, --hex β€” output the response (less the CRC field) in hexadecimal. nerdy and gorgeous πŸ’œ
  • -I, --interface=PARAMS β€” interface specific parameters. in this case "interface" refers to the path through the operating system to the SMP initiator. see the smp_utils man page for more information.
  • -p, --phy=ID β€” phy identifier. ID is a value between 0 and 254 (default 0). know your phy, love your phy πŸ¦‹
  • -P, --pes=PES,PES... β€” where PES,PES... is a string of comma (or space) separated values that are interpreted as phy event sources (each a value from 0 to 255). each number is interpreted as decimal unless prefixed by '0x' or '0X' (or it has a trailing 'h' or 'H'). an argument that contains any space separators needs to be quoted (or otherwise escaped). when this option is given then the --thres option may also be given and they should contain the same number of elements in their arguments. matching sets, we love symmetry 🫢
  • -r, --raw β€” send the response (less the CRC field) to stdout in binary. all error messages are sent to stderr. raw data, zero filter, main character energy πŸ’€
  • -s, --sa=SAS_ADDR β€” specifies the SAS address of the SMP target device. the mpt interface needs this option and it will typically be an expander's SAS address. the SAS_ADDR is 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. hex girlies, this one's for you ✨
  • -T, --thres=THR,THR... β€” where THR,THR... is a string of comma (or space) separated values that are interpreted as peak value detector thresholds (each a 32 bit value). each number is interpreted as decimal unless prefixed by '0x' or '0X' (or it has a trailing 'h' or 'H'). an argument that contains any space separators needs to be quoted (or otherwise escaped). when this option is given then the --pes option must also be given and they should contain the same number of elements in their arguments. it's a duo, they don't perform solo πŸŽ€
  • -v, --verbose β€” increase the verbosity of the output. can be used multiple times. stack it, why not πŸ”₯
  • -V, --version β€” print the version string and then exit. quick lil flex.

🌈 CONFORMING TO 🌈

the SMP CONFIGURE PHY EVENT function was introduced in SAS-2 . (yes, that space before the period is canon, i don't make the rules 😭)


πŸ‘‘ AUTHORS πŸ‘‘

written by Douglas Gilbert. a legend, frankly.


πŸ’€ REPORTING BUGS πŸ’€

report bugs to <dgilbert at interlog dot com>. be nice about it bestie, we're all just doing our best.


Copyright Β© 2011 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 like... no promises, but slay anyway πŸ’…


🧚 SEE ALSO 🧚

  • smp_utils
  • smp_rep_phy_event
  • smp_rep_phy_event_list

and that's the whole thing!! this page is from smp_utils-0.97, dated December 2011 β€” yeah it's vintage but it still ate πŸ’– go configure some phy events, bestie, you got this 🫢✨🌸