Home › Forums › FABRIC General Questions and Discussion › MFLib question – querying the entire fabric environment
- This topic has 4 replies, 4 voices, and was last updated 5 months ago by Komal Thareja.
-
AuthorPosts
-
July 8, 2024 at 10:39 pm #7218
Hi,
I searched through the forums, but I couldn’t find any definite information about this, so I thought to ask.I set up a project with MFLib where I add nodes to a slice and then add the measuring node and submit that slice, and then I can measure and query the different nodes inside the slice, and that works well.
My question is this, is there a way to query the entire fabric environment using MFLib, to check, for example, what resources are available at a certain site/rack? Basically, in contrast to my example from above, I would query the entire fabric environment for information without adding the nodes to the slice.
July 12, 2024 at 11:19 am #7233Hi. To query the entire fabric of available resources, see https://github.com/fabric-testbed/jupyter-examples/blob/main/start_here.ipynb and look under “Basic Examples” for “List Available Resources“.
July 12, 2024 at 5:04 pm #7246MFLib currently only performs measurements on a slice.
The Portal, Fabric Portal (fabric-testbed.net) , has information about available resources. Some of that information is available via fablib as KC points to in the previous answer.
Specific infrastructure metrics are available on the infrastructure-metrics.fabric-testbed.net site. These include memory use, cpu load etc… on head and worker nodes. These values are visible using Grafana. There is also a REST API soon to be available to query those values programmatically.
- This reply was modified 5 months, 1 week ago by Charles Carpenter.
July 19, 2024 at 11:27 am #7262One follow up question for this:My question is, from the available resources method mentioned above, it’s simple to check if a rack has a specific NIC. However, I couldn’t find this information as readily using the infrastructure-metric site. Is there a query that returns that information on a node level? ie:
w2
on thewash
site has 2 cx5 NICs available.July 23, 2024 at 10:03 am #7278Hi Bjoern,
We just added support for users to query host level information as well. Examples for this would be available in a couple of days. I am sharing a snippet below on how this can be done:
fablib.list_hosts()
resources = fablib.get_resources()
site = resources.get_site("MAX")
all_hosts = site.get_hosts()
host = site.get_host(name="max-w1.fabric-testbed.net")
print(host)Please checkout our documentation here to find more details. Please let us know if you have more questions/concerns.
https://fabric-fablib.readthedocs.io/en/latest/resources.html
https://fabric-fablib.readthedocs.io/en/latest/site.html
Thanks,
Komal
-
AuthorPosts
- You must be logged in to reply to this topic.