1lsm_local_disk_rpm_get(3) Libstoragemgmt C API Manuallsm_local_disk_rpm_get(3)
2
3
4

NAME

6       lsm_local_disk_rpm_get - Query disk rotation speed.
7

SYNOPSIS

9       int   lsm_local_disk_rpm_get  (const  char  *disk_path,  int32_t  *rpm,
10       lsm_error **lsm_err);
11

ARGUMENTS

13       disk_path   String.  The  path  of  disk  block,  example:  "/dev/sdb",
14                   "/dev/nvme0n1".
15
16       rpm         Output pointer of int32_t.
17
18       lsm_err     Output   pointer  of  lsm_error.  Error  message  could  be
19                   retrieved via lsm_error_message_get. Memory should be freed
20                   by lsm_error_free.
21

VERSION

23       1.3
24

DESCRIPTION

26       Query  the  disk rotation speed - revolutions per minute(RPM) of speciā€
27       fied disk path. Requires permission to open disk path(root user or disk
28       group).
29
30       Possible values of rpm are:
31
32           * -1(LSM_DISK_RPM_UNKNOWN):
33               Unknown RPM.
34           * 0(LSM_DISK_RPM_NON_ROTATING_MEDIUM):
35               Non-rotating medium (e.g., SSD).
36
37           * 1(LSM_DISK_RPM_ROTATING_UNKNOWN_SPEED):
38               Rotational disk with unknown speed.
39           * >1:
40               Normal rotational disk (e.g., HDD).
41

RETURN

43       Error code as enumerated by 'lsm_error_number':
44           * LSM_ERR_OK
45               On success or not found.
46           * LSM_ERR_INVALID_ARGUMENT
47               When any argument is NULL
48           * LSM_ERR_LIB_BUG
49               When something unexpected happens.
50           * LSM_ERR_NOT_FOUND_DISK
51               When provided disk path not found.
52           * LSM_ERR_PERMISSION_DENIED
53               No sufficient permission to access provided disk path.
54
55
56
57December 2019               lsm_local_disk_rpm_get   lsm_local_disk_rpm_get(3)
Impressum