You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The architecture family of a cpu would be helpful to have in grains. This would make it more simple when installing packages that are architecture family related.
My previous workaround was looking at the cpu_flags.
On many Linux systems you can cat /sys/devices/cpu/caps/pmu_name I'm not sure about other kernels
CPUs often have 'family' or microarchitecture names. After some testing it seems that the file is not always reliable.
root@jupyter-p03:~# salt-call grains.get cpu_model
local:
AMD EPYC 7702P 64-Core Processor
root@jupyter-p03:~# cat /sys/devices/cpu/caps/pmu_name
cat: /sys/devices/cpu/caps/pmu_name: No such file or directory
** I assume newer kernels will have this output `zen2`
root@jupyter-p03:~# gcc -march=native -Q --help=target|grep march
-march= znver2
Some Intel CPUs
salt cpu\* cmd.run 'cat /sys/devices/cpu/caps/pmu_name'
cpu145:
broadwell
cpu150:
skylake
cpu21:
sandybridge
Activity
waynew commentedon Sep 3, 2020
@steverweber I'm confused - are you talking about x86_64 vs arm64? Or something else? 🤔
steverweber commentedon Sep 25, 2020
Something else
more info: https://unix.stackexchange.com/questions/230634/how-to-find-out-intel-architecture-family-from-command-line
CPUs often have 'family' or microarchitecture names. After some testing it seems that the file is not always reliable.