2

I need get CPU voltage and temperature from /sys/class/hwmon but need find the CPU ID to find the correct directory, by example:

$ ll /sys/class/hwmon/hwmon2/device
lrwxrwxrwx 1 root root 0 sep  3 13:05 /sys/class/hwmon/hwmon2/device -> ../../../0000:2f:00.0/

How to see what device is 0000:2f:00.0?, i find in /sys/devices/cpu but can not found the hardware id, lspci and lsusb can not show the CPU hardware.

The idea is get values without non native methods in Linux systems like as Ubuntu or Android.

Dave M
  • 4,494
e-info128
  • 183
  • 1
  • 11

2 Answers2

5

Some commands to get hardware(CPU) info(Some need addition package installation and some are dependent on OS type)

  1. sudo dmidecode -t 4 or sudo dmidecode --type processor
  2. cat /proc/cpuinfo
  3. lscpu
  4. cpuid
  5. sudo lshw -C CPU
  6. hwinfo --cpu
  7. nproc
  8. rdmsr
  9. lm_sensors
Tero Kilkanen
  • 38,887
asktyagi
  • 3,038
0

I found this thread by searching "embedded cpu name", so I post my solution here

dmesg | grep "Machine model"