tegrastats visualization

Hi,

I created tool for visualizing tegrastats information called gtop that helps with understanding of your system workload. gtop was tested on TX1 board, but should work even on TX2 and with minor modifications on TK1 as well.

https://github.com/martinkersner/gtop

I hope gtop will be useful for local community.

Martin

hello martinkersner,

good job! i’ve try this on JetsonTX2 and it works.

there are suggestions from my side to make it more complete,

  1. do you plan to draw usage chart? history information would be helpful for performance analysis.
  2. i notice that you did not show offline CPU status, since JetsonTX2 has 6 CPUs. either show offline CPUs or correct the monitor CPU id. (the chart above should be cpu 0,3,4,5)

Hi Jerry,

  1. Usage chart seems like a great idea. I will try to work on it.
  2. I modified code and now all CPUs are displayed.

Martin

Hi Martin,

I am currently trying to write a cpu governor in Jetson Tegra k1 for performing DVFS.
I am planning to run some applications and analyse the performance using the tegrastats.
Your visualization tool looks cool.
I would like to use it. I saw the code in github and figured that the “get_cpu_stats_tk1” needs to be written.
Can you please include support for tk1 or direct me on how to write it.

Thanks,
Chandirasekarendiran

Hi Chandirasekarendiran,

Can you send me example output from tegrastats running on your TK1 board?

Martin

Hi Martin,

Sorry for the delayed response.

The output of tegrastats:

RAM 906/1746MB (lfb 1x4MB) cpu [17%,off,off,off]@-1 VDE 0 EDP limit 0

Thanks and Regards,
Chandirasekarendiran Anandan

Sorry, the previous output was without being as superuser:

This is the correct output:
RAM 714/1746MB (lfb 94x4MB) cpu [0%,0%,off,off]@2320 EMC 18%@204 AVP 0%@81 VDE 120 GR3D 55%@72 EDP limit 2320

Chandirasekarendiran,

Try checkout tk1 branch at https://github.com/martinkersner/gtop.

Martin

Hi Martin and all,

Could you please help me in here, I am trying to use your tool to see the GUI of CPU and GPU of Tegra TX1. It is running on the Ubuntu 14.04.

https://github.com/martinkersner/gtop.

After following the instructions from the github, I am getting the following error.

root@tegra-ubuntu:~/gstop/gtop-master# ./gtop
terminate called after throwing an instance of ‘std::out_of_range’
what(): vector::_M_range_check
Aborted

Thanks!

You may have to increase STATS_BUFFER_SIZE in file gtop.hh, for example:

const int STATS_BUFFER_SIZE = 512;

You may check https://github.com/martinkersner/gtop/issues/1.

Hi Martin and all,

I am also getting some warning during the compilation.

root@tegra-ubuntu:~/gstop/gtop-master# make
g++ -std=c++11 gtop.cc utils.cc display.cc -o gtop -pedantic -Wall -Wextra -lncurses -lpthread
gtop.cc:192:6: warning: unused parameter ‘d’ [-Wunused-parameter]
void display_stats(const dimensions & d, const tegrastats & ts) {

Could you please help me to figure out this problem.

Thanks!

Hi Honey_Patouceul,

Thanks! I am still getting the same problem like before
even though I increase the

const int STATS_BUFFER_SIZE = 512;

Thanks!

Hi Martin and all,

This is the output I get it from the ~/tegrastats

RAM 748/3854MB (lfb 676x4MB) SWAP 0/0MB (cached 0MB) cpu [14%,43%,11%,12%]@1912 EMC 24%@1600 AVP 82%@13 VDE 0 GR3D 52%@998 EDP limit 1912
RAM 748/3854MB (lfb 676x4MB) SWAP 0/0MB (cached 0MB) cpu [25%,40%,9%,6%]@1912 EMC 19%@1600 AVP 70%@12 VDE 0 GR3D 51%@921 EDP limit 1912
RAM 748/3854MB (lfb 676x4MB) SWAP 0/0MB (cached 0MB) cpu [71%,26%,32%,20%]@1912 EMC 23%@1600 AVP 41%@12 VDE 0 GR3D 83%@921 EDP limit 1912
RAM 748/3854MB (lfb 676x4MB) SWAP 0/0MB (cached 0MB) cpu [96%,27%,38%,30%]@1912 EMC 26%@1600 AVP 13%@12 VDE 0 GR3D 51%@921 EDP limit 1912

Should I change something in the

get_gpu_stats(ts, stats.at(13));

As it is mentioned in the thread

You may check

Thanks!

I got this error message when “sudo ./gtop”

terminate called after throwing an instance of ‘std::invalid_argument’
what(): stoi
Aborted (core dumped)

Any idea about this?

As written above, you may check https://github.com/martinkersner/gtop/issues/1. There is a gtop version that should work R28.1 on TX2 and another one for TX2/R28.2 and TX1/R28.1.

Everything works for me with gtop.cc.txt and STATS_BUFFER_SIZE = 1024 on Jetson TX2/R28.2.

Hi,

Could anyone please tell me how to get GUI of TX2 CPU stats
I am now using the TX2 with 3.2 Jetpack, could you please tell me how to use this gtop.

This is my output from tegrastats
RAM 2605/7846MB (lfb 691x4MB) CPU [0%@1267,0%@345,0%@345,0%@1267,0%@1267,0%@1266] EMC_FREQ 3%@665 GR3D_FREQ 4%@140 APE 150 MTS fg 4% bg 17% BCPU@40C MCPU@40C GPU@39C PLL@40C Tboard@37C Tdiode@38C PMIC@100C thermal@39.7C VDD_IN 2255/2255 VDD_CPU 229/229 VDD_GPU 152/152 VDD_SOC 458/458 VDD_WIFI 0/0 VDD_DDR 347/347

I am getting some error when I use the $sudo ./gtop

Thanks!

Not sure what errors you see…You should post these.

In short, get the gtop sources from the above github.
Edit source file gtop.hh for changing to

const int STATS_BUFFER_SIZE = 1024;

Then replace file gtop.cc by the file from https://github.com/martinkersner/gtop/files/1737522/gtop.cc.txt(you would rename it removing the .txt extension).

Then build and try:

cd <where-you-download>/gtop-master
make
sudo ./gtop

This should work for recent L4T versions (R28.x).

Btw this fork works well in the TX2: https://github.com/zlacelle/gtop

Just add tx2 as an argument and run:

sudo ./gtop --tx2

Any support for AGX ?