android常用设备节点

174 阅读2分钟

1. power

/sys/power/wake_lock

echo temporary > /sys/power/wake_lock  防止系统挂起,增加唤醒锁

echo temporary > /sys/power/wake_unlock  移除唤醒锁

2. cpu

cat /sys/devices/system/cpu/present 查看核心数量

 0-7  

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies // 查看cpu核心支持的频率

614400 768000 936000 1105000 1228800 1404000 1560000 1703000 1846000 2002000 2184000

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors // 查看cpu核心支持的调频模式

userspace conservative powersave performance schedutil

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  //查看当前核心最大频率

1105000

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  //查看当前核心最小频率

1105000

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_curr_freq  //查看当前核心实时频率

1105000

cat sys/devices/system/cpu/cpu0/online //查看当前核心是否在线

1   // 1表示打开,0表示关闭

cat /sys/class/thermal/thermal_zone0/temp // 查看cpu温度

32867  // 除以1000就是摄氏度

3. gpu

rk3568 cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/available_frequencies

800000000 700000000 600000000 400000000 300000000 200000000

cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/available_governors

dmc_ondemand venc_ondemand userspace powersave performance simple_ondemand

cat  /sys/devices/platform/fde60000.gpu/gpuinfo

Mali-G52 1 cores r1p0 0x7402

查看gpu频率:  cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/cur_freq

查看gpu 负载: cat /sys/devices/platform/fde60000.gpu/utilisation

查看gpu gover: cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/governor

设置gpu性能模式,最高频率: echo performance > /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/governor