cpudb

package module
v0.0.0-...-3f72e01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package cpudb provides a reference of CPU architectures and identification keys for known CPUS.

  • Copyright (C) 2023 Intel Corporation
  • SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPU

type CPU struct {
	Architecture string `yaml:"architecture"`
	Family       string `yaml:"family"`
	Model        string `yaml:"model"`
	Stepping     string `yaml:"stepping"`
	Channels     int    `yaml:"channels"`
	Threads      int    `yaml:"threads"`
}

type CPUDB

type CPUDB struct {
	// contains filtered or unexported fields
}

func NewCPUDB

func NewCPUDB() (CPUdb *CPUDB)

NewCPUDB initializes the CPUDB structure with the yaml and returns it

func (*CPUDB) GetCPU

func (c *CPUDB) GetCPU(family, model, stepping, capid4, sockets, devices string) (cpu CPU, err error)

GetCPU retrieves the CPU structure that matches the provided args capid4 needed to differentiate EMR MCC from EMR XCC

capid4: $ lspci -s $(lspci | grep 325b | awk 'NR==1{{print $1}}') -xxx |  awk '$1 ~ /^90/{{print $9 $8 $7 $6; exit}}'

sockets and devices (eventually devices per socket) needed to differentiate GNR X1/2/3

devices: $ lspci -d 8086:3258 | wc -l

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL