Skip to content

add MHz label for node_cpu_info #1713

@silenceshell

Description

@silenceshell

feature requests:

Our machines run on centos 7, and we close p-state to gain max performance. So on these machines, we cannot get node_cpu_frequency_hertz, as the freq module is not loaded.

# ls /sys/devices/system/cpu/cpu0
cache  crash_notes  crash_notes_size  driver  firmware_node  hotplug  microcode  node0  power  subsystem  thermal_throttle  topology  uevent
# lsmod|grep freq
#

We could get cpu info from node_cpu_info:

node_cpu_info{cachesize="15360 KB",core="0",cpu="0",endpoint="https",family="6",instance="1.1.1.1:9100",job="node-exporter",microcode="0x428",model="62",model_name="Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz",namespace="lambda",package="0",pod="node-exporter-2ntkr",service="node-exporter",stepping="4",vendor="GenuineIntel"}

However, as we run on performance mode, the cpu's frequency is actually 2999.970 (not 2.10GHZ):

# cat /proc/cpuinfo | grep 'MHz'
cpu MHz		: 2999.970

So, is it possible to add a label something like mhz to show the cpu's frequency?
I would like to implement this feature if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions