Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.
preface
Once in a while, I found a nice Little tool for monitoring Linux system resources dashborad: btop
Liverpoolfc.tv: github.com/aristocrato…
The installation
Static binary installation (Linux kernel needs to be greater than 3.2.0, requires centos7 or higher)
# download wget HTTPS:/ / github.com/aristocratos/btop/releases/download/v1.0.9/btop-1.0.9-linux-x86_64.tbzYum install bzip2 -y mkdir btop mv btop- yum install bzip2 -y mkdir btop mv btop-1.09.-linux-x86_64.tbz btop
cd btop
bunzip2 btop-1.09.-linux-x86_64.tar
tar xf btop-1.09.-linux-x86_64.tar # make install PREFIX=/opt/btop
Copy the code
In fact, this is already installed, but the command to use the absolute path
use
ERROR: No UTF-8 locale detected!
Use --utf-force argument to force start if you're sure your terminal can handle it.
Copy the code
This error will be reported because we don’t need that high level of support
Direct launch is the default theme, and if you want the theme shown in the opening diagram of this article, you need to add a -t parameter
/opt/btop/bin/btop --utf-force #TTY --utf-force -tCopy the code
Practical function
More useful is the lower right corner of this piece, will show the process of the number of threads, memory used, CPU and other intuitive data
The MemB column shows how much memory is used, and the EXAMPLE of Cpu% shows how much Cpu is used. It is easy to locate processes with high Cpu and high memory
At the same time, it also supports filtering process, which is useful when there are many processes. Press F first and then enter the name of the process you want to find (fuzzy query).
help
After opening the interface, press H to open the help page and detailed function guide. Press H again to exit the help page
To exit the entire screen, press QQQ
transplant
If you want to run the tool on another machine after the above installation, you do not need to compile again.
Just package the compiled directory, and then upload it to another machine and run
CD /opt/ tar ZCF btop.tar.gz btopCopy the code
Put btop.tar.gz on another machine, unpack it, and you’re ready to run