SVM svms svm.uuid top-metrics users endpoint overview
Overview
You can use this API to retrieve a list of users with the most I/O activity for FlexVol and FlexGroup volumes belonging to a specified SVM, within the past several seconds. To obtain this list, only the volumes which have the activity tracking feature enabled are considered.
This API is used to provide insight into I/O activity and supports ordering by I/O activity types, namely iops
and throughput
metrics. Use the top_metric
parameter to specify which type of I/O activity to filter for. This API supports returning only one I/O activity type per request.
Enabling and disabling activity tracking feature
The following APIs can be used to enable, disable, and retrieve the activity tracking state for a FlexVol or a FlexGroup volume.
– PATCH /api/storage/volumes/{uuid} -d '{"activity_tracking.state":"on"}'
– PATCH /api/storage/volumes/{uuid} -d '{"activity_tracking.state":"off"}'
– GET /api/storage/volumes/{uuid}/?fields=activity_tracking
Excluded volumes list
Optionally, the API returns an excluded list of activity tracking-enabled volumes, which were not accounted for when obtaining the list of clients with the most I/O activity for the SVM. This excluded list contains both the volume information and the reason for exclusion.
Approximate accounting and error bars
When too many users have recent activity, some users might be dropped from the list. In this situation, the spread of values in the error
field increases, indicating that there are larger error bars on the value for iops
or throughput
. As the list becomes increasingly more approximate due to dropped entries, some of the users that would have otherwise been included might not be present in the final list returned by the API.
Failure to return list of users with most I/O activity
The API can sometimes fail to return the list of users with the most I/O activity, due to the following reasons.
– The volumes belonging to the SVM do not have the activity tracking feature enabled.
– The volumes belonging to the SVM have not had any recent NFS/CIFS client traffic.
– The NFS/CIFS client operations are being served by the client-side filesystem cache.
– The NFS/CIFS client operations are being buffered by the client operating system.
– On rare occasions, the incoming traffic pattern is not suitable to obtain the list of users with the most I/O activity.
Failure to return the usernames
The API can sometimes fail to obtain the usernames for the list of userid entries, due to internal transient errors.
In such cases, instead of the username, the API will return "{
Retrieve a list of the users with the most I/O activity
For a report on the users with the most I/O activity returned in descending order, specify the I/O activity type you want to filter for by passing the iops
or throughput
property into the top_metric parameter. If the I/O activity type is not specified, by default the API returns a list of the users with the greatest number of the average read operations per second. The current maximum number of users returned by the API for an I/O activity type is 25.
– GET /api/svm/svms/{svm.uuid}/top-metrics/users
Examples
Retrieving a list of the users with the greatest average number of read bytes received per second:
# The API: GET /api/svm/svms/{svm.uuid}/top-metrics/users # The Call: curl -X GET "https://<mgmt-ip>/api/svm/svms/{svm.uuid}/top-metrics/users?top_metric=throughput.read" # The Response: { "records": [ { "svm": { "name": "vs1" }, "iops": { "write": 1495, "error": { "lower_bound": 1495, "upper_bound": 1505 } }, "user_id": "S-1-5-21-256008430-3394229847-3930036330-1001", "user_name": "user1", "volumes": [ { "name": "fv1", "uuid": "73b293df-e9d7-46cc-a9ce-2df8e52ef864", "_links": { "self": { "href": "/api/storage/volumes/73b293df-e9d7-46cc-a9ce-2df8e52ef864" } } }, { "name": "fv2", "uuid": "2ea74c3e-d5ca-11eb-8fbb-005056ac0f33", "_links": { "self": { "href": "/api/storage/volumes/2ea74c3e-d5ca-11eb-8fbb-005056ac0f33" } } }, { "name": "fv4", "uuid": "5bbfc226-3fd8-42c9-a651-fa6167c2cf84", "_links": { "self": { "href": "/api/storage/volumes/5bbfc226-3fd8-42c9-a651-fa6167c2cf84" } } } ] }, { "svm": { "name": "vs1" }, "iops": { "write": 1022, "error": { "lower_bound": 1022, "upper_bound": 1032 } }, "user_id": "S-1-5-21-256008430-3394229847-3930036330-1002", "user_name": "user2", "volumes": [ { "name": "fv2", "uuid": "2ea74c3e-d5ca-11eb-8fbb-005056ac0f33", "_links": { "self": { "href": "/api/storage/volumes/2ea74c3e-d5ca-11eb-8fbb-005056ac0f33" } } }, { "name": "fv3", "uuid": "1ca74c3e-d5ca-11eb-8fbb-005056ac0f88", "_links": { "self": { "href": "/api/storage/volumes/1ca74c3e-d5ca-11eb-8fbb-005056ac0f88" } } } ] }, { "svm": { "name": "vs1" }, "iops": { "write": 345, "error": { "lower_bound": 345, "upper_bound": 355 } }, "user_id": "S-1-5-21-256008430-3394229847-3930036330-1003", "user_name": "user3", "volumes": [ { "name": "fv3", "uuid": "1ca74c3e-d5ca-11eb-8fbb-005056ac0f88", "_links": { "self": { "href": "/api/storage/volumes/1ca74c3e-d5ca-11eb-8fbb-005056ac0f88" } } } ] }, { "svm": { "name": "vs1" }, "iops": { "write": 235, "error": { "lower_bound": 235, "upper_bound": 245 } }, "user_id": "1988", "user_name": "user4", "volumes": [ { "name": "fv4", "uuid": "5bbfc226-3fd8-42c9-a651-fa6167c2cf84", "_links": { "self": { "href": "/api/storage/volumes/5bbfc226-3fd8-42c9-a651-fa6167c2cf84" } } } ] }, { "svm": { "name": "vs1" }, "iops": { "write": 235, "error": { "lower_bound": 235, "upper_bound": 245 } }, "user_id": "S-1-5-21-256008430-3394229847-3930036330-1005", "user_name": "user5", "volumes": [ { "name": "fv5", "uuid": "5bbfc227-3fd8-42c9-a651-fa6167c2cf85", "_links": { "self": { "href": "/api/storage/volumes/5bbfc227-3fd8-42c9-a651-fa6167c2cf85" } } } ] } ], "num_records": 5, "excluded_volumes": [ { "volume": { "uuid": "5bbfc224-3fd8-42c9-a651-fa6167c2cf84", "name": "vol1", "_links": { "self": { "href": "/api/storage/volumes/5bbfc224-3fd8-42c9-a651-fa6167c2cf84" } } }, "reason": { "message": "The volume is offline.", "code": 12345 }, "_links": { "self": { "href": "/api/storage/volumes/5bbfc224-3fd8-42c9-a651-fa6167c2cf84" } } }, { "volume": { "uuid": "5bbfc224-3fd8-42c9-a651-fa6167c2cf85", "name": "vol2", "_links": { "self": { "href": "/api/storage/volumes/5bbfc224-3fd8-42c9-a651-fa6167c2cf85" } } }, "reason": { "message": "The volume is offline.", "code": 23456 }, "_links": { "self": { "href": "/api/storage/volumes/5bbfc224-3fd8-42c9-a651-fa6167c2cf85" } } } ], "_links": { "self": { "href": "/api/svm/svms/f5516c44-3e61-11ec-9cd5-005056acae40/top-metrics/users?top_metric=iops.write&fields=**" } } }
Example showing the behavior of the API where there is no read/write traffic:
# The Call: curl -X GET "https://<mgmt-ip>/api/svm/svms/{svm.uuid}/top-metrics/users?top_metric=throughput.write" # The Response: { "records": [ ], "num_records": 0, "notice": { "message": "The activity tracking report for SVM \"vs1\" returned zero records. Check whether the activity tracking enabled volumes belonging to the SVM have read/write traffic. Refer to the REST API documentation for more information on why there might be no records.", "code": "124519405", }, "_links": { "self": { "href": "/api/svm/svms/f5516c44-3e61-11ec-9cd5-005056acae40/top-metrics/users?top_metric=throughput.write" } } }