NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Rest API Discussions

Looking for ONTAP API to get metrics of individual volume like last_accessed_time and last_io_acces_

kbhonagiri
2,794 Views

Hi Everyone,

 

I'm looking for ONTAP API to get metrics of individual volume like last_accessed_time and last_io_accessed_time similar . Thanks in advance

 

Kalyan

1 ACCEPTED SOLUTION

ddegraaf
2,738 Views

Hi,

There is no last_accessed_time variable for the whole volume, however you can get the access time from the FileInfo object and you could iterate over each FileInfo object in the volume to find the last_access_time for the whole volume. Something like this:

 

volume = FileInfo.get_collection(vol_uuid, return_metadata=True)
for file in volume:
if hasattr(file, "accessed_time"):
print(file.accessed_time)

 

Let me know if that helps!
Thanks,
Daniel

View solution in original post

2 REPLIES 2

ddegraaf
2,739 Views

Hi,

There is no last_accessed_time variable for the whole volume, however you can get the access time from the FileInfo object and you could iterate over each FileInfo object in the volume to find the last_access_time for the whole volume. Something like this:

 

volume = FileInfo.get_collection(vol_uuid, return_metadata=True)
for file in volume:
if hasattr(file, "accessed_time"):
print(file.accessed_time)

 

Let me know if that helps!
Thanks,
Daniel

kbhonagiri
2,712 Views

Thanks that helps

Public