SMP_REP_PHY_ERR_LOG(8)

πŸ’… smp_rep_phy_err_log β€” the tea on this smp_utils (8) page πŸ¦‹

okay bestie, sit down, we're talking about smp_rep_phy_err_log. that's the name. that's the whole vibe. she lives in the smp_utils manual, section 8, and she is serving.


✨ NAME ✨

sm p_rep_phy_err_log β€” wait no, it's smp_rep_phy_err_log β€” and what she does is invoke the REPORT PHY ERROR LOG SMP function. that's it. that's her job. iconic behavior fr fr.


🌸 SYNOPSIS 🌸

smp_rep_phy_err_log [--help] [--hex] [--interface=PARAMS] [--phy=ID]
[--raw] [--sa=SAS_ADDR] [--verbose] [--version] [--zero] SMP_DEVICE[,N]

look at her. all those flags. she's got range πŸ’–


πŸŽ€ DESCRIPTION πŸŽ€

so here's the deal, bestie: this lil utility sends a SAS Serial Management Protocol (aka SMP, iykyk) REPORT PHY ERROR LOG function request over to an SMP target. that's the mission.

and who is the SMP target? she's identified by two things: the SMP_DEVICE and the SAS_ADDR. sometimes, depending on which interface you're using, the SAS_ADDR can just be deduced straight from the SMP_DEVICE β€” she doesn't even need you to spell it out. lowkey convenient.

one thing to know though: the mpt interface uses SMP_DEVICE to identify a HBA (which is an SMP initiator, btw) and it needs that extra ,N tacked on the end to tell the difference between HBAs if there's more than one hanging around. no ,N, no differentiation. periodt.


πŸ‘‘ OPTIONS πŸ‘‘

mandatory arguments to long options are mandatory for short options too β€” so like, don't get cute and think you can skip one. 🫢

  • -h, --help β€” spits out the usage message and then dips (exits).
  • -H, --hex β€” dumps the response in hexadecimal, minus the CRC field. she's showing her work πŸ’…
  • -I, --interface=PARAMS β€” interface-specific parameters. and when she says "interface" here, she means the path through the operating system to the SMP initiator. check the smp_utils man page for the full lore.
  • -p, --phy=ID β€” the phy identifier. ID is a value from 0 to 254, and the default is 0. so chill.
  • -r, --raw β€” sends the response (again, less the CRC field) to stdout in binary. and all the error messages? those go to stderr. she keeps it separated, as she should.
  • -s, --sa=SAS_ADDR β€” sets the SAS address of the SMP target device. usually that's an expander. this one might not even be needed if the SMP_DEVICE already has the target's SAS address inside it, so like, vibe check first. SAS_ADDR is in decimal, BUT most SAS addresses are shown in hexadecimal, so if you wanna hand her a hex number, either slap a '0x' in front of it or stick a 'h' on the end. your choice, bestie 🌈
  • -v, --verbose β€” turns up the verbosity of the output. and yes, you can use it multiple times. stack it. go off.
  • -V, --version β€” prints the version string and then exits. short and sweet.
  • -z, --zero β€” zeroes the Allocated Response Length field in the request. it also zeroes the Request Length field in the request. this is required for strict SAS-1.1 compliance. HOWEVER. and this is a big however. you should NOT give this option in SAS-2 and later β€” if you do, you might get an abridged response back. so like, know your SAS version before you go zeroing things. ⚠️

πŸ”₯ NOTES πŸ”₯

  • similar info is kept for SAS SSP target phys (like, on a SAS disk, you know the ones). you can get it from the Protocol Specific Port log page using the sg_logs utility.
  • similar info may also be obtained for SAS initiator phys (e.g. on a SAS HBA). as an example, in Linux 2.6.28 you can find error information in this directory: /sys/class/sas_phy/phy-4:0 β€” and that's for phy 0 in SCSI/SAS host 4. cute, right?
  • similar info may be obtained for SATA device phys too (e.g. on a SATA disk). and if there's a SAT layer sitting between the OS and the SATA device, then the sg_sat_phy_event utility can fetch that info for you. she's got connections πŸ’œ

🧚 CONFORMING TO 🧚

the SMP REPORT PHY ERROR LOG function was introduced back in SAS-1. and the "Expander change count" field? that one got added in SAS-2. growth! we love to see it 🌱


πŸ’– AUTHORS πŸ’–

written by Douglas Gilbert. the og. respect 🫑


😭 REPORTING BUGS 😭

found a bug? report it to <dgilbert at interlog dot com>. don't be shy, they wanna know.


copyright Β© 2006-2011 Douglas Gilbert

this software is distributed under a FreeBSD license. and listen β€” there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. so like, she's free but she's not liable, you feel me? πŸ’€


⭐ SEE ALSO ⭐

  • smp_utils
  • smp_phy_control(smp_utils)
  • sg_logs(sg3_utils)
  • sg_sat_phy_event(sg3_utils)

and that's the whole page, bestie πŸ’…βœ¨ this was smp_rep_phy_err_log(8) from smp_utils-0.96, dated May 2011. old but gold. go read your phys. mwah πŸŽ€πŸ¦‹