lsm_local..._speed_get(3)

๐Ÿ“ฆ
version 1.10.3 ยท 3 versions
, in fedora 43, fedora 44

๐Ÿ’– NAME ๐Ÿ’–

lsm_local_disk_link_speed_get โ€” the icon, the moment, the legend โœจ

(no fr the original leaves the description blank bestie, so we're just vibing with the name and letting the rest of the page do the talking ๐Ÿ’…)


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

int lsm_local_disk_link_speed_get (const char *disk_path, uint32_t
*link_speed, lsm_error **lsm_err);

๐ŸŒธ ARGUMENTS ๐ŸŒธ

  • disk_path โ€” String. This is the path of your block device, okay? Think "/dev/sdb", think "/dev/nvme0n1". That's the vibe. ๐Ÿ‘‘
  • link_speed โ€” Output pointer of link speed in Mbps. She's giving you numbers, bestie, and she's giving them in megabits per second.
  • lsm_err โ€” Output pointer of lsm_error. If something goes wrong, the error message could be retrieved via lsm_error_message_get, and the memory should be freed by lsm_error_free. Don't leave her hanging, free your memory. ๐Ÿซถ

โœจ DESCRIPTION โœจ

1.4

Query the current negotiated disk link speed. So like, how fast is this disk actually talking right now. Not what it could do, what it's doing. ๐Ÿ’…

This requires permission to open the disk path โ€” so either root user or the disk group. No permission, no numbers. ๐Ÿšซ

The output speed is in Mbps. For example, 3.0 Gbps will get 3000. Math is math. ๐Ÿงฎ

And if there's an error, it gets set to 0 (LSM_DISK_LINK_SPEED_UNKNOWN). So if you see a zero, that's not a fast disk, that's a whole situation. ๐Ÿ˜ญ


๐Ÿ”ฅ RETURN ๐Ÿ”ฅ

Error code as enumerated by 'lsm_error_number':

  • LSM_ERR_OK โ€” On success. ATE. PERIODT. โœจ
  • LSM_ERR_INVALID_ARGUMENT โ€” When any argument is NULL. You passed nothing, bestie, and nothing is not a path. ๐Ÿ’€
  • LSM_ERR_LIB_BUG โ€” When something unexpected happens. Not your fault, it's giving library bug energy. ๐Ÿ™ˆ
  • LSM_ERR_NOT_FOUND_DISK โ€” When provided disk path not found. That disk? Not here. Ghosted you. ๐Ÿ‘ป
  • LSM_ERR_PERMISSION_DENIED โ€” Insufficient permission to access provided disk path. Root user or disk group, we talked about this. ๐ŸŽ€
  • LSM_ERR_NO_SUPPORT โ€” Action is not supported. She simply doesn't do that. ๐ŸŒธ

okay that's the whole page, you ate it, you understood it, you're a Unix main character now ๐Ÿ‘‘

This is the Libstoragemgmt C API Manual โ€” that's the manual name, folding it in right here at the top of your heart ๐Ÿ’œ โ€” and we're clocking in from February 2026. Bye bestie, go query some link speeds! ๐Ÿฆ‹๐Ÿ’–๐ŸŒˆ

๐Ÿ“ฆ where this page comes from