Skip to content

grain cpu_family #58310

Closed
Closed

Description

@steverweber

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

Activity

  1. added
    Featurenew functionality including changes to functionality and code refactors, etc.
    on Aug 28, 2020
  2. waynew commented on Sep 3, 2020

    @waynew
    Contributor

    @steverweber I'm confused - are you talking about x86_64 vs arm64? Or something else? 🤔

  3. added this to the Blocked milestone on Sep 23, 2020
  4. steverweber commented on Sep 25, 2020

    @steverweber
    ContributorAuthor

    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.

    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
    
  5. modified the milestones: Blocked, Approved on Sep 25, 2020
  6. locked and limited conversation to collaborators on Oct 23, 2026
  7. converted this issue into a discussion #70481 on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featurenew functionality including changes to functionality and code refactors, etc.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions