Open Davidnet opened 6 years ago
@martinkersner encountered the same error on TX2. Is there something that can be done about it? @Davidnet were you able to resolve the issue?
@ankitdhall tegrastats
output format apparently changed, parsing has to be done differently now. I don't have TX2 anymore, so I can't fix it.
@martinkersner The output on TX2 platform is shown below, hope it helps.
no privilege
RAM 2417/6660MB (lfb 620x4MB) cpu [0%@1996,0%@2035,0%@2035,0%@1996,0%@1996,0%@1996]
RAM 2417/6660MB (lfb 620x4MB) cpu [3%@1996,10%@2035,1%@2035,1%@1996,1%@1996,1%@1996]
RAM 2417/6660MB (lfb 620x4MB) cpu [1%@1996,0%@2035,0%@2035,2%@1996,3%@1996,2%@1996]
RAM 2417/6660MB (lfb 620x4MB) cpu [2%@1996,0%@2035,0%@2035,1%@1996,1%@1996,1%@1996]
RAM 2417/6660MB (lfb 620x4MB) cpu [1%@1996,34%@2035,9%@2035,1%@1996,3%@1996,12%@1996]
sudo privilege
RAM 2440/6660MB (lfb 620x4MB) cpu [0%@1994,0%@2035,0%@2035,0%@1993,0%@1992,0%@1996] EMC 0%@1600 GR3D 5%@1275 GR3D_PCI 0%@2607
RAM 2440/6660MB (lfb 620x4MB) cpu [1%@1998,19%@2035,11%@2035,2%@1997,1%@1997,2%@1996] EMC 0%@1600 GR3D 0%@1275 GR3D_PCI 0%@2607
RAM 2440/6660MB (lfb 620x4MB) cpu [0%@1996,0%@2034,0%@2034,1%@1997,2%@1996,1%@1996] EMC 0%@1600 GR3D 0%@1275 GR3D_PCI 0%@2606
RAM 2440/6660MB (lfb 620x4MB) cpu [0%@1997,0%@2034,0%@2035,1%@1996,1%@1996,2%@1997] EMC 0%@1600 GR3D 1%@1275 GR3D_PCI 0%@2606
RAM 2440/6660MB (lfb 620x4MB) cpu [4%@1996,28%@2036,17%@2034,1%@1995,8%@1998,2%@1997] EMC 0%@1600 GR3D 0%@1275 GR3D_PCI 0%@2606
Hi. I also using jetson TX2 and found the solution for this problem.
In my case the Error occurs at line 133 at gtop.cc
.
case TX2:
get_cpu_stats_tx2(ts, stats.at(5));
get_gpu_stats(ts, stats.at(13)); // this part causes the error!
break;
Since the output from the sudo ~/tegrastats
are like @jh01231230 shows, you'll see the 14th token doesn't exist in the token structure stats
.
For watching GPU usage properly, change the line 133 in gtop.cc
like below:
case TX2:
get_cpu_stats_tx2(ts, stats.at(5));
get_gpu_stats(ts, stats.at(11)); // changed this part
break;
I've created a pull request that fixes these issues. The problem is that we're trying to automatically identify the board type based on the argument structure. Now, you can specify on the command line, and it should work. Still needs testing on the TX1 and TK1.
@zlacelle Did you also include Jetson AGX support ?
I unfortunately do not have an AGX, so I did not.
I've created a PR for Xavier. I have some doubts w/ this :
if (stats.size() >= 15 && stats.size() <30) //Don't have TX* to test..
ts.version = TX1;
else if(stats.size() >=30)
ts.version = AGX;
else
ts.version = TX2;
I let You check. anyway it works well now.
For a minit device I had to change the fields in order to get it working. I think it is a NVIDIA AGX card, but the suggested settings of @MI-LA01 do not work for me.
I change the field numbers from 5,9 to 9 and 13: https://github.com/MI-LA01/gtop/compare/master...mdehollander:minit?expand=1
The output of tegrastats is:
RAM 1147/7855MB (lfb 12x4MB) SWAP 15/8192MB (cached 5MB) CPU [0%@806,0%@2035,0%@2037,0%@806,0%@806,0%@806] EMC_FREQ 17%@1866 GR3D_FREQ 98%@1300 APE 150 MTS fg 0% bg 0% BCPU@50C MCPU@50C GPU@52C PLL@50C Tboard@46C Tdiode@52.25C PMIC@100C thermal@50.8C VDD_IN 12943/12943 VDD_CPU 1440/1440 VDD_GPU 6000/6000 VDD_SOC 1259/1259 VDD_WIFI 343/343 VDD_DDR 2082/2082
I compiled gtop for jetson tx2 and I'm getting this output: