lsm_local..._speed_get(3)
๐ 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 oflsm_error. If something goes wrong, the error message could be retrieved vialsm_error_message_get, and the memory should be freed bylsm_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 isNULL. 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
- fedora 43: libstoragemgmt-devel 1.10.3-1.fc43 ยท LGPL-2.1-or-later
- fedora 44: libstoragemgmt-devel 1.10.3-1.fc44 ยท LGPL-2.1-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms