常用命令
./cat_files.sh /sys/devices/system/cpu/cpu0/cpufreq
cat file: /sys/devices/system/cpu/cpu0/cpufreq/affected_cpus
0 1 2 3
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
600000
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
1500000
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
600000
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency
4294967295
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/related_cpus
0 1 2 3
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
600000 700000 800000 900000 1000000 1100000 1200000 1300000 1400000 1500000
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative ondemand userspace powersave performance schedutil
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
600000
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
cpufreq-dt
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1500000
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
600000
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
<unsupported>
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/stats/reset
cat: /sys/devices/system/cpu/cpu0/cpufreq/stats/reset: Permission denied
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
600000 248590
700000 8735
800000 1587
900000 689
1000000 337
1100000 0
1200000 0
1300000 0
1400000 0
1500000 25685
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/stats/total_trans
991
===================
cat file: /sys/devices/system/cpu/cpu0/cpufreq/stats/trans_table
From : To
: 600000 700000 800000 900000 1000000 1100000 1200000 1300000 1400000 1500000
600000: 0 299 67 18 21 0 0 0 0 20
700000: 305 0 20 9 5 0 0 0 0 11
800000: 63 22 0 7 1 0 0 0 0 8
900000: 14 10 9 0 1 0 0 0 0 5
1000000: 11 5 3 3 0 0 0 0 0 5
1100000: 0 0 0 0 0 0 0 0 0 0
1200000: 0 0 0 0 0 0 0 0 0 0
1300000: 0 0 0 0 0 0 0 0 0 0
1400000: 0 0 0 0 0 0 0 0 0 0
1500000: 31 14 2 2 0 0 0 0 0 0
===================
cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
600000
700000
700000
700000
ls -al /sys/devices/platform/
total 0
drwxr-xr-x 26 root root 0 Sep 13 2022 .
drwxr-xr-x 10 root root 0 Sep 13 2022 ..
drwxr-xr-x 4 root root 0 Jun 10 10:30 3ef62cc0.nvram
drwxr-xr-x 3 root root 0 Jun 10 10:30 arm-pmu
drwxr-xr-x 4 root root 0 Jun 10 10:30 cam1_regulator
drwxr-xr-x 4 root root 0 Jun 10 10:30 cam_dummy_reg
drwxr-xr-x 3 root root 0 Jun 10 10:30 chosen
drwxr-xr-x 3 root root 0 Jun 10 10:30 cpufreq-dt
drwxr-xr-x 4 root root 0 Sep 13 2022 emmc2bus
drwxr-xr-x 4 root root 0 Jun 10 10:30 'Fixed MDIO bus.0'
drwxr-xr-x 4 root root 0 Jun 10 10:30 fixedregulator_3v3
drwxr-xr-x 4 root root 0 Jun 10 10:30 fixedregulator_5v0
drwxr-xr-x 5 root root 0 Jun 10 10:30 gpu
drwxr-xr-x 3 root root 0 Jun 10 10:30 kgdboc
drwxr-xr-x 4 root root 0 Jun 10 10:30 leds
drwxr-xr-x 3 root root 0 Jun 10 10:30 phy
drwxr-xr-x 2 root root 0 Jun 10 11:01 power
drwxr-xr-x 4 root root 0 Jun 10 10:30 reg-dummy
drwxr-xr-x 3 root root 0 Jun 10 10:30 regulatory.0
drwxr-xr-x 7 root root 0 Jun 10 10:30 scb
drwxr-xr-x 4 root root 0 Jun 10 10:30 sd_io_1v8_reg
drwxr-xr-x 4 root root 0 Jun 10 10:30 sd_vcc_reg
drwxr-xr-x 3 root root 0 Jun 10 10:30 snd-soc-dummy
drwxr-xr-x 34 root root 0 Jun 10 10:30 soc
drwxr-xr-x 3 root root 0 Jun 10 10:30 timer
-rw-r--r-- 1 root root 4096 Jun 10 10:30 uevent
drwxr-xr-x 4 root root 0 Jun 10 10:30 v3dbus
nisy@raspberrypi:~ $
thermal
nisy@raspberrypi:/sys/devices/virtual $ ls -al /sys/devices/virtual/thermal/
total 0
drwxr-xr-x 3 root root 0 Jun 10 10:30 .
drwxr-xr-x 20 root root 0 Sep 13 2022 ..
drwxr-xr-x 4 root root 0 Jun 10 10:30 thermal_zone0
nisy@raspberrypi:/sys/devices/virtual/thermal $ ls -al /sys/devices/virtual/thermal/thermal_zone0/
total 0
drwxr-xr-x 4 root root 0 Jun 10 10:30 .
drwxr-xr-x 3 root root 0 Jun 10 10:30 ..
-r--r--r-- 1 root root 4096 Jun 10 10:47 available_policies
drwxr-xr-x 3 root root 0 Jun 10 10:30 hwmon0
-rw-r--r-- 1 root root 4096 Jun 10 10:47 integral_cutoff
-rw-r--r-- 1 root root 4096 Jun 10 10:47 k_d
-rw-r--r-- 1 root root 4096 Jun 10 10:47 k_i
-rw-r--r-- 1 root root 4096 Jun 10 10:47 k_po
-rw-r--r-- 1 root root 4096 Jun 10 10:47 k_pu
-rw-r--r-- 1 root root 4096 Jun 10 10:47 mode
-rw-r--r-- 1 root root 4096 Jun 10 10:47 offset
-rw-r--r-- 1 root root 4096 Jun 10 10:47 policy
drwxr-xr-x 2 root root 0 Jun 10 10:47 power
-rw-r--r-- 1 root root 4096 Jun 10 10:47 slope
lrwxrwxrwx 1 root root 0 Jun 10 10:30 subsystem -> ../../../../class/thermal
-rw-r--r-- 1 root root 4096 Jun 10 10:47 sustainable_power
-r--r--r-- 1 root root 4096 Jun 10 10:47 temp
-rw-r--r-- 1 root root 4096 Jun 10 10:47 trip_point_0_hyst
-r--r--r-- 1 root root 4096 Jun 10 10:47 trip_point_0_temp
-r--r--r-- 1 root root 4096 Jun 10 10:47 trip_point_0_type
-r--r--r-- 1 root root 4096 Jun 10 10:47 type
-rw-r--r-- 1 root root 4096 Jun 10 10:30 uevent
$ ./cat_files.sh /sys/devices/virtual/thermal
cat file: /sys/devices/virtual/thermal/thermal_zone0/available_policies
step_wise
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/name
cpu_thermal
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/power/autosuspend_delay_ms
cat: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/power/autosuspend_delay_ms: Input/output error
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/power/control
auto
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/power/runtime_active_time
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/power/runtime_status
unsupported
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/power/runtime_suspended_time
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp1_crit
110000
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp1_input
44303
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/uevent
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/integral_cutoff
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/k_d
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/k_i
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/k_po
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/k_pu
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/mode
enabled
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/offset
410040
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/policy
step_wise
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/power/autosuspend_delay_ms
cat: /sys/devices/virtual/thermal/thermal_zone0/power/autosuspend_delay_ms: Input/output error
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/power/control
auto
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/power/runtime_active_time
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/power/runtime_status
unsupported
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/power/runtime_suspended_time
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/slope
-487
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/sustainable_power
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/temp
43816
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_hyst
0
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_temp
110000
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_type
critical
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/type
cpu-thermal
===================
cat file: /sys/devices/virtual/thermal/thermal_zone0/uevent
===================