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

SVM svms svm.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 FlexVol and FlexGroup volumes belonging to a specified SVM. To obtain this list, only the volumes which have the activity tracking feature enabled are considered.

This API is used to provide insight into IO activity and supports ordering by IO activity types, namely iops and throughput metrics. Use the top_metric parameter to specify which type of IO activity to filter for. This API supports returning only one IO 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 IO activity for the SVM. This excluded list contains both the volume information and the reason for exclusion.

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 volumes belonging to the SVM do not have the activity tracking feature enabled.

– The volumes belonging to the SVM do 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

The API can sometimes fail to obtain the filesystem pathnames for the list of file entries, 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/svm/svms/{svm.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/svm/svms/{svm.uuid}/top-metrics/files

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

# The Response:
{
"records": [
  {
    "svm": {
      "name": "vs1"
    },
    "throughput": {
      "write": 24,
      "error": {
        "lower_bound": 24,
        "upper_bound": 29
      }
    },
    "path": "/vol/fv1/d5/f5",
    "junction-path": "/fv1",
    "volume": {
        "name": "fv1",
        "uuid": "73b293df-e9d7-46cc-a9ce-2df8e52ef864",
        "_links": {
          "self": {
              "href": "/api/storage/volumes/73b293df-e9d7-46cc-a9ce-2df8e52ef864"
          }
        }
    },
    "_links": {
      "metadata": {
          "href": "/api/storage/volumes/73b293df-e9d7-46cc-a9ce-2df8e52ef864/files/d5%2Ff5?return_metadata=true"
      }
    }
  },
  {
    "svm": {
      "name": "vs1"
    },
    "throughput": {
      "write": 12,
      "error": {
        "lower_bound": 12,
        "upper_bound": 22
      }
    },
    "path": "/vol/fv2/d6/f6",
    "junction-path": "/fv2",
    "volume": {
        "name": "fv2",
        "uuid": "2ea74c3e-d5ca-11eb-8fbb-005056ac0f33",
        "_links": {
          "self": {
              "href": "/api/storage/volumes/2ea74c3e-d5ca-11eb-8fbb-005056ac0f33"
          }
        }
    },
    "_links": {
      "metadata": {
        "href": "/api/storage/volumes/2ea74c3e-d5ca-11eb-8fbb-005056ac0f33/files/d6%2Ff6?return_metadata=true"
      }
    }
  },
  {
    "svm": {
      "name": "vs1"
    },
    "throughput": {
      "write": 8,
      "error": {
        "lower_bound": 8,
        "upper_bound": 10
      }
    },
    "path": "/vol/fv3/d3/f3",
    "junction-path": "/fv3",
    "volume": {
        "name": "fv3",
        "uuid": "1ca74c3e-d5ca-11eb-8fbb-005056ac0f88",
        "_links": {
          "self": {
              "href": "/api/storage/volumes/1ca74c3e-d5ca-11eb-8fbb-005056ac0f88"
          }
        }
    },
    "_links": {
      "metadata": {
        "href": "/api/storage/volumes/1ca74c3e-d5ca-11eb-8fbb-005056ac0f88/files/d3%2Ff3?return_metadata=true"
      }
    }
  }
],
"num_records": 3,
"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/4ec6d1ea-d5da-11eb-a25f-005056ac0f77/top-metrics/files?top_metric=throughput.write"
  }
}
}

Retrieving a list of the files with the most read traffic, with failure to obtain pathnames

# The Call:
curl -X GET "https://<mgmt-ip>/api/svm/svms/{svm.uuid}/top-metrics/files?top_metric=iops.read"

# The Response:
{
"records": [
  {
    "svm": {
      "name": "vs1"
    },
    "iops": {
      "read": 1495,
      "error": {
        "lower_bound": 1495,
        "upper_bound": 1505
      }
    },
    "path": "73b293df-e9d7-46cc-a9ce-2df8e52ef86.1232",
    "junction-path": "/fv1",
    "volume": {
        "name": "fv1",
        "uuid": "73b293df-e9d7-46cc-a9ce-2df8e52ef86",
        "_links": {
          "self": {
              "href": "/api/storage/volumes/73b293df-e9d7-46cc-a9ce-2df8e52ef86"
          }
        }
    }
  },
  {
    "svm": {
      "name": "vs1"
    },
    "iops": {
      "read": 1022,
      "error": {
        "lower_bound": 1022,
        "upper_bound": 1032
      }
    },
    "path": "11b293df-e9d7-46cc-a9ce-2df8e52ef811.6574",
    "junction-path": "/fv2",
    "volume": {
        "name": "fv2",
        "uuid": "11b293df-e9d7-46cc-a9ce-2df8e52ef811",
        "_links": {
          "self": {
              "href": "/api/storage/volumes/11b293df-e9d7-46cc-a9ce-2df8e52ef811"
          }
        }
    }
  },
  {
    "svm": {
      "name": "vs1"
    },
    "iops": {
      "read": 345,
      "error": {
        "lower_bound": 345,
        "upper_bound": 355
      }
    },
    "path": "73b293df-e9d7-46cc-a9ce-2df8e52ef864.7844",
    "junction-path": "/fv1",
    "volume": {
        "name": "fv1",
        "uuid": "73b293df-e9d7-46cc-a9ce-2df8e52ef864",
        "_links": {
          "self": {
              "href": "/api/storage/volumes/73b293df-e9d7-46cc-a9ce-2df8e52ef864"
          }
        }
    }
  }
],
"num_records": 3,
"excluded_volumes": [
  {
    "volume": {
      "uuid": "5bbfc226-3fd8-42c9-a651-fa6167c2cf84",
      "name": "vol10",
      "_links": {
        "self": {
          "href": "/api/storage/volumes/5bbfc226-3fd8-42c9-a651-fa6167c2cf84"
        }
      }
    },
    "reason": {
      "message": "The volume is offline.",
      "code": 12345
    },
    "_links": {
      "self": {
        "href": "/api/storage/volumes/5bbfc226-3fd8-42c9-a651-fa6167c2cf84"
      }
    }
  },
  {
    "volume": {
      "uuid": "5bbfc227-3fd8-42c9-a651-fa6167c2cf85",
      "name": "vol22",
      "_links": {
        "self": {
          "href": "/api/storage/volumes/5bbfc227-3fd8-42c9-a651-fa6167c2cf85"
        }
      }
    },
    "reason": {
      "message": "The volume is offline.",
      "code": 23456
    },
    "_links": {
      "self": {
        "href": "/api/storage/volumes/5bbfc227-3fd8-42c9-a651-fa6167c2cf85"
      }
    }
  }
],
"_links": {
  "self": {
    "href": "/api/svm/svms/572361f3-e769-439d-9c04-2ba48a08ff43/top-metrics/files?top_metric=iops.read"
  }
}
}

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/files?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 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/4ec6d1ea-d5da-11eb-a25f-005056ac0f77/top-metrics/files?top_metric=throughput.write"
  }
}
}