Jtop refresh setting for custom flask server

I’m currently trying to monitor the energy consumption of my AGX Orin jetson with the python package jtrop. I’m using prometheus and grafana to get a remote visualisation, and I’d like to know how I can increase the jtop sample rate from my prometheus exporter to python using flask. I’m using an instantiation of the type :

        self._jetson = jtop()
        self._jetson.start()

I’ve already set the prometheus scrapping time to measure every 100ms and I’d like Jtop to also provide a metric every 100ms. I’ve tried various things with the ‘interval’ variable but I haven’t managed to get the desired behaviour

Hi charles.fonbonne,

Are you using the devkit or custom board for AGX Orin?
What’s your Jetpack version in use?

Please share the detailed steps how do you use them.

I am using the AGX Orin devkit with jetpack 6.1, my goal here is to use the jetson-stats python library to export the metrics i want trough a flask server and acess them with grafana and prometheus for vizualisation. Prometheus just send a get request to the server and with that i can get the values of cpu usage, gpu usage, power usage etc… However i did not suceed to speed up the interval or refresh rate of jetson-stat, so even if i’m getting values every 100ms with prometheus, the server only change its metrics every 1000ms.

I saw that when using the bash jtop command there is a flag called ‘–refresh’ and I wanted to know if there was an equivalent in the python library.

Thank you

Hi @charles.fonbonne

Thank you for working with jetson-stats!

If you are using Grafana, there are some repositories and forks available on GitHub.

I recommend following established examples to improve the design of your code.jetson_stats/examples at master · rbonghi/jetson_stats · GitHub

Regarding also the sample rate, follow the documentation: jtop - jetson-stats 4.3.1

The 100ms framerate is too high for jtop to manage. Please try a higher timerate, like 500ms.

Best,
Raffaello

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.