|
1 | 1 | # cpufetch |
2 | 2 |
|
3 | 3 | Prints a fancy summary of the CPU with some advanced information |
| 4 | + |
4 | 5 |
|
5 | 6 | ### Platforms |
6 | | -This tool works on both 64 only and under Linux because of its [implementation details](#implementation). AMD support is not guaranteed so information may not be correct |
| 7 | +cpufetch currently supports x86 CPUs (both Intel and AMD CPUs) |
| 8 | + |
| 9 | +| Platform | Intel | AMD | Notes | |
| 10 | +|:---------:|:-------------------------:|:------------------------:|:-----------------:| |
| 11 | +| Linux | :heavy_check_mark: | :heavy_check_mark: | Prefered platform | |
| 12 | +| Windows | :heavy_check_mark: | :heavy_check_mark: | Some information may be missing. No colors and worse CPU art | |
| 13 | +| macOS | :heavy_exclamation_mark: | :heavy_exclamation_mark: | Untested | |
| 14 | + |
7 | 15 |
|
8 | 16 | ### Usage and installation |
| 17 | +#### Linux |
| 18 | +There is a cpufetch package available in Arch Linux ([cpufetch-git](https://aur.archlinux.org/packages/cpufetch-git)). |
| 19 | + |
| 20 | +If you are in other distro, you can build `cpufetch` from source (see below) |
| 21 | + |
| 22 | +#### Windows |
| 23 | +In the [releases](https://github.com/Dr-Noob/cpufetch/releases) section you will find some cpufetch executables compiled for Windows. Just download and run it from Windows CMD. |
9 | 24 |
|
| 25 | +#### Building from source |
10 | 26 | Just clone the repo and use `make` to compile it |
11 | 27 |
|
12 | 28 | ``` |
|
16 | 32 | ./cpufetch |
17 | 33 | ``` |
18 | 34 |
|
| 35 | +The Makefile is designed to work on both Linux and Windows. |
| 36 | + |
19 | 37 | ### Example |
20 | 38 |
|
21 | | -This is the output of `cpufetch` in a i7-4790K |
| 39 | +Here are more examples of how `cpufetch` looks on different CPUs. |
22 | 40 |
|
23 | | - |
| 41 | + |
24 | 42 |
|
25 | | -### Output |
| 43 | + |
26 | 44 |
|
27 | | -Output is detailed as follows: |
| 45 | +### Colors and style |
| 46 | +By default, `cpufetch` will print the CPU art with the system colorscheme. However, you can always set a custom color scheme, either |
| 47 | +specifying Intel or AMD, or specifying the colors in RGB format: |
28 | 48 |
|
29 | | -| Field | Description | Possible Values | |
30 | | -|:----------:|:-----------------------:|:-----------------:| |
31 | | -| Name | Name of the CPU | Any valid CPU name | |
32 | | -| Frequency | Max frequency of the CPU(in GHz) | X.XX(GHz or MHz) |
33 | | -| N.Cores | Number of cores the CPU has. If CPU supports `Hyperthreading` or similar, this will show cores and threads separately | X(cores)X(threads) |
34 | | -| AVX | Type of AVX supported by the CPU or None. AVX instructions allows the CPU to vectorize the code with a witdh of 256 bits in single precision(or 512bits if AVX512 is supported) | AVX,AVX2,AVX512,None |
35 | | -| SSE | Same as AVX, but SSE family are 128bits witdh | SSE, SSE2, SSE3, SSSE3, SSE4a, SSE4_1, SSE4_2,None | |
36 | | -| FMA | Does this CPU support FMA(Fused Multiply Add)?This instruction allows the CPU to multiply and add a value on the same clock cycle | FMA3,FMA4,None | |
37 | | -| AES | Does this CPU support AES? This instruction is allows the CPU to make AES cypher efficiently | Yes or No | |
38 | | -| SHA | Does this CPU support SHA? This instruction is allows the CPU to make SHA hashing efficiently | Yes or No | |
39 | | -| L1 Size | Size(in bytes) of the L1 cache, separated in data and instructions | XXB(Data)XXB(instructions) | |
40 | | -| L2 Size | Size(in bytes) of the L2 cache(both are unified) | XXXKB or None | |
41 | | -| L3 Size | Same as L3 | XXXXKB or None | |
42 | | -| Peak FLOPS | Max FLOPS(Floating Point Operation Per Second) this CPU could theoretical achieve. This is calculated by: `N.Cores*Freq*2(Because 2 functional units)*2(If has FMA)*VectorWidth` | XXX.XX (G/T)FLOPs | |
| 49 | +``` |
| 50 | +./cpufetch --color intel (default color for Intel) |
| 51 | +./cpufetch --color amd (default color for AND) |
| 52 | +./cpufetch --color 239,90,45:210,200,200:100,200,45:0,200,200 (example) |
| 53 | +``` |
43 | 54 |
|
44 | | -`cpufetch` also prints a simple ascii art of the manufacturer logo. |
| 55 | +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. |
45 | 56 |
|
46 | 57 | ### Implementation |
47 | 58 |
|
48 | | -`cpufetch` makes use of two techniques to fetch data: |
49 | | -* __cpuid__: CPU name, number of threads per core and instructions features are fetched via _cpuid_. See [this](http://www.sandpile.org/x86/cpuid.htm) and [Intel Processor Identification and the CPUID Instruction](https://www.scss.tcd.ie/~jones/CS4021/processor-identification-cpuid-instruction-note.pdf) for more information. |
50 | | -* __udev__: Cache and frequency are fetched via _udev_, by looking at specific files from `/sys/devices/system/cpu` |
| 59 | +`cpufetch` fetches all of the information using the `CPUID` x86 instruction. There are, however, some cases where the CPU does not support fetching some needed information. In this case, `cpufetch` will use `/sys/devices/system/cpu` in Linux as a fallback. If `cpufetch` is running on Windows and `CPUID` does not give all the data, `cpufetch` won't be able to show it. [I hope this can be fixed in the future](https://github.com/Dr-Noob/cpufetch/issues/30) |
51 | 60 |
|
52 | 61 | ### Bugs or improvements |
53 | | -Feel free to open a issue on the repo to report a issue or propose any improvement in the tool |
| 62 | +There are many open issues in github (see [issues](https://github.com/Dr-Noob/cpufetch/issues)). Feel free to open a new one report a issue or propose any improvement in `cpufetch` |
54 | 63 |
|
55 | | -### Important note |
56 | | -Current status of development of cpufetch is incomplete (there are lots of bugs at the moment). I will fix them, add some other features and update the Arch Linux package when I have time. |
| 64 | +### Testers |
| 65 | +I would like to thank [Gonzalocl](https://github.com/Gonzalocl) and [OdnetninI](https://github.com/OdnetninI) for their help, running `cpufeth` in many different CPUs they have access to, which makes it easier to debug and check the correctness of `cpufetch`. |
0 commit comments