We know that allocating Jettson’s log files (especially in csv format) and changing power modes in the Jettson can be done using the Jettson’s GUI.
We would like to do automation and allocate these log files and change the Jettson’s power modes using python. Is that possible and if so, how it can be done?
We’ll appreciate your help.
How to create log files and change Jetson's power using python (Jetson AGX Xavier)
what logs you meant, is it kernel logs, or system level logs?
is there any specific use-case? actually, excel support to open/load text files, you don’t need to output as csv format.
that’s simple command-line to toggle power modes. for example,
$ sudo /usr/sbin/nvpmodel -m <x>
Thank you for your answer.
- The logs i meant are the Jetsson’s parameters like memory usage/gpu load/gpu temp/etc. These logs are equivalent to tagrastats command which you can type and see these values.
In the Jettson’s GUI you can choose wether to record these logs as txt file or csv format. The adventage of the csv format is that these values are already parsed (values arranged in table and easy to manipulate) while in txt file you need to extract the values manually. That is why we prefare the csv format.
Our main goal is to calculate mean and plot grpahs for specific Jettson’s parameters (as i mentioned before) in a given time interval.
- Yes, we know power modes can be changed in linux CLI, the question is if its possible to change the power modes from python file.
you may running tegrastats utility by adding
--logfileoption to output logs as single text file.
this by default parse the usage within 1-sec, you may control
--intervaloptions to specify the interval between log prints.
why don’t you calling the same in python.
Is there a way to output the logs as csv format? as i mentioned before, the csv format makes manipulation of the values much easier compared to the text file.
you may simply process the data with
tr options, and saving the file as
here’s an example,
//to convert spaces as a comma
$ cat tegrastats.txt | tr -s ' ' ',' > tmp.txt
//to convert "%@" as a comma
$ cat tmp.txt | tr -s "%@" ',' > output.csv
output.csv to review the results, and you may add more process by your own.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.