How to know the T30 process speed

Hi,

How to know the T30 processor speed from the Linux shell?
I tried to check the T30 processor speed from the Linux shell through below command:

root@apalis-t30:~# lscpu | grep MHz                                                                                                                              
-sh: lscpu: command not found
root@apalis-t30:~# 

I also tried to get the info through cpuinfo directory but not getting the exact details:

root@apalis-t30:~# cat /proc/cpuinfo 
Processor       : ARMv7 Processor rev 9 (v7l)
processor       : 0
BogoMIPS        : 1196.85
processor       : 1
BogoMIPS        : 1196.85
processor       : 2
BogoMIPS        : 1196.85
processor       : 3
BogoMIPS        : 1196.85
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xc09
CPU revision    : 9
Hardware        : Toradex Apalis T30
Revision        : 011a
Serial          : 0000000002711847
root@apalis-t30:~#

Hi @deepak.singh

You should be able to read the CPU speed from the sysfs as follows (in kHz):

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

Regards,
Stefan

Hi deepak

If you want to know the current processor speed, then you use the command cpufreq-info. The usage of the command is explained here.

Best regards, Jaski

Hi Jaski/Stefan,

Thank you for the response. No i can see CPU speed.

root@apalis-t30:~# cpufreq-info

cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009

Report errors and bugs to cpufreq@vger.kernel.org, please

analyzing CPU 0:

driver: tegra

CPUs which run at the same hardware frequency: 0 1 2 3

CPUs which need to have their frequency coordinated by software: 0

maximum transition latency: 300 us.

hardware limits: 51.0 MHz - 1.40 GHz

available frequency steps: 51.0 MHz, 102 MHz, 204 MHz, 370 MHz, 475 MHz, 620 MHz, 760 MHz, 860 MHz, 1000 MHz, 1.10 GHz, 1.20 GHz, 1.30 GHz, 1.40 GHz

available cpufreq governors: conservative, userspace, powersave, ondemand, performance

current policy: frequency should be within 204 MHz and 1.40 GHz.

              The governor "ondemand" may decide which speed to use
              within this range.

current CPU frequency is 475 MHz (asserted by call to hardware).

cpufreq stats: 51.0 MHz:0.00%, 102 MHz:0.00%, 204 MHz:0.00%, 370 MHz:0.00%, 475

MHz:80.38%, 620 MHz:0.12%, 760 MHz:0.00%, 860 MHz:0.12%, 1000 MHz:0.12%, 1.10
GHz:0.00)

analyzing CPU 1:
no or unknown cpufreq driver is active on this CPU
analyzing CPU 2:
no or unknown cpufreq driver is active on this CPU
analyzing CPU 3:
no or unknown cpufreq driver is active on this CPU
root@apalis-t30:~#

root@apalis-t30:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

475000
root@apalis-t30:~#

In this case “ondemand” governor policy is set, so it may change based on the load?

Dear @deepak.singh

Exactly “ondemand” means that the cpu clock depends on the CPU load. There are other governors as well (e.g. performance). They use different strategies on when to increase the frequency. Normally ondemand works just fine.

You can find all available governors with the following command:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
# changing the governor to performance
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Regards,
Stefan

Hi Stefan,

Thank you for the detailed info.

You are welcome.

Best regards, Jaski