版权声明:本文为博主原创文章,未经博主允许不得转载。转载请标注出处: https://blog.csdn.net/sheji105/article/details/82626173
在板子上执行命令:
- # ls -lh /sys/devices/system/cpu/
- total 0
- drwxr-xr-x 7 root root 0 Aug 15 00:00 cpu0
- drwxr-xr-x 5 root root 0 Aug 15 00:00 cpu1
- drwxr-xr-x 5 root root 0 Aug 15 00:00 cpu2
- drwxr-xr-x 5 root root 0 Aug 15 00:00 cpu3
- drwxr-xr-x 3 root root 0 Aug 15 00:00 cpufreq
- drwxr-xr-x 2 root root 0 Aug 15 00:08 cpuidle
- -r--r--r-- 1 root root 4.0K Aug 15 00:08 kernel_max
- -r--r--r-- 1 root root 4.0K Aug 15 00:08 offline
- -r--r--r-- 1 root root 4.0K Aug 15 00:00 online
- -r--r--r-- 1 root root 4.0K Aug 15 00:08 possible
- drwxr-xr-x 2 root root 0 Aug 15 00:08 power
- -r--r--r-- 1 root root 4.0K Aug 15 00:08 present
- -rw-r--r-- 1 root root 4.0K Aug 15 00:08 uevent
online:正在工作的cpu;
offline:目前被关掉的cpu;
present:已经安装的cpu
cpuxx:是目录,第几个cpu
- # ls -lh /sys/devices/system/cpu/cpu0/cpufreq/
- total 0
- -r--r--r-- 1 root root 4.0K Aug 15 00:18 affected_cpus
- -r-------- 1 root root 4.0K Aug 15 00:18 cpuinfo_cur_freq
- -r--r--r-- 1 root root 4.0K Aug 15 00:18 cpuinfo_max_freq
- -r--r--r-- 1 root root 4.0K Aug 15 00:18 cpuinfo_min_freq
- -r--r--r-- 1 root root 4.0K Aug 15 00:18 cpuinfo_transition_latency
- -r--r--r-- 1 root root 4.0K Aug 15 00:18 related_cpus
- -r--r--r-- 1 root root 4.0K Aug 15 00:00 scaling_available_frequencies
- -r--r--r-- 1 root root 4.0K Aug 15 00:18 scaling_available_governors
- -r--r--r-- 1 root root 4.0K Aug 15 00:18 scaling_cur_freq
- -r--r--r-- 1 root root 4.0K Aug 15 00:18 scaling_driver
- -rw-r--r-- 1 root root 4.0K Aug 15 00:00 scaling_governor
- -rw-r--r-- 1 root root 4.0K Aug 15 00:18 scaling_max_freq
- -rw-r--r-- 1 root root 4.0K Aug 15 00:00 scaling_min_freq
- -rw-r--r-- 1 root root 4.0K Aug 15 00:18 scaling_setspeed
- drwxr-xr-x 2 root root 0 Aug 15 00:18 stats
cpuinfo_cur_freq scaling_cur_freq:当前频率
cpuinfo_max_freq scaling_ max _freq:最大频率
cpuinfo_min_freq scaling_ min _freq:最小频率
前缀cpuinfo:cpu硬件上支持的频率;
前缀scaling:软件方式通过CPUFreq系统进行调节时所支持的频率
# cat scaling_available_frequencies
200000 400000 533333 800000 998400 1094400 1190400 1248000 1267200
scaling_available_frequencies:支持的频率