lsm_local_disk_link_speed_get - Man Page
int lsm_local_disk_link_speed_get (const char *disk_path, uint32_t *link_speed, lsm_error **lsm_err);
String. The path of block device, example: "/dev/sdb", "/dev/nvme0n1".
Output pointer of link speed in Mbps.
Output pointer of lsm_error. Error message could be retrieved via lsm_error_message_get. Memory should be freed by lsm_error_free.
Query the current negotiated disk link speed. Requires permission to open disk path(root user or disk group). The output speed is in Mbps. For example, 3.0 Gbps will get 3000. Set to 0(LSM_DISK_LINK_SPEED_UNKNOWN) if error.
Error code as enumerated by 'lsm_error_number':
When any argument is NULL
When something unexpected happens.
When provided disk path not found.
Insufficient permission to access provided disk path.
Action is not supported.