CPU feature identification for Go

Related tags

Utilities cpuid
Overview

cpuid

Package cpuid provides information about the CPU running the current program.

CPU features are detected on startup, and kept for fast access through the life of the application. Currently x86 / x64 (AMD64/i386) and ARM (ARM64) is supported, and no external C (cgo) code is used, which should make the library very easy to use.

You can access the CPU information by accessing the shared CPU variable of the cpuid library.

Package home: https://github.com/klauspost/cpuid

PkgGoDev Build Status

installing

go get -u github.com/klauspost/cpuid/v2 using modules.

Drop v2 for others.

example

package main

import (
	"fmt"
	"strings"

	. "github.com/klauspost/cpuid/v2"
)

func main() {
	// Print basic CPU information:
	fmt.Println("Name:", CPU.BrandName)
	fmt.Println("PhysicalCores:", CPU.PhysicalCores)
	fmt.Println("ThreadsPerCore:", CPU.ThreadsPerCore)
	fmt.Println("LogicalCores:", CPU.LogicalCores)
	fmt.Println("Family", CPU.Family, "Model:", CPU.Model, "Vendor ID:", CPU.VendorID)
	fmt.Println("Features:", fmt.Sprintf(strings.Join(CPU.FeatureSet(), ",")))
	fmt.Println("Cacheline bytes:", CPU.CacheLine)
	fmt.Println("L1 Data Cache:", CPU.Cache.L1D, "bytes")
	fmt.Println("L1 Instruction Cache:", CPU.Cache.L1D, "bytes")
	fmt.Println("L2 Cache:", CPU.Cache.L2, "bytes")
	fmt.Println("L3 Cache:", CPU.Cache.L3, "bytes")
	fmt.Println("Frequency", CPU.Hz, "hz")

	// Test if we have these specific features:
	if CPU.Supports(SSE, SSE2) {
		fmt.Println("We have Streaming SIMD 2 Extensions")
	}
}

Sample output:

>go run main.go
Name: AMD Ryzen 9 3950X 16-Core Processor
PhysicalCores: 16
ThreadsPerCore: 2
LogicalCores: 32
Family 23 Model: 113 Vendor ID: AMD
Features: ADX,AESNI,AVX,AVX2,BMI1,BMI2,CLMUL,CMOV,CX16,F16C,FMA3,HTT,HYPERVISOR,LZCNT,MMX,MMXEXT,NX,POPCNT,RDRAND,RDSEED,RDTSCP,SHA,SSE,SSE2,SSE3,SSE4,SSE42,SSE4A,SSSE3
Cacheline bytes: 64
L1 Data Cache: 32768 bytes
L1 Instruction Cache: 32768 bytes
L2 Cache: 524288 bytes
L3 Cache: 16777216 bytes
Frequency 0 hz
We have Streaming SIMD 2 Extensions

usage

The cpuid.CPU provides access to CPU features. Use cpuid.CPU.Supports() to check for CPU features. A faster cpuid.CPU.Has() is provided which will usually be inlined by the gc compiler.

Note that for some cpu/os combinations some features will not be detected. amd64 has rather good support and should work reliably on all platforms.

Note that hypervisors may not pass through all CPU features.

arm64 feature detection

Not all operating systems provide ARM features directly and there is no safe way to do so for the rest.

Currently arm64/linux and arm64/freebsd should be quite reliable. arm64/darwin adds features expected from the M1 processor, but a lot remains undetected.

A DetectARM() can be used if you are able to control your deployment, it will detect CPU features, but may crash if the OS doesn't intercept the calls. A -cpu.arm flag for detecting unsafe ARM features can be added. See below.

Note that currently only features are detected on ARM, no additional information is currently available.

flags

It is possible to add flags that affects cpu detection.

For this the Flags() command is provided.

This must be called before flag.Parse() AND after the flags have been parsed Detect() must be called.

This means that any detection used in init() functions will not contain these flags.

Example:

package main

import (
	"flag"
	"fmt"
	"strings"

	"github.com/klauspost/cpuid/v2"
)

func main() {
	cpuid.Flags()
	flag.Parse()
	cpuid.Detect()

	// Test if we have these specific features:
	if cpuid.CPU.Supports(cpuid.SSE, cpuid.SSE2) {
		fmt.Println("We have Streaming SIMD 2 Extensions")
	}
}

license

This code is published under an MIT license. See LICENSE file for more information.

Comments
  • Possible SCE check issue

    Possible SCE check issue

    Reference code:

    https://github.com/klauspost/cpuid/blob/master/cpuid.go#L996

    According to the System V Application Binary Interface - AMD64 Architecture Processor Supplement, section 3.1.1:

    Any program can expect that an AMD64 processor implements the baseline features mentioned in table 3.1. Most feature names correspond to CPUID bits, as described in the processor manual. Exceptions are OSFXSR and SCE, which are controlled by bits in the %cr4 register and the IA32_EFER MSR.

    I understand that the presence of SCE must be checked using the MSR register

    (You can generate the PDF mentioned above from https://gitlab.com/x86-psABIs/x86-64-ABI)

    opened by fpelliccioni 13
  • v2.0.1 output on raspberry pi 4 / ubuntu 20 arm64

    v2.0.1 output on raspberry pi 4 / ubuntu 20 arm64

    Build the example program on:

    lsb_release:

    Distributor ID: Ubuntu Description: Ubuntu 20.04.1 LTS Release: 20.04 Codename: focal

    uname -a:

    Linux pi64 5.4.0-1023-raspi #26-Ubuntu SMP PREEMPT Thu Nov 12 14:58:33 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

    From /proc/cpuinfo: ... Hardware : BCM2835 Revision : c03111 Serial : 1000000033c9f617 Model : Raspberry Pi 4 Model B Rev 1.1

    Output:

    [email protected]:~/Sync/cpuid$ ./cpuid Name: PhysicalCores: 0 ThreadsPerCore: 1 LogicalCores: 0 Family 0 Model: 0 Vendor ID: VendorUnknown Features: ARMCPUID,ASIMD,CRC32,EVTSTRM,FP Cacheline bytes: 64 L1 Data Cache: -1 bytes L1 Instruction Cache: -1 bytes L2 Cache: -1 bytes L3 Cache: -1 bytes Frequency 0 hz

    opened by gounselor 12
  • Incorrect detection of ThreadsPerCore

    Incorrect detection of ThreadsPerCore

    Library incorrectly detects ThreadsPerCore count, so PhysicalCore value is also wrong:

    Name: Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz PhysicalCores: 1 ThreadsPerCore: 16 LogicalCores: 16 Family 6 Model: 45

    opened by max2k1 12
  • CPUID and NFD support: AVX_VNNI

    CPUID and NFD support: AVX_VNNI

    Hi NFD Team,

    I have ADL CPU, but i not have AVX_VNNI in label list. I have v0.11.0 image and this issue is observed.

    This ticket is imported from NFD project. https://github.com/kubernetes-sigs/node-feature-discovery/issues/844

    { "beta.kubernetes.io/arch": "amd64", "beta.kubernetes.io/os": "linux", "feature.node.kubernetes.io/cpu-cpuid.ADX": "true", "feature.node.kubernetes.io/cpu-cpuid.AESNI": "true", "feature.node.kubernetes.io/cpu-cpuid.AVX": "true", "feature.node.kubernetes.io/cpu-cpuid.AVX2": "true", "feature.node.kubernetes.io/cpu-cpuid.CETIBT": "true", "feature.node.kubernetes.io/cpu-cpuid.CETSS": "true", "feature.node.kubernetes.io/cpu-cpuid.CMPXCHG8": "true", "feature.node.kubernetes.io/cpu-cpuid.FMA3": "true", "feature.node.kubernetes.io/cpu-cpuid.FXSR": "true", "feature.node.kubernetes.io/cpu-cpuid.FXSROPT": "true", "feature.node.kubernetes.io/cpu-cpuid.IBPB": "true", "feature.node.kubernetes.io/cpu-cpuid.LAHF": "true", "feature.node.kubernetes.io/cpu-cpuid.MOVBE": "true", "feature.node.kubernetes.io/cpu-cpuid.MOVDIR64B": "true", "feature.node.kubernetes.io/cpu-cpuid.MOVDIRI": "true", "feature.node.kubernetes.io/cpu-cpuid.OSXSAVE": "true", "feature.node.kubernetes.io/cpu-cpuid.SCE": "true", "feature.node.kubernetes.io/cpu-cpuid.SERIALIZE": "true", "feature.node.kubernetes.io/cpu-cpuid.SHA": "true", "feature.node.kubernetes.io/cpu-cpuid.STIBP": "true", "feature.node.kubernetes.io/cpu-cpuid.VMX": "true", "feature.node.kubernetes.io/cpu-cpuid.WAITPKG": "true", "feature.node.kubernetes.io/cpu-cpuid.X87": "true", "feature.node.kubernetes.io/cpu-cpuid.XSAVE": "true", "feature.node.kubernetes.io/cpu-hardware_multithreading": "true", "feature.node.kubernetes.io/cpu-model.family": "6", "feature.node.kubernetes.io/cpu-model.id": "154", "feature.node.kubernetes.io/cpu-model.vendor_id": "Intel", "feature.node.kubernetes.io/cpu-pstate.scaling_governor": "powersave", "feature.node.kubernetes.io/cpu-pstate.status": "active", "feature.node.kubernetes.io/cpu-pstate.turbo": "true", "feature.node.kubernetes.io/cpu-rdt.RDTL2CA": "true", "feature.node.kubernetes.io/kernel-config.NO_HZ": "true", "feature.node.kubernetes.io/kernel-config.NO_HZ_IDLE": "true", "feature.node.kubernetes.io/kernel-version.full": "5.15.0-40-generic", "feature.node.kubernetes.io/kernel-version.major": "5", "feature.node.kubernetes.io/kernel-version.minor": "15", "feature.node.kubernetes.io/kernel-version.revision": "0", "feature.node.kubernetes.io/pci-0300_8086.present": "true", "feature.node.kubernetes.io/pci-0300_8086.sriov.capable": "true", "feature.node.kubernetes.io/storage-nonrotationaldisk": "true", "feature.node.kubernetes.io/system-os_release.ID": "ubuntu", "feature.node.kubernetes.io/system-os_release.VERSION_ID": "22.04", "feature.node.kubernetes.io/system-os_release.VERSION_ID.major": "22", "feature.node.kubernetes.io/system-os_release.VERSION_ID.minor": "04", "gpu.intel.com/cards": "card0", "kubernetes.io/arch": "amd64", "kubernetes.io/hostname": "10.10.10.10", "kubernetes.io/os": "linux", "node-role.kubernetes.io/worker": "true" }

    cpuid -1 | grep AVX-VNNI AVX-VNNI: AVX VNNI neural network instrs = true This CPU feature is not implemented in NFD?

    BR, Ionut Nechita ionutnechita

    opened by ionutnechita 9
  • Process hangs for an hour on init

    Process hangs for an hour on init

    Found this as it affects minio, which uses cpuid, but it is easily reproducible just using the example program. Running that example program on my machine hangs for about an hour, then the program continues normally. Seems to be due to this for-loop which loops about 4 billion times on my machine.

    Here is my CPU spec (from /proc/cpuinfo) if it helps:

    processor	: 0
    vendor_id	: AuthenticAMD
    cpu family	: 25
    model		: 80
    model name	: AMD Ryzen 7 5700G with Radeon Graphics
    stepping	: 0
    microcode	: 0xa50000c
    cpu MHz		: 3792.874
    cache size	: 512 KB
    physical id	: 0
    siblings	: 4
    core id		: 0
    cpu cores	: 4
    apicid		: 0
    initial apicid	: 0
    fpu		: yes
    fpu_exception	: yes
    cpuid level	: 13
    wp		: yes
    flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cr8_legacy abm sse4a misalignsse 3dnowprefetch bpext ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr arat umip pku ospke vaes vpclmulqdq rdpid
    bugs		: sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
    bogomips	: 7585.74
    TLB size	: 2560 4K pages
    clflush size	: 64
    cache_alignment	: 64
    address sizes	: 48 bits physical, 48 bits virtual
    power management:
    
    processor	: 1
    vendor_id	: AuthenticAMD
    cpu family	: 25
    model		: 80
    model name	: AMD Ryzen 7 5700G with Radeon Graphics
    stepping	: 0
    microcode	: 0xa50000c
    cpu MHz		: 3792.874
    cache size	: 512 KB
    physical id	: 0
    siblings	: 4
    core id		: 2
    cpu cores	: 4
    apicid		: 2
    initial apicid	: 2
    fpu		: yes
    fpu_exception	: yes
    cpuid level	: 13
    wp		: yes
    flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cr8_legacy abm sse4a misalignsse 3dnowprefetch bpext ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr arat umip pku ospke vaes vpclmulqdq rdpid
    bugs		: sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
    bogomips	: 7608.95
    TLB size	: 2560 4K pages
    clflush size	: 64
    cache_alignment	: 64
    address sizes	: 48 bits physical, 48 bits virtual
    power management:
    
    processor	: 2
    vendor_id	: AuthenticAMD
    cpu family	: 25
    model		: 80
    model name	: AMD Ryzen 7 5700G with Radeon Graphics
    stepping	: 0
    microcode	: 0xa50000c
    cpu MHz		: 3792.874
    cache size	: 512 KB
    physical id	: 0
    siblings	: 4
    core id		: 4
    cpu cores	: 4
    apicid		: 4
    initial apicid	: 4
    fpu		: yes
    fpu_exception	: yes
    cpuid level	: 13
    wp		: yes
    flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cr8_legacy abm sse4a misalignsse 3dnowprefetch bpext ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr arat umip pku ospke vaes vpclmulqdq rdpid
    bugs		: sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
    bogomips	: 7618.22
    TLB size	: 2560 4K pages
    clflush size	: 64
    cache_alignment	: 64
    address sizes	: 48 bits physical, 48 bits virtual
    power management:
    
    processor	: 3
    vendor_id	: AuthenticAMD
    cpu family	: 25
    model		: 80
    model name	: AMD Ryzen 7 5700G with Radeon Graphics
    stepping	: 0
    microcode	: 0xa50000c
    cpu MHz		: 3792.874
    cache size	: 512 KB
    physical id	: 0
    siblings	: 4
    core id		: 6
    cpu cores	: 4
    apicid		: 6
    initial apicid	: 6
    fpu		: yes
    fpu_exception	: yes
    cpuid level	: 13
    wp		: yes
    flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cr8_legacy abm sse4a misalignsse 3dnowprefetch bpext ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr arat umip pku ospke vaes vpclmulqdq rdpid
    bugs		: sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
    bogomips	: 7608.25
    TLB size	: 2560 4K pages
    clflush size	: 64
    cache_alignment	: 64
    address sizes	: 48 bits physical, 48 bits virtual
    power management:
    
    
    opened by zacaway 9
  • Move x86 CPU features from Flags to a FlagSet

    Move x86 CPU features from Flags to a FlagSet

    This change deprecates CPU.Features due to a limitation of only 64 feature bits available when using Flags type (uint64).

    The new method introduces a FlagSet with flag names as map keys. The set values are empty structs which, in Go, consume zero bytes.

    The proposal is to start adding post-Icelake new features to FlagSet.

    The new model makes it possible to combine Arm Flags too (flagNames and flagNamesArm are no longer needed)

    TODO: more testing and discussion

    /cc @askervin

    opened by mythi 8
  • Report processors with slow AVX

    Report processors with slow AVX

    A number of processors support AVX but implement it by passing the vector though a 128 bit SSE ALU twice instead of using a 256 bit ALU. On these processors, AVX is thus not much faster than SSE. It would be great to have a feature flag that reports whether the current processor is afflicted by this problem. As far as I'm concerned, this affects the following processors, but I'm not super sure:

    • Intel Sandy Bridge, Ivy Bridge
    • AMD Jaguar/Puma
    • AMD “heavy equipment” processors
    • AMD Zen1
    opened by clausecker 7
  • Change ARM implementation (SIGILL: illegal instruction)

    Change ARM implementation (SIGILL: illegal instruction)

    @fwessels

    Looks like the only safe option is to use an OS call to get these features.

    Maybe the Go runtime can provide some help?

    https://github.com/golang/go/tree/master/src/internal/cpu

    And some in the runtime:

    https://github.com/golang/go/blob/8174f7fb2b64c221f7f80c9f7fd4d7eb317ac8bb/src/runtime/os_linux_arm64.go#L11

    ... though I haven't found where archauxv is actually called from.

    opened by klauspost 7
  • Detect CPUID flag 7 features (AVX512)

    Detect CPUID flag 7 features (AVX512)

    Detect features:

    • AVX512_VBMI2 (Vector Bit Manipulation Instructions, Version 2)
    • AVX512_VNNI* (Vector Neural Network Instructions)
    • AVX512_VPOPCNTDQ (Vector Population Count Doubleword and Quadword)
    • GFNI (Galois Field New Instructions)
    • VAES (Vector AES)
    • AVX512_BITALG (AVX-512 Bit Algorithms)
    • VPCLMULQDQ (Carry-Less Multiplication Quadword)
    • AVX512_BF16 (AVX-512 BFLOAT16 Instructions)
    • AVX512_VP2INTERSECT (AVX-512 Intersect for D/Q)
    • Renames AVX512VNNI to AVX512_VNNI to keep naming in sync with Linux kernel and Intel Architecture Programming Reference

    Signed-off-by: Mikko Ylinen [email protected] Signed-off-by: Antti Kervinen [email protected]

    opened by askervin 6
  • Looks at CPUID leaves it should not

    Looks at CPUID leaves it should not

    A few months ago, @fosslinux reported that this code package looped forever under Xen. This has since been fixed, but it turns out that this code does not check if TOPOEXT is exposed before using it. Feel free to close if this has since been fixed.

    opened by DemiMarie 5
  • I have one my Windows 10 Pro Physical Desktop Machine, still it's returning true for the call cpuid.CPU.VM()

    I have one my Windows 10 Pro Physical Desktop Machine, still it's returning true for the call cpuid.CPU.VM()

    For desktop, I have Windows 10 Pro as OS on my machine . but cpuid.CPU.VM() this call returning true for my Desktop machine. as it is desktop machine it should return true. attached sample screen shot for reference.

    image

    Attaching code sample as well. main.go.txt anyone help me on this.

    opened by bhavar12 5
Releases(v2.2.3)
Owner
Klaus Post
Klaus Post
Automatically set GOMAXPROCS to match Linux container CPU quota.

automaxprocs Automatically set GOMAXPROCS to match Linux container CPU quota. Installation go get -u go.uber.org/automaxprocs Quick Start import _ "go

Uber Go 2.4k Dec 29, 2022
gProfiler combines multiple sampling profilers to produce unified visualization of what your CPU

gProfiler combines multiple sampling profilers to produce unified visualization of what your CPU is spending time on, displaying stack traces of your processes across native programs1 (includes Golang), Java and Python runtimes, and kernel routines.

Granulate 598 Dec 27, 2022
Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Parca 2.8k Jan 2, 2023
MCsniperGO, a fast, efficient, and feature-packed minecraft name sniper.

MCsniperGO This project was made possible by my donators Usage This sniper is in it's beta stage, meaning bugs should be expected. Easy installation d

Kqzz 125 Dec 31, 2022
A Go library for the Linux Landlock sandboxing feature

Go Landlock library The Go Landlock library restricts the current processes' ability to use files, using Linux 5.13's Landlock feature. (Package docum

Landlock LSM 77 Dec 27, 2022
🚀 fgprof is a sampling Go profiler that allows you to analyze On-CPU as well as Off-CPU (e.g. I/O) time together.

?? fgprof - The Full Go Profiler fgprof is a sampling Go profiler that allows you to analyze On-CPU as well as Off-CPU (e.g. I/O) time together. Go's

Felix Geisendörfer 2.4k Dec 31, 2022
CPU usage percentage is the ratio of the total time the CPU was active, to the elapsed time of the clock on your wall.

Docker-Kubernetes-Container-CPU-Utilization Implementing CPU Load goroutine requires the user to call the goroutine from the main file. go CPULoadCalc

Ishank Jain 1 Dec 15, 2021
Cpu-profiling - Basic example of CPU Profiling in Golang which shows the bottlenecks and how much time is spent per function

cpu-profiling Basic example of CPU Profiling in Golang which shows the bottlenec

Felipe Azevedo 0 Aug 2, 2022
golang feature toggle library - a library to help make golang feature toggling clean and easy

toggle supports env_variable backed toggling. It can also be updated via a pubsub interface (tested w/ redis) 2 engines for toggle backing are include

John Calabrese 24 Mar 29, 2022
signature-based file format identification

Siegfried Siegfried is a signature-based file format identification tool, implementing: the National Archives UK's PRONOM file format signatures freed

Richard Lehane 170 Dec 15, 2022
revealit is a small binary that helps with the identification of dependencies and their categories

revealit is a small binary that helps with the identification of dependencies and their categories. When you start on a new project, it's always interesting to understand what people have been using.

Gustavo Freitas 4 Aug 29, 2022
🌀 Dismap - Asset discovery and identification tool

?? Dismap - Asset discovery and identification tool [English readme Click Me] Dismap 定位是一个资产发现和识别工具;其特色功能在于快速识别 Web 指纹信息,定位资产类型。辅助红队快速定位目标资产信息,辅助蓝队发现疑

之乎者也 1.4k Jan 3, 2023
Horusec is an open source tool that improves identification of vulnerabilities in your project with just one command.

Table of contents 1. About 2. Getting started 2.1. Requirements 2.2. Installation 3. Usage 3.1. CLI Usage 3.2. Using Docker 3.3. Older versions 3.4. U

ZUP IT INNOVATION 839 Jan 7, 2023
:chart_with_upwards_trend: Monitors Go MemStats + System stats such as Memory, Swap and CPU and sends via UDP anywhere you want for logging etc...

Package stats Package stats allows for gathering of statistics regarding your Go application and system it is running on and sent them via UDP to a se

Go Playgound 163 Nov 10, 2022
Automatically set GOMAXPROCS to match Linux container CPU quota.

automaxprocs Automatically set GOMAXPROCS to match Linux container CPU quota. Installation go get -u go.uber.org/automaxprocs Quick Start import _ "go

Uber Go 2.4k Dec 29, 2022
gProfiler combines multiple sampling profilers to produce unified visualization of what your CPU

gProfiler combines multiple sampling profilers to produce unified visualization of what your CPU is spending time on, displaying stack traces of your processes across native programs1 (includes Golang), Java and Python runtimes, and kernel routines.

Granulate 598 Dec 27, 2022
System resource usage profiler tool which regularly takes snapshots of the memory and CPU load of one or more running processes so as to dynamically build up a profile of their usage of system resources.

Vegeta is a system resource usage tracking tool built to regularly take snapshots of the memory and CPU load of one or more running processes, so as to dynamically build up a profile of their usage of system resources.

Kartik 8 Jan 16, 2022
Best-effort CPU-local sharded values for Go

percpu Percpu is a Go package to support best-effort CPU-local sharded values. This package is something of an experiment. See Go issue #18802 for dis

Caleb Spare 179 Nov 9, 2022
Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Parca 2.8k Jan 2, 2023
A simple CLI tool to help you manage your CPU

gocpu A simple cli tool to handle and watch your CPU. Usage Usage gocpu [subcommand] [flags] subcommand: watch - see the realtime cpu frequenc

Sarthak Pranesh 0 Nov 29, 2021