Simple yet fancy CPU architecture fetching tool

Overview

GitHub tag (latest by date) GitHub Repo stars GitHub issues Packaging status License

Simple yet fancy CPU architecture fetching tool

 

cpu1

Table of contents

1. Support

cpufetch supports the following architectures:

  • x86 / x86_64
  • ARM
  • PowerPC
OS x86_64 / x86 ARM PowerPC Notes
GNU/Linux ✔️ ✔️ ✔️ Best support
Windows ✔️ Some information may be missing.
Colors will be used if supported
Android ✔️ Some information may be missing.
Not tested under x86_64
macOS ✔️ Some information may be missing.
Apple M1 support may be added
in the future (see #47)
FreeBSD ✔️ Some information may be missing.

2. Installation

2.1 Installing from a package

Choose the right package for your operating system:

Packaging status

If there is no available package for your OS, you can download the cpufetch binary from the releases page, or build cpufetch from source (see below).

2.2 Building from source (Linux/Windows/macOS)

You will need a C compiler (e.g, gcc), and make to compile cpufetch. To do so, just clone the repo and run make:

git clone https://github.com/Dr-Noob/cpufetch
cd cpufetch
make
./cpufetch

The Makefile is designed to work on Linux, Windows and macOS.

2.3 Android

  1. Install termux app (terminal emulator)
  2. Run pkg install -y git make clang inside termux.
  3. Build from source normally:

3. Examples

Here are more examples of how cpufetch looks on different CPUs.

3.1 x86_64 CPUs

cpu2

cpu3

3.2 ARM CPUs

cpu4

cpu5

4. Colors and style

By default, cpufetch will print the CPU art with the system colorscheme. However, you can always set a custom color scheme, either specifying Intel or AMD, or specifying the colors in RGB format:

./cpufetch --color intel (default color for Intel)
./cpufetch --color amd (default color for AMD)
./cpufetch --color 239,90,45:210,200,200:100,200,45:0,200,200 (example)

In the case of setting the colors using RGB, 4 colors must be given in with the format: [R,G,B:R,G,B:R,G,B:R,G,B]. These colors correspond to CPU art color (2 colors) and for the text colors (following 2). Thus, you can customize all the colors.

5. Implementation

See cpufetch programming documentation.

6. Bugs or improvements

See cpufetch contributing guidelines

7. Acknowledgements

Special thanks to Gonzalocl and OdnetninI. They tested cpufetch in its beginnings in many different CPUs they have access to, which made it easier to debug and check the correctness of cpufetch.

Special thanks too to the fellow contributors and interested people in the project!

Issues
  • Invalid L1i size: 96KB on AMD A6 CPU

    Invalid L1i size: 96KB on AMD A6 CPU

    When I type either cpufetch or cpufetch --debug the program segfaults with the same message

    Please, create a new issue with this error message and the output of 'cpufetch --debug' in https://github.com/Dr-Noob/cpufetch/issues
    zsh: segmentation fault (core dumped)  cpufetch --debug
    

    Here is the output of inxi -Fxz concerning system info and cpu

               base: Arch Linux
    Machine:   Type: Laptop System: LENOVO product: 81N3 v: Lenovo IdeaPad S145-15AST serial: <filter>
               Mobo: LENOVO model: LNVNB161216 v: SDK0R32866WIN serial: <filter> UEFI: LENOVO v: AYCN18WW date: 06/05/2019
    CPU:       Info: Dual Core model: AMD A6-9225 RADEON R4 5 COMPUTE CORES 2C+3G bits: 64 type: MCP arch: Excavator rev: 0
               L2 cache: 1024 KiB
               flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 10384
               Speed: 2595 MHz min/max: 1300/2600 MHz boost: enabled Core speeds (MHz): 1: 2595 2: 2595
    
    opened by Ex0dium 25
  • Support for PowerPC64 BE and LE

    Support for PowerPC64 BE and LE

    POWER8, POWER9 and soon POWER10 are quite popular in enterprise environment and IBM has been pushing the OpenPOWER initiatives which makes this platform more affordable for enthusiasts. Products such as Raptor Blackbird or Talos II are some examples. I think it would be great if this CPU is supported.

    I could grant you SSH access to my box if it helps

    enhancement 
    opened by runlevel5 22
  • gpufetch

    gpufetch

    For a future project, developing a cpufetch like tool for GPU could be interesting.

    For NVIDIA GPUs, I know that CUDA can give you any kind of details. For radeon and integrated GPUs (Intel, for example), I don't know how to approach it.

    enhancement 
    opened by Dr-Noob 18
  • cpufetch support for ARM macOS (Apple M1)

    cpufetch support for ARM macOS (Apple M1)

    Attempting to build on an ARM MacBook Pro shows the below result:

    $ make
    gcc -Wall -Wextra -Werror -pedantic -fstack-protector-all -pedantic -std=c99 -DARCH_ARM -Wno-unused-parameter -Wfloat-equal -Wshadow -Wpointer-arith src/common/main.c src/common/cpu.c src/common/udev.c src/common/printer.c src/common/args.c src/common/global.c src/arm/midr.c src/arm/uarch.c src/arm/soc.c src/arm/udev.c -o cpufetch
    src/arm/midr.c:7:10: fatal error: 'sys/auxv.h' file not found
    #include <sys/auxv.h>
             ^~~~~~~~~~~~
    1 error generated.
    make: *** [cpufetch] Error 1
    

    uname -a returns this:

    Darwin MacBook-Pro.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101 arm64
    
    enhancement 
    opened by Kyngo 17
  • add ${DESTDIR} variable to Makefile

    add ${DESTDIR} variable to Makefile

    add ${DESTDIR} variable to un/install target in Makefile. In order to follow the GNU coding standard : https://www.gnu.org/prep/standards/html_node/DESTDIR.html. I'm a Debian Contributor, I'm going to package this project to push to Debian.

    opened by ClayStan 15
  • CPU Unknown 12gen Intel

    CPU Unknown 12gen Intel

    cpufetch --debug

    `[ERROR]: Unknown microarchitecture detected: M=0x00000007 EM=0x00000009 F=0x00000006 EF=0x00000000 S=0x00000002 Please, create a new issue with this error message, the output of 'cpufetch' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues cpufetch v1.01 (Linux x86_64 build) 12th Gen Intel(R) Core(TM) i7-12700K

    • Max standard level: 0x00000020
    • Max extended level: 0x80000008
    • CPUID dump: 0x00090672 ` Screenshot from 2022-01-24 18-28-44
    bug 
    opened by rzwarts74 8
  • Allwinner ARM SoCs

    Allwinner ARM SoCs

    I wrote this but I'm not sure about the syntax, with: Name, Series, ENUM, soc, "technology"/"process" I only put SoC where the technology is known from the page in link. This is a wiki of people working on open source driver for AllWinner SoCs, mainly by reverse engineering.

    // https://linux-sunxi.org/Allwinner_SoC_Family
    bool match_allwinner(char* soc_name, struct system_on_chip* soc) {
      char* tmp;
    
      if((tmp = strstr(soc_name, "sunxi")) == NULL)
        return false;
    
      SOC_START
      // A series 32 bits
      SOC_EQ(tmp, "A10",   "sun4i",       SOC_ALLWINNER_A10,   soc, 55)
      SOC_EQ(tmp, "A13",   "sun5i",       SOC_ALLWINNER_A13,   soc, 55)
      SOC_EQ(tmp, "A10s",  "sun5i",       SOC_ALLWINNER_A10S,  soc, 55)
      SOC_EQ(tmp, "A20",   "sun7i",       SOC_ALLWINNER_A20,   soc, 40)
      SOC_EQ(tmp, "A23",   "sun8i",       SOC_ALLWINNER_A23,   soc, 40)
      SOC_EQ(tmp, "A31",   "sun6i",       SOC_ALLWINNER_A31,   soc, 40)
      SOC_EQ(tmp, "A31s",  "sun6i",       SOC_ALLWINNER_A31S,  soc, 40)
      SOC_EQ(tmp, "A33",   "sun8i",       SOC_ALLWINNER_A33,   soc, 40)
      SOC_EQ(tmp, "A40",   "sun8i",       SOC_ALLWINNER_A40,   soc, 40)
      SOC_EQ(tmp, "A50",   "sun8i",       SOC_ALLWINNER_A50,   soc, 28)
      SOC_EQ(tmp, "A80",   "sun9i",       SOC_ALLWINNER_A80,   soc, 28)
      SOC_EQ(tmp, "A83T",  "sun8i",       SOC_ALLWINNER_A83T,  soc, 28)
    
      // H series 32 bits
      SOC_EQ(tmp, "H2+",   "sun8i",       SOC_ALLWINNER_HZP,   soc, 40)
      SOC_EQ(tmp, "H3",    "sun8i",       SOC_ALLWINNER_H3,    soc, 40)
      SOC_EQ(tmp, "H8",    "sun8i",       SOC_ALLWINNER_H8,    soc, 28)
    
      // H series 64 bits
      SOC_EQ(tmp, "H5",    "sun50i",      SOC_ALLWINNER_H5,    soc, 40)
      SOC_EQ(tmp, "H6",    "sun50i",      SOC_ALLWINNER_H6,    soc, 28)
      SOC_EQ(tmp, "H616",  "sun50i",      SOC_ALLWINNER_H616,  soc, 28)
    
      // R series 32 bits
      SOC_EQ(tmp, "R8",    "sun5i",       SOC_ALLWINNER_R8,    soc, 55)
      SOC_EQ(tmp, "R16",   "sun8i",       SOC_ALLWINNER_R16,   soc, 40)
      SOC_EQ(tmp, "R40",   "sun8i",       SOC_ALLWINNER_R40,   soc, 40)
      SOC_EQ(tmp, "R58",   "sun8i",       SOC_ALLWINNER_R58,   soc, 28)
    
      // R series  64 bits
      SOC_EQ(tmp, "R329",  "sun50i",      SOC_ALLWINNER_R328,  soc, 28)
    
      SOC_END
    }
    enhancement 
    opened by Popolon 8
  • FreeBSD port

    FreeBSD port

    There's currently no port for FreeBSD (https://freshports.org).

    Are you planning on doing this? Otherwise I can offer creating (and maintaining(?)) an official FreeBSD port.

    enhancement 
    opened by Tectu 8
  • AMD FX6300 incorrect core count

    AMD FX6300 incorrect core count

    Output:

    Name:              AMD FX(tm)-6300 Six-Core Processor 
    Microarchitecture: Piledriver
    Technology:        32nm
    Max Frequency:     3.500 GHz
    Cores:             3 cores (6 threads)
    AVX:               AVX
    FMA:               FMA3,FMA4
    L1i Size:          64KB (192KB Total)
    L1d Size:          16KB (96KB Total)
    L2 Size:           2MB (6MB Total)
    L3 Size:           8MB
    Peak Performance:  168.00 GFLOP/s
    

    This processor definitely has 6 physical cores:

    cpufetch $ lscpu | grep CPU
    CPU op-mode(s):                  32-bit, 64-bit
    CPU(s):                          6
    
    help wanted question 
    opened by sburris0 8
  • RISC-V support

    RISC-V support

    When I try to compile on RISC-V (64 bit version) of Debian.

    [email protected]:~/cpufetch# make
    Makefile:45: Unsupported arch detected: riscv64. See https://github.com/Dr-Noob/cpufetch#1-support
    Makefile:46: If your architecture is supported but the compilation fails, please open an issue in https://github.com/Dr-Noob/cpufetch/issues
    Makefile:47: *** Aborting compilation. Arrêt.
    

    For information on my qemu installation of Debian, I have the following /proc/cpuinfo

    processor       : 0
    hart            : 1
    isa             : rv64imafdcsu
    mmu             : sv48
    

    rv32 means RISC-V 32 bits rv64, 64 bits and rv128 128 bits (still in draft). the letter that follow are the names of the extensions:

    • i=integer
    • m=mutiply(and divde)
    • f=float, d=double etc... I have some RISC-V 32 bits and 64 bits MCU, but without MMU. I wait for a RISC-V purpose CPU to test Linux on real hardware RISC-V. Several cheap boards should be available this month.
    opened by Popolon 7
  • Does not compile on FreeBSD with LLVM (src/x86/apic.c:80:5: error: unknown type name 'cpu_set_t'; did you mean 'cpusetid_t'?)

    Does not compile on FreeBSD with LLVM (src/x86/apic.c:80:5: error: unknown type name 'cpu_set_t'; did you mean 'cpusetid_t'?)

    [[email protected] /tmp/cpufetch]# gmake cc -Wall -Wextra -pedantic -fstack-protector-all -pedantic -std=c99 -DARCH_X86 -O3 -Wfloat-equal -Wshadow -Wpointer-arith src/common/main.c src/common/cpu.c src/common/udev.c src/common/printer.c src/common/args.c src/common/global.c src/x86/cpuid.c src/x86/apic.c src/x86/cpuid_asm.c src/x86/uarch.c -o cpufetch src/x86/apic.c:80:5: error: unknown type name 'cpu_set_t'; did you mean 'cpusetid_t'? cpu_set_t currentCPU; ^~~~~~~~~ cpusetid_t /usr/include/sys/types.h:86:22: note: 'cpusetid_t' declared here typedef __cpusetid_t cpusetid_t; ^ src/x86/apic.c:81:5: warning: implicit declaration of function 'CPU_ZERO' is invalid in C99 [-Wimplicit-function-declaration] CPU_ZERO(&currentCPU); ^ src/x86/apic.c:82:5: warning: implicit declaration of function 'CPU_SET' is invalid in C99 [-Wimplicit-function-declaration] CPU_SET(cpu_id, &currentCPU); ^ src/x86/apic.c:83:9: warning: implicit declaration of function 'sched_setaffinity' is invalid in C99 [-Wimplicit-function-declaration] if (sched_setaffinity (0, sizeof(currentCPU), &currentCPU) == -1) { ^ 3 warnings and 1 error generated. gmake: *** [Makefile:29: cpufetch] Error 1

    [[email protected] /tmp/cpufetch]# uname -a FreeBSD fbsd-head 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-d7bfb412a: Sun Jun 6 10:08:22 EDT 2021 [email protected]:/usr/obj/usr/src/amd64.amd64/sys/HYPERV amd64

    [[email protected] /tmp/cpufetch]# cc -v FreeBSD clang version 11.0.1 ([email protected]:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: x86_64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin

    bug 
    opened by MikeJakubik 7
  • Adding support for AMD Van Gogh/Aerith

    Adding support for AMD Van Gogh/Aerith

    This SoC is used in Valve's Steam Deck.

    cpufetch output:

    [ERROR]: Unknown microarchitecture detected: M=0x00000000 EM=0x00000009 F=0x0000000F EF=0x00000008 S=0x00000002
    Please, create a new issue with this error message, the output of 'cpufetch' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues
    [ERROR]: Found invalid process: '0'
    Please, create a new issue with this error message, the output of 'cpufetch' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues           
                                                       
                                                                  
                                                                  Name:              AMD Custom APU 0405
                                                                  Microarchitecture: Unknown
                                                                  Technology:        Unknown
                                                                  Max Frequency:     2.800 GHz
                                                                  Cores:             4 cores (8 threads)
                                                                  AVX:               AVX,AVX2
                                                                  FMA:               FMA3
                                                                  L1i Size:          32KB (128KB Total)
                                                                  L1d Size:          32KB (128KB Total)
                                                                  L2 Size:           512KB (2MB Total)
                                                                  L3 Size:           4MB
                                                                  Peak Performance:  179.20 GFLOP/s
    

    cpufetch --debug output:

    [ERROR]: Unknown microarchitecture detected: M=0x00000000 EM=0x00000009 F=0x0000000F EF=0x00000008 S=0x00000002
    Please, create a new issue with this error message, the output of 'cpufetch' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues
    cpufetch v1.02 (Linux x86_64 build)
    AMD Custom APU 0405
    - Max standard level: 0x00000010
    - Max extended level: 0x80000020
    - AMD topology extensions: 1
    - CPUID dump: 0x00890F02
    
    opened by logan2611 0
  • Improve ARM features detection

    Improve ARM features detection

    Current features detected under ARM are not always relevant, and probably there are relevant features that are not shown (e.g, #130).

    A list of relevant features should be elaborated and the program should be updated accordingly.

    enhancement 
    opened by Dr-Noob 0
  • Bugs reported by debian users

    Bugs reported by debian users

    Hey, Dr-Noob

    this package has been into Debian unstable repository. The version is 0.98. There are currently three bugs reported by users.

    1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=998722
    2. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=999588
    3. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=999591

    In fact, the first bug. He reported that the latest version(commit a5b321) is no problem. But there are still some information errors. Although the other two bugs are based on the 0.98 version, But i think the latest version should still have this problem So I feed these bugs back to you. I don’t know if you can try to fix it. And I will update the version of the debian unstable repository to your latest version and let them test

    opened by ClayStan 3
  • Support for Alder Lake heterogeneous core distribution

    Support for Alder Lake heterogeneous core distribution

    Alder Lake has efficiency cores + performance cores, which will not be detected correctly by current cpufetch implementation (each core group also have different caches)

    enhancement 
    opened by Dr-Noob 5
Releases(v1.02)
Anime browser built with AniList APIs, showcasing clean Flutter BLoC architecture

Anime browser built with AniList APIs. The purpose of this project is to showcase clean Flutter application architecture with BLoC design pattern.

Peter A. Bizjak 21 Jun 22, 2022
Yet another ratio espresso scale

SofronioEspressoRatioScale Yet another ratio espresso scale

Sofronio 5 Nov 21, 2021
yark - Yet Another RootKit

yark - Yet Another RootKit How to Build Requirements In order to build the kernel module, you need to install the kernel-headers package corresponding

imlk 16 Jun 21, 2022
A cross platform C99 library to get cpu features at runtime.

cpu_features A cross-platform C library to retrieve CPU features (such as available instructions) at runtime. Table of Contents Design Rationale Code

Google 2k Jun 22, 2022
GNU project's implementation of the standard C library(with Xuantie RISC-V CPU support).

GNU project's implementation of the standard C library(with Xuantie RISC-V CPU support).

T-Head Semiconductor Co., Ltd. 5 Mar 17, 2022
Hybrid Detect demonstrates CPU topology detection using multiple intrinsic and OS level APIs.

Hybrid Detect Hybrid Detect demonstrates CPU topology detection using multiple intrinsic and OS level APIs. First, we demonstrate usage of CPUID intri

null 25 Jun 13, 2022
A tool for use with clang to analyze #includes in C and C++ source files

Include What You Use For more in-depth documentation, see docs. Instructions for Users "Include what you use" means this: for every symbol (type, func

null 2.9k Jul 2, 2022
C-shellcode to hex converter, handy tool for paste & execute shellcodes in gdb, windbg, radare2, ollydbg, x64dbg, immunity debugger & 010 editor

shellex WARNING: the ugliest code in the world C-shellcode to hex converter. Handy tool for paste & execute shellcodes in gdb, windbg, radare2, ollydb

David Reguera Garcia aka Dreg 79 Jun 20, 2022
A tool to edit Cyberpunk 2077 sav.dat files

This is a holidays project and will probably not reach the user-friendly GUI state that a save editor is expected to have.

null 259 Jun 9, 2022
GSmartControl - Hard disk drive and SSD health inspection tool

GSmartControl Hard disk drive and SSD health inspection tool GSmartControl is a graphical user interface for smartctl (from smartmontools package), wh

Alexander Shaduri 172 Jun 29, 2022
Windows user-land hooks manipulation tool.

MineSweeper Windows user-land hooks manipulation tool. Highlights Supports any x64/x86 Windows DLL (actually, any x64/x86 Windows PE for that matter)

Arsenii Pustovit 126 Jun 15, 2022
Orbit, the Open Runtime Binary Instrumentation Tool, is a standalone C/C++ profiler for Windows and Linux

Orbit, the Open Runtime Binary Instrumentation Tool, is a standalone C/C++ profiler for Windows and Linux. Its main purpose is to help developers visualize the execution flow of a complex application.

Google 2.6k Jun 30, 2022
WinMerge is an Open Source differencing and merging tool for Windows.

WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.

null 3k Jun 26, 2022
BlowBeef is a tool for analyzing WMI data.

Blowbeef BlowBeef is a tool for analyzing WMI data. Usage BlowBeef is a tool for analyzing WMI data.

倾旋 17 Jun 17, 2022
VMPImportFixer is a tool aimed to resolve import calls in a VMProtect'd (3.x) binary.

VMPImportFixer VMPImportFixer is a tool aimed to resolve import calls in a VMProtect'd (3.x) binary. Information VMPImportFixer attempts to resolve al

null 240 Jun 24, 2022
Another system information tool written in C++

Sysfex Another neofetch-like system information fetching tool for linux-based systems written in C++. This is a hobby project, so bugs are to be expec

Mehedi Rahman Mahi 101 Jun 15, 2022
A tool for Pikmin 1 model files

MODConv A Pikmin 1 model format converter Functionality NOTE: these are not command-line parameters, the program has a built-in input parser load (inp

null 4 Oct 20, 2021
KeyScan is a C++ open source explanation tool targeting windows operating system.

KeyScan is a C++ open source explanation tool targeting windows operating system. it allows you to send keyboard events, mouse events and capture keystrokes (keylogger).!

null 9 Jun 12, 2022
A windows tool for changing the start button logo

WinLogo About This project is used to modify the start button logo of windows 10 computers. The logos are precompiled into the binary, but the UI supp

null 14 Apr 16, 2022