labgrid-project / labgrid

Embedded systems control library for development, testing and installation
https://labgrid.readthedocs.io/
Other
327 stars 164 forks source link

create a labgrid-client to list the available exporters #492

Open spark5 opened 4 years ago

spark5 commented 4 years ago

Hi!

I would be helpful when checking exporters healthiness to have a labgrid-client command that is able to list the available exporters. What do you think?

Emantor commented 4 years ago

This kind of already exists in labgrid-client resources where each resource is prefixed with the exporter name. labgrid-client resources | awk -F "/" '{ print $1 }' | uniq should print all available exporters.

jluebbe commented 4 years ago

Nevertheless, for a quick check a labgrid-client exporters would be nice. It could show the list of exporters, with the number of exported groups and resources as columns.

spark5 commented 4 years ago

What I imagined this command to look like was to list the available exporters like status = up/down I know that crossbar has internal heartbeats so you can rely on the fact that once an exporter is down, you save the exporter status in coordinator's resources.yaml.

What do you think?

Emantor commented 4 years ago

Currently the coordinator does not track the exporter information, this would mean that any exporter which was once connected to the coordinator will show up as unavailable. Not a problem in fixed setups, but might be unintuitive in setups where developer computers may sometimes be in the system and other times not.

spark5 commented 4 years ago

Alright! I've missed the case of developer exporter not being available all the time. So I guess just a snapshot of the current exporters will be enough.

jluebbe commented 4 years ago

Yes, this sounds useful. We should also keep track of some statistics in the coordinator and report those as well (such as: uptime, event count, number of resources).