Saya ingin menunjukkan sudo
diperlukan jawaban Ian di atas:
sudo cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
Namun Anda bisa mendapatkan hasil yang sama tanpa sudo menggunakan:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
Favorit saya adalah menggunakan Conky tempat Anda bisa melukis gambar Anda sendiri:
Ini duduk di sebelah kanan layar bawaan saya sepanjang waktu. Kode yang relevan untuk bagian CPU adalah:
${color2}${voffset 5}Intel® i-7 3630QM 3.4 GHz: ${color1}@ ${color green}${freq} MHz
${color}${goto 13}CPU 1 ${goto 81}${color green}${cpu cpu1}% ${goto 131}${color3}${cpubar cpu1 18}
${color}${goto 13}CPU 2 ${goto 81}${color green}${cpu cpu2}% ${goto 131}${color3}${cpubar cpu2 18}
${color}${goto 13}CPU 3 ${goto 81}${color green}${cpu cpu3}% ${goto 131}${color3}${cpubar cpu3 18}
${color}${goto 13}CPU 4 ${goto 81}${color green}${cpu cpu4}% ${goto 131}${color3}${cpubar cpu4 18}
${color}${goto 13}CPU 5 ${goto 81}${color green}${cpu cpu5}% ${goto 131}${color3}${cpubar cpu5 18}
${color}${goto 13}CPU 6 ${goto 81}${color green}${cpu cpu6}% ${goto 131}${color3}${cpubar cpu6 18}
${color}${goto 13}CPU 7 ${goto 81}${color green}${cpu cpu7}% ${goto 131}${color3}${cpubar cpu7 18}
${color}${goto 13}CPU 8 ${goto 81}${color green}${cpu cpu8}% ${goto 131}${color3}${cpubar cpu8 18}
${color1}All CPU ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 2 temp 1}°C ${goto 250}${color1}Up: ${color green}$uptime