Skip to main content
A newer release of this product is available.

Storage volumes volume.uuid top-metrics files endpoint overview

Contributors

Overview

You can use this API to retrieve a list of files with the most IO activity for a specified volume. Use the top_metric parameter to specify which type of IO activity to filter for. This API is used to provide insight into IO activity and supports ordering by IO activity types, namely iops or throughput metrics. This API also supports only returning one IO activity type per request.

Failure to return list of files with most IO activity

The API can sometimes fail to return the list of files with the most IO activity, due to the following reasons:

– The volume does not have the activity tracking feature enabled.

– The volume does not have read/write traffic.

– The read traffic is served by the NFS/CIFS client filesystem cache.

– On rare occasions, the incoming traffic pattern is not suitable to obtain the list of files with the most IO activity.

Failure to return the pathnames for the list of files with most IO activity

The API can sometimes fail to obtain the filesystem pathnames for the list of files, due to internal transient errors. In such cases, instead of the pathname, the API will return "{:}" for every file entry. You can get more information about the file entry by invoking the GET on the below API using the above obtained fileid. "GET /api/storage/volumes/{}/files/{path}?inode_number="

Retrieve a list of the files with the most IO activity

For a report on the files with the most IO activity returned in descending order, specify the IO activity type you want to filter for by passing the iops or throughput property into the top_metric parameter. If the IO activity type is not specified, by default the API returns a list of the files with the greatest number of the average read operations per second. The maximum number of files returned by the API for an IO activity type is 25.

– GET /api/storage/volumes/{volume.uuid}/top-metrics/files

Examples

Retrieving a list of the files with the greatest average number of write bytes received per second:

# The API:
GET /api/storage/volumes/{volume.uuid}/top-metrics/files

# The Call:
curl -X GET "https://<mgmt-ip>/api/storage/volumes/{volume.uuid}/top-metrics/files?top_metric=throughput.write"

# The Response:
{
"records": [
  {
    "volume": {
      "name": "fv"
    },
    "throughput": {
      "write": 24,
      "error": {
        "lower_bound": 24,
        "upper_bound": 29
      }
    },
    "path": "/d5/f5",
    "svm": {
      "uuid": "0ba74c3e-d5ca-11eb-8fbb-005056ac0f77",
      "name": "vs0",
      "_links": {
        "self": {
          "href": "/api/svm/svms/0ba74c3e-d5ca-11eb-8fbb-005056ac0f77"
        }
      }
    },
    "_links": {
      "metadata": {
        "href": "/api/storage/volumes/4ec6d1ea-d5da-11eb-a25f-005056ac0f77/files/d5%2Ff5?return_metadata=true"
      }
    }
  },
  {
    "volume": {
      "name": "fv"
    },
    "throughput": {
      "write": 12,
      "error": {
        "lower_bound": 12,
        "upper_bound": 22
      }
    },
    "path": "/d6/f6",
    "svm": {
      "uuid": "0ba74c3e-d5ca-11eb-8fbb-005056ac0f77",
      "name": "vs0",
      "_links": {
        "self": {
          "href": "/api/svm/svms/0ba74c3e-d5ca-11eb-8fbb-005056ac0f77"
        }
      }
    },
    "_links": {
      "metadata": {
        "href": "/api/storage/volumes/4ec6d1ea-d5da-11eb-a25f-005056ac0f77/files/d6%2Ff6?return_metadata=true"
      }
    }
  },
  {
    "volume": {
      "name": "fv"
    },
    "throughput": {
      "write": 8,
      "error": {
        "lower_bound": 8,
        "upper_bound": 10
      }
    },
    "path": "/d3/f3",
    "svm": {
      "uuid": "0ba74c3e-d5ca-11eb-8fbb-005056ac0f77",
      "name": "vs0",
      "_links": {
        "self": {
          "href": "/api/svm/svms/0ba74c3e-d5ca-11eb-8fbb-005056ac0f77"
        }
      }
    },
    "_links": {
      "metadata": {
        "href": "/api/storage/volumes/4ec6d1ea-d5da-11eb-a25f-005056ac0f77/files/d3%2Ff3?return_metadata=true"
      }
    }
  }
],
"num_records": 3,
"_links": {
  "self": {
    "href": "/api/storage/volumes/4ec6d1ea-d5da-11eb-a25f-005056ac0f77/top-metrics/files?top_metric=throughput.write"
  }
}
}

Retrieving a list of the files with the most traffic with failure in obtaining the pathnames for the files:

# The Call:
curl -X GET "https://<mgmt-ip>/api/storage/volumes/{volume.uuid}/top-metrics/files?top_metric=throughput.write"

# The Response:
{
"records": [
  {
    "volume": {
      "name": "fv"
    },
    "throughput": {
      "write": 24,
      "error": {
        "lower_bound": 24,
        "upper_bound": 29
      }
    },
    "path": "{4ec6d1ea-d5da-11eb-a25f-005056ac0f77:1232}",
    "svm": {
      "uuid": "0ba74c3e-d5ca-11eb-8fbb-005056ac0f77",
      "name": "vs0",
      "_links": {
        "self": {
          "href": "/api/svm/svms/0ba74c3e-d5ca-11eb-8fbb-005056ac0f77"
        }
      }
    }
  },
  {
    "volume": {
      "name": "fv"
    },
    "throughput": {
      "write": 12,
      "error": {
        "lower_bound": 12,
        "upper_bound": 22
      }
    },
    "path": "{4ec6d1ea-d5da-11eb-a25f-005056ac0f77:6754}",
    "svm": {
      "uuid": "0ba74c3e-d5ca-11eb-8fbb-005056ac0f77",
      "name": "vs0",
      "_links": {
        "self": {
          "href": "/api/svm/svms/0ba74c3e-d5ca-11eb-8fbb-005056ac0f77"
        }
      }
    }
  },
  {
    "volume": {
      "name": "fv"
    },
    "throughput": {
      "write": 8,
      "error": {
        "lower_bound": 8,
        "upper_bound": 10
      }
    },
    "path": "{4ec6d1ea-d5da-11eb-a25f-005056ac0f77:8654}",
    "svm": {
      "uuid": "0ba74c3e-d5ca-11eb-8fbb-005056ac0f77",
      "name": "vs0",
      "_links": {
        "self": {
          "href": "/api/svm/svms/0ba74c3e-d5ca-11eb-8fbb-005056ac0f77"
        }
      }
    }
  }
],
"num_records": 3,
"_links": {
  "self": {
    "href": "/api/storage/volumes/4ec6d1ea-d5da-11eb-a25f-005056ac0f77/top-metrics/files?top_metric=throughput.write"
  }
}
}

Example showing the behavior of the API when there is no read/write traffic:

# The Call:
curl -X GET "https://<mgmt-ip>/api/storage/volumes/{volume.uuid}/top-metrics/files?top_metric=throughput.write"

# The Response:
{
"records": [
],
"num_records": 0,
"notice": {
  "message": "The activity tracking report for volume \"FV\" in SVM \"vs0\" returned zero records. Check whether the volume have read/write traffic. Refer to the REST API documentation for more information on why there might be no records.",
  "code": "124518418"
},
"_links": {
  "self": {
    "href": "/api/storage/volumes/9af63729-8ac8-11ec-b1bc-005056a79da4/top-metrics/files?top_metric=throughput.write"
  }
}
}