I have the same question. How we can calculate CPU usage per cores?
In this link there was the equation to calculate that in general…
https://www.eukhost.com/forums/forum/general/technology-forum/22321-what-is-cpu-utilization-and-how-can-it-be-calculated
But in L4T or more specific on Jetson TX2 which file and which params are needed? Appreciate for any guide to this. Milad
Here is my strace for tegrastat
strace tegrastats 2>&1 | grep open openat(AT_FDCWD, "/usr/local/cuda-10.2/lib64/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/local/cuda-10.2/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/local/cuda-10.2/lib64/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/local/cuda-10.2/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/include/tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/include/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/include/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/include/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "tls/aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "aarch64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/usr/local/cuda-10.2/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/include/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "tls/aarch64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "aarch64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/tmp/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/emc/rate", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/kernel/actmon_avg_activity/mc_all", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/class/devfreq/18000000.vgpu/cur_freq", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/kernel/tegra_gpu/gpu_rate", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/gpcclk/rate", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/devices/17000000.gp10b/load", O_RDONLY) = 3 openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvenc/state", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvenc1/state", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvenc/rate", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvenc1/rate", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvdec/state", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvdec1/state", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvdec/rate", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvdec1/rate", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvjpg/state", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/dev/nvbpmpdebugfs/bpmp_debug/clk/nvjpg/rate", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/devices/system/cpu/present", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq", O_RDONLY) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq", O_RDONLY) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq", O_RDONLY) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_cur_freq", O_RDONLY) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_cur_freq", O_RDONLY) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu5/cpufreq/cpuinfo_cur_freq", O_RDONLY) = -1 EACCES (Permission denied) openat(AT_FDCWD, "/sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/pci/drivers/nvgpu/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 openat(AT_FDCWD, "/sys/bus/pci/drivers/nvgpu/module/load", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/proc/meminfo", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone3/temp", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone3/type", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone1/temp", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone1/type", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone6/temp", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone6/type", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone4/temp", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone4/type", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone2/temp", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone2/type", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone0/temp", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone0/type", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone7/temp", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone7/type", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone5/temp", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone5/type", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/name", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/rail_name_1", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/in_power1_input", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/rail_name_2", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/in_power2_input", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/rail_name_0", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/in_power0_input", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/name", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/rail_name_1", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/in_power1_input", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/rail_name_2", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/in_power2_input", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/rail_name_0", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/in_power0_input", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/bus/i2c/devices/1-0040/name", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/bus/i2c/devices/1-0041/name", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/bus/i2c/devices/6-0040/name", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/bus/i2c/devices/7-0040/name", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/kernel/actmon_avg_activity/mc_all", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/17000000.gp10b/load", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/in_power0_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/in_power1_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/in_power2_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/in_power0_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/in_power1_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/in_power2_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone3/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone1/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone6/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone4/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone2/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone0/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone7/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone5/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu0/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu1/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu2/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu3/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu4/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu5/online", O_RDONLY) = 3 openat(AT_FDCWD, "/proc/stat", O_RDONLY) = 3 openat(AT_FDCWD, "/proc/meminfo", O_RDONLY) = 3 openat(AT_FDCWD, "/proc/buddyinfo", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/kernel/actmon_avg_activity/mc_all", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/17000000.gp10b/load", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/in_power0_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/in_power1_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0040/iio_device/in_power2_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/in_power0_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/in_power1_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/bus/i2c/devices/0-0041/iio_device/in_power2_input", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone3/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone1/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone6/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone4/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone2/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone0/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone7/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/virtual/thermal/thermal_zone5/temp", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu0/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu1/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu2/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu3/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu4/online", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/system/cpu/cpu5/online", O_RDONLY) = 3 openat(AT_FDCWD, "/proc/stat", O_RDONLY) = 3 openat(AT_FDCWD, "/proc/meminfo", O_RDONLY) = 3 openat(AT_FDCWD, "/proc/buddyinfo", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/kernel/actmon_avg_activity/mc_all", O_RDONLY) = 3 openat(AT_FDCWD, "/sys/devices/17000000.gp10b/load", O_RDONLY) = 3 ```