Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Looking for ONTAP API to get metrics of individual volume like last_accessed_time and last_io_acces_
2023-02-28
12:15 PM
1,881 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! See The Solution
1 ACCEPTED SOLUTION
kbhonagiri has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
2 REPLIES 2
kbhonagiri has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks that helps
