Measuring Energy Usage on Jetson Products
Recently we finalized a project which involved running Machine Learning on a edge device. For edge devices we chose jetson nano and jetson tx2. Big part of our project was about the power usage on running ML on edge devices. To achieve this we needed to measure the power usage of our edge devices.
Now Jetson boards come with sensors (in there boards) to calculate the energy usage. So it's not a "must" requirement use external power measuring devices (as with RPI devices). There's a handy tool named tegrastats which can be used to read the power sensor values. How tegrastats work is once it's invoked, it prints the sensor readings periodically. So it's possible to redirect it's output to a file and later parse it to get the required values.
Another way of gathering power readings is using one of nice tool built around tegrastats. Like jtop (jetson_stats) It's written in python. Jtop looks much like htop but with additional power values.
It also come with an easy to use script that logs the sensor readings. Thus parsing the jtop output is easier compared to tegrastats output.