BTOP版本v1.4.0
添加了英特尔GPU支持,请注意,只有可供监视的GPU利用率,功率使用和时钟速度。感谢 @bjia56的贡献。
添加了NetBSD支持。感谢@fraggerfox的贡献。
有关新功能,错误修复和新主题的详细列表,请参见ChangElog.md和最新版本。
BTOP版本v1.3.0
添加了用于Linux的GPU支持的大型发行,并为OpenBSD提供了平台支持。非常感谢 @romner-set(GPU支持)和@joske(OpenBSD支持)的贡献。以及许多错误的错误和小更改,有关详细列表和属性,请参见ChangElog.md和最新版本。
有关GPU支持的更多信息,请参见下面的新闻条目。
为Linux添加了GPU监视!
从Git Main编译进行尝试。
使用密钥5
6
7
显示0
隐藏GPU监视框。 5
= GPU 6
= GPU 2,等。
GPU统计/图形也可以显示在“ CPU框”(不作为冗长)中,请参见CPU选项菜单以获取信息和配置。
请注意,发布页面上提供的二进制文件(发布时)和连续构建将不启用GPU支持。
由于GPU支持依赖于动态GPU库的加载,因此在静态链接时,GPU支持将无效。
有关如何使用GPU监视支持编译的更多信息,请参见汇编Linux。
非常感谢 @Romner-Set为GPU支持写了绝大多数实施。
大型更新,版本颠簸至1.3即将推出。
https://github.com/aristocratos/btop4win的首次发行版BTOP4WIN
释放v1.2.0并带有FreeBSD支持。到目前为止尚无释放二进制文件。
再次感谢@Joske的移植工作!
由于与Linux,MACOS和FreeBSD的兼容性完成了,因此将重点放在GPU监视等新功能上。
释放v1.1.0具有MACOS支持。连续构建麦克酒中的二进制文件目前仅是x86。 X86和ARM64(Apple Silicon)都包含MacOS二进制文件 +安装程序。
非常感谢@joske写了绝大多数实施!
在接下来的几周内,在@Joske启动和大部分工作的OSX [MACOS]和FreeBSD分支机构的工作。 OSX [MACOS]分支有一些内存泄漏需要整理,并且在CPU用法计算过程中都有一些问题,以及其他需要修复的较小问题。
如果您想提供帮助,请测试错误/修复错误或只是尝试分支:
MacOS / OSX
# Install and use Homebrew or MacPorts package managers for easy dependency installation
brew install coreutils make gcc@11 lowdown
git clone https://github.com/aristocratos/btop.git
cd btop
git checkout OSX
gmake
freebsd
sudo pkg install gmake gcc11 coreutils git lowdown
git clone https://github.com/aristocratos/btop.git
cd btop
git checkout freebsd
gmake
请注意,建议使用GNU MAKE( gmake
),但MacOS/OSX不需要,但在FreeBSD上需要它。
MACOS开发是由@Joske发起的,非常感谢:)请参阅Branch OSX的当前进度。
BTOP ++的Linux版本已完成。以1.0.0版本发布
我将在每个版本中为有问题编译的人提供静态编译的二进制文件。
对于汇编GCC 10,GCC 11首选。
请向问题页面报告任何错误。
现在的开发计划:
到目前为止,Windows支持还没有在计划中,但是如果其他人想接受它,我将尝试提供帮助。
该项目将需要一些时间,直到与BPYTOP具有完全的功能奇偶校验为止,因为所有系统信息收集都必须从头开始编写,而无需任何外部库。并且需要以代码贡献的形式进行一些帮助,以获得对BSD和MACOS/OSX的完全支持。
ChangElog.md
贡献
code_of_conduct.md
资源监视器显示处理器,内存,磁盘,网络和进程的使用和统计数据。
bashtop和bpytop的C ++版本。
BTOP ++使用与BPYTOP和BASHTOP相同的主题文件(Bashtop主题中缺少某些颜色值)。
请参阅主题夹以获取可用主题。
make install
命令将默认主题放在[$PREFIX or /usr/local]/share/btop/themes
中。用户创建的主题应放置在$XDG_CONFIG_HOME/btop/themes
或$HOME/.config/btop/themes
中。
让我知道您是否想通过新主题做出贡献。
您可以通过GitHub赞助此项目,请参阅我的赞助商页面以获取选项。
或通过PayPal或Ko-Fi捐款。
任何支持都将不胜感激!
为了获得最佳体验,终端支持:
还需要一个utf8语言环境和涵盖的字体:
GPU监视还需要使用GPU支持( GPU_SUPPORT=true
标志)构建的BTOP二进制文件。
有关与GPU支持的编译有关的更多信息,请参见GPU兼容性部分。
如果您有NVIDIA GPU,则必须使用官方的NVIDIA驱动程序,封闭源和开源的驱动程序都已得到验证。
除此之外,您还必须安装NVIDIA-ML动态库,该库应包含在您的发行驱动程序包中。
如果您需要AMD GPU rocm_smi_lib
,则可能会打包也可能不会打包以进行分发。
如果从源中编译 - 用GCC12和Clang16进行了编译,则需要一个工作C编译器。
还要求用户有权从系统中阅读。
可以使用make setcap
(首选)设置, make setuid
可以通过使用sudo
或等效的btop来设置。
如果您对图表中的字符遇到问题,看起来不像屏幕截图中的那样,则系统配置的后备字体不支持盲文字符可能是一个问题。
有关包含盲文符号的字体的示例,请参见“术语力量线”。
有关解决方案,请参见第100期中的@sgleize link和@xenhat链接。
如果文本未对准,并且您正在使用Konsole或Yakuake,则可能会解决“双向文本渲染”。
角色相互夹住或文本/边界未对准不是由BTOP引起的错误,而是FontConfig或终端问题,其中构成图形的盲文字符未正确呈现。
查看您使用的终端模拟器的创建者,如果上述修复程序对您不起作用,则可以用来解决这些问题。
Linux的二进制文件与MUSL静态编译,并在内核上工作2.6.39及更新
下载BTOP-(版本) - (ARCH) - (平台).tbz从最新版本中下载,并拆开新文件夹
注意!使用X86_64用于64位X86系统,I486和I686是32位!
安装(来自创建文件夹)
# use "make install PREFIX=/target/dir" to set target, default: /usr/local
# only use "sudo" when installing to a NON user owned directory
sudo make install
(Intel GPU的可选/所需
启用信号发送到任何过程而无需从sudo
开始,并且可以防止 /proc读取某些系统上的权限问题。
英特尔GPU支持是必需的。
# run after make install and use same PREFIX if any was used at install
sudo make setcap
# run after make install and use same PREFIX if any was used at install
# set SU_USER and SU_GROUP to select user and group, default is root:root
sudo make setuid
卸载
sudo make uninstall
显示帮助
make help
二进制释放(来自本地OS回购)
sudo zypper in btop
sudo dnf install btop
sudo dnf install epel-release
sudo dnf install btop
pkg install btop
pkg_add btop
Homebrew(MacOS(X86_64&ARM64) / Linux(X86_64))的二进制版本
brew install btop
需要至少GCC 10或Clang 16。
Makefile还需要GNU Coreutils和sed
(应该已经安装在任何现代分销上)。
BTOP ++支持NVIDIA和AMD GPU和INTEL IGPU,前提是Linux X86_64,只要您拥有正确的驱动程序和库。
当静态链接glibc(或musl等)时,GPU对NVIDIA或AMD的支持将不起作用!
对于X86_64 Linux,FLAG GPU_SUPPORT
会自动设置为true
,以手动禁用GPU支持将标志设置为false,例如:
make GPU_SUPPORT=false
(或cmake -DBTOP_GPU=false
with cmake)
Nvidia
您必须使用官方的NVIDIA驾驶员,封闭源和开源驱动器都已验证可以工作。
除此之外,您还必须安装nvidia-ml
动态库,该库应包含在您的发行驱动程序包中。
AMD
使用ROCM SMI库查询AMDGPU数据,该库可能会打包也可能不会打包以进行分发。如果您的发行版未提供软件包,则使用RSMI_STATIC=true
make flag将BTOP ++静态链接到ROCM SMI。
该标志期望在lib/rocm_smi_lib
中使用ROCM SMI源代码,如果不存在汇编将会失败。最新测试的版本是5.6.x,可以通过以下命令获得:
git clone https://github.com/rocm/rocm_smi_lib.git --depth 1 -b rocm-5.6.x lib/rocm_smi_lib
安装依赖项(Ubuntu 21.04 Hirsute的示例)
sudo apt install coreutils sed git build-essential gcc-11 g++-11 lowdown
克隆存储库
git clone https://github.com/aristocratos/btop.git
cd btop
编译
make
制作选项:
旗帜 | 描述 |
---|---|
VERBOSE=true | 显示完整的编译器/链接器命令 |
STATIC=true | 用于静态汇编 |
QUIET=true | 对于更少的详细输出 |
STRIP=true | 强制剥离调试符号(添加-s 链接标志) |
DEBUG=true | 将Optflags设置为-O0 -g ,并启用更多详细调试记录 |
ARCH=<architecture> | 手动设置目标体系结构 |
FORTIFY_SOURCE=false | 用_FORTIFY_SOURCE=3 禁用强化 |
GPU_SUPPORT=<true|false> | 启用/禁用GPU支持(默认为X86_64 Linux上启用) |
RSMI_STATIC=true | 静态链接用于查询AMDGPU的ROCM SMI库 |
ADDFLAGS=<flags> | 用于将标志附加到编译器和链接器 |
CXX=<compiler> | 手动设置要使用的编译器 |
示例:如果仅针对您自己的系统编译make ADDFLAGS=-march=native
可能会提供性能提升。
注意!如果使用LDAP身份验证,则用户名将显示为LDAP用户的UID号,如果用GLIBC静态编译。
安装
sudo make install
附加PREFIX=/target/dir
设置目标,默认值: /usr/local
注意!仅在安装到非用户拥有的目录时使用“ sudo”。
(Intel GPU支持的可选/所需
无需sudo
启用信号发送到任何过程,并防止 /PROC读取某些系统上的权限问题。
英特尔GPU监视也需要。
安装后运行并使用相同的前缀(如果使用时使用)。
sudo make setcap
或者
设置SU_USER
和SU_GROUP
以选择用户和组,默认值是root
and root
sudo make setuid
卸载
sudo make uninstall
从源DIR中删除任何对象文件
make clean
删除所有对象文件,二进制文件和在源代码中创建的目录
make distclean
显示帮助
make help
安装构建依赖项
需要Clang / GCC,Cmake,Ninja,Lowdown和Git
例如,与Debian Bookworm:
sudo apt install cmake git g++ ninja-build lowdown
克隆存储库
git clone https://github.com/aristocratos/btop.git && cd btop
编译
# Configure
cmake -B build -G Ninja
# Build
cmake --build build
这将自动构建版本的BTOP。
传递到配置步骤的一些有用的选项:
配置标志 | 描述 |
---|---|
-DBTOP_STATIC=<ON|OFF> | 启用静态链接(默认为OFF) |
-DBTOP_LTO=<ON|OFF> | 启用链接时间优化(默认情况下) |
-DBTOP_USE_MOLD=<ON|OFF> | 使用模具链接BTOP(默认情况下) |
-DBTOP_PEDANTIC=<ON|OFF> | 编译其他警告(默认情况下) |
-DBTOP_WERROR=<ON|OFF> | 以警告作为错误编译(默认情况下) |
-DBTOP_FORTIFY=<ON|OFF> | 用_FORTIFY_SOURCE=3 检测缓冲区溢出(默认情况下) |
-DBTOP_GPU=<ON|OFF> | 启用GPU支持(默认情况下) |
-DBTOP_RSMI_STATIC=<ON|OFF> | 构建并链接ROCM SMI库静态(默认为OFF) |
-DCMAKE_INSTALL_PREFIX=<path> | 安装前缀('/usr/local'默认为 |
要强制任何CXX=<compiler> cmake -B build -G Ninja
编译器
安装
cmake --install build
可能需要根特权
卸载
CMAKE默认情况下不会生成卸载目标。要删除已安装的文件,请运行
cat build/install_manifest.txt | xargs rm -irv
清理构建目录
cmake --build build -t clean
需要至少GCC 10或Clang 16。
使用GCC,Macos Ventura需要第12版(或更好)。如果您在Ventura上获得链接器错误,则需要升级命令行工具(版本14.0)。
Makefile还需要GNU Coreutil和sed
。
安装和使用自制或MacPorts软件包管理器,以便于安装依赖
安装依赖项(示例自制)
brew install coreutils make gcc@12 lowdown
克隆存储库
git clone https://github.com/aristocratos/btop.git
cd btop
编译
gmake
制作选项:
旗帜 | 描述 |
---|---|
VERBOSE=true | 显示完整的编译器/链接器命令 |
STATIC=true | 用于静态汇编(仅LIBGCC和LIBSTDC ++) |
QUIET=true | 对于更少的详细输出 |
STRIP=true | 强制剥离调试符号(添加-s 链接标志) |
DEBUG=true | 将Optflags设置为-O0 -g ,并启用更多详细调试记录 |
ARCH=<architecture> | 手动设置目标体系结构 |
FORTIFY_SOURCE=false | 用_FORTIFY_SOURCE=3 禁用强化 |
ADDFLAGS=<flags> | 用于将标志附加到编译器和链接器 |
CXX=<compiler> | 手动设置要使用的编译器 |
示例: gmake ADDFLAGS=-march=native
可能只为您自己的系统编译,可能会给出性能提升。
安装
sudo gmake install
附加PREFIX=/target/dir
设置目标,默认值: /usr/local
注意!仅在安装到非用户拥有的目录时使用“ sudo”。
(建议)设置suid位以使BTOP始终以root(或其他用户)运行
sudo gmake setuid
sudo
无需查看非用户拥有的流程的信息,并启用信号发送到任何过程。
安装后运行并使用相同的前缀(如果使用时使用)。
将SU_USER
和SU_GROUP
设置为选择用户和组,默认值为root
and wheel
卸载
sudo gmake uninstall
从源DIR中删除任何对象文件
gmake clean
删除所有对象文件,二进制文件和在源代码中创建的目录
gmake distclean
显示帮助
gmake help
安装构建依赖项
需要Clang,Cmake,Ninja,Lowdown和Git
brew update --quiet
brew install cmake git llvm ninja lowdown
克隆存储库
git clone https://github.com/aristocratos/btop.git && cd btop
编译
# Configure
export LLVM_PREFIX= " $( brew --prefix llvm ) "
export CXX= " $LLVM_PREFIX /bin/clang++ "
export CPPFLAGS= " -I $LLVM_PREFIX /include "
export LDFLAGS= " -L $LLVM_PREFIX /lib -L $LLVM_PREFIX /lib/c++ -Wl,-rpath, $LLVM_PREFIX /lib/c++ -fuse-ld= $LLVM_PREFIX /bin/ld64.lld "
cmake -B build -G Ninja
# Build
cmake --build build
注意: BTOP使用大量C ++ 20功能,因此有必要具体说明编译器和标准库。如果您使用Apple-Clang或GCC进行编译,请随时在此处添加说明。
这将自动构建版本的BTOP。
传递到配置步骤的一些有用的选项:
配置标志 | 描述 |
---|---|
-DBTOP_LTO=<ON|OFF> | 启用链接时间优化(默认情况下) |
-DBTOP_USE_MOLD=<ON|OFF> | 使用模具链接BTOP(默认情况下) |
-DBTOP_PEDANTIC=<ON|OFF> | 编译其他警告(默认情况下) |
-DBTOP_WERROR=<ON|OFF> | 以警告作为错误编译(默认情况下) |
-DBTOP_FORTIFY=<ON|OFF> | 用_FORTIFY_SOURCE=3 检测缓冲区溢出(默认情况下) |
-DCMAKE_INSTALL_PREFIX=<path> | 安装前缀('/usr/local'默认为 |
要强制任何特定的编译器,请运行CXX=<compiler> cmake -B build -G Ninja
安装
cmake --install build
可能需要根特权
卸载
CMAKE默认情况下不会生成卸载目标。要删除已安装的文件,请运行
cat build/install_manifest.txt | xargs rm -irv
清理构建目录
cmake --build build -t clean
需要至少GCC 10或Clang 16。
请注意,GNU Make( gmake
)需要在FreeBSD上进行编译。
安装依赖项
sudo pkg install gmake gcc11 coreutils git lowdown
克隆存储库
git clone https://github.com/aristocratos/btop.git
cd btop
编译
gmake
制作选项:
旗帜 | 描述 |
---|---|
VERBOSE=true | 显示完整的编译器/链接器命令 |
STATIC=true | 用于静态汇编(仅LIBGCC和LIBSTDC ++) |
QUIET=true | 对于更少的详细输出 |
STRIP=true | 强制剥离调试符号(添加-s 链接标志) |
DEBUG=true | 将Optflags设置为-O0 -g ,并启用更多详细调试记录 |
ARCH=<architecture> | 手动设置目标体系结构 |
FORTIFY_SOURCE=false | 用_FORTIFY_SOURCE=3 禁用强化 |
ADDFLAGS=<flags> | 用于将标志附加到编译器和链接器 |
CXX=<compiler> | 手动设置要使用的编译器 |
示例: gmake ADDFLAGS=-march=native
可能只为您自己的系统编译,可能会给出性能提升。
安装
sudo gmake install
附加PREFIX=/target/dir
设置目标,默认值: /usr/local
注意!仅在安装到非用户拥有的目录时使用“ sudo”。
(建议)设置suid位以使BTOP始终以root(或其他用户)运行
sudo gmake setuid
sudo
无需查看非用户拥有的流程的信息,并启用信号发送到任何过程。
安装后运行并使用相同的前缀(如果使用时使用)。
将SU_USER
和SU_GROUP
设置为选择用户和组,默认值为root
and wheel
卸载
sudo gmake uninstall
从源DIR中删除任何对象文件
gmake clean
删除所有对象文件,二进制文件和在源代码中创建的目录
gmake distclean
显示帮助
gmake help
安装构建依赖项
需要Clang / GCC,Cmake,Ninja,Lowdown和Git
注意:使用FreeBSD 13运送的LLVM LIBC ++太旧了,无法编译BTOP。
FreeBSD 14及以后:
pkg install cmake ninja lowdown
FreeBSD 13:
pkg install cmake gcc13 ninja lowdown
克隆存储库
git clone https://github.com/aristocratos/btop.git && cd btop
编译
FreeBSD 14及以后:
# Configure
cmake -B build -G Ninja
# Build
cmake --build build
FreeBSD 13:
# Configure
CXX=g++13 cmake -B build -G Ninja
# Build
cmake --build build
这将自动构建版本的BTOP。
传递到配置步骤的一些有用的选项:
配置标志 | 描述 |
---|---|
-DBTOP_STATIC=<ON|OFF> | 启用静态链接(默认为OFF) |
-DBTOP_LTO=<ON|OFF> | 启用链接时间优化(默认情况下) |
-DBTOP_USE_MOLD=<ON|OFF> | 使用模具链接BTOP(默认情况下) |
-DBTOP_PEDANTIC=<ON|OFF> | 编译其他警告(默认情况下) |
-DBTOP_WERROR=<ON|OFF> | 以警告作为错误编译(默认情况下) |
-DBTOP_FORTIFY=<ON|OFF> | 用_FORTIFY_SOURCE=3 检测缓冲区溢出(默认情况下) |
-DCMAKE_INSTALL_PREFIX=<path> | 安装前缀('/usr/local'默认为 |
注意:静态链接不适用于GCC。
要强制任何CXX=<compiler> cmake -B build -G Ninja
编译器
安装
cmake --install build
可能需要根特权
卸载
CMAKE默认情况下不会生成卸载目标。要删除已安装的文件,请运行
cat build/install_manifest.txt | xargs rm -irv
清理构建目录
cmake --build build -t clean
至少需要GCC 10。
请注意,GNU Make( gmake
)需要在NetBSD上进行编译。
安装依赖项
pkg_add gmake gcc10 coreutils git
克隆存储库
git clone https://github.com/aristocratos/btop.git
cd btop
编译
gmake CXXFLAGS= " -DNDEBUG "
制作选项:
旗帜 | 描述 |
---|---|
VERBOSE=true | 显示完整的编译器/链接器命令 |
STATIC=true | 用于静态汇编(仅LIBGCC和LIBSTDC ++) |
QUIET=true | 对于更少的详细输出 |
STRIP=true | 强制剥离调试符号(添加-s 链接标志) |
DEBUG=true | 将Optflags设置为-O0 -g ,并启用更多详细调试记录 |
ARCH=<architecture> | 手动设置目标体系结构 |
FORTIFY_SOURCE=false | 用_FORTIFY_SOURCE=3 禁用强化 |
ADDFLAGS=<flags> | 用于将标志附加到编译器和链接器 |
CXX=<compiler> | 手动设置要使用的编译器 |
示例: gmake ADDFLAGS=-march=native
可能只为您自己的系统编译,可能会给出性能提升。
安装
sudo gmake install
附加PREFIX=/target/dir
设置目标,默认值: /usr/local
注意!仅在安装到非用户拥有的目录时使用“ sudo”。
(建议)设置suid位以使BTOP始终以root(或其他用户)运行
sudo gmake setuid
sudo
无需查看非用户拥有的流程的信息,并启用信号发送到任何过程。
安装后运行并使用相同的前缀(如果使用时使用)。
将SU_USER
和SU_GROUP
设置为选择用户和组,默认值为root
and wheel
卸载
sudo gmake uninstall
从源DIR中删除任何对象文件
gmake clean
删除所有对象文件,二进制文件和在源代码中创建的目录
gmake distclean
显示帮助
gmake help
安装构建依赖项
需要GCC,CMAKE,NINJA和GIT
pkg_add cmake ninja-build gcc10 coreutils git
克隆存储库
git clone https://github.com/aristocratos/btop.git && cd btop
编译
# Configure
cmake -DCMAKE_CXX_COMPILER= " /usr/pkg/gcc10/bin/g++ " -B build -G Ninja
# Build
cmake --build build
这将自动构建版本的BTOP。
传递到配置步骤的一些有用的选项:
配置标志 | 描述 |
---|---|
-DBTOP_LTO=<ON|OFF> | 启用链接时间优化(默认情况下) |
-DBTOP_USE_MOLD=<ON|OFF> | 使用模具链接BTOP(默认情况下) |
-DBTOP_PEDANTIC=<ON|OFF> | 编译其他警告(默认情况下) |
-DBTOP_WERROR=<ON|OFF> | 以警告作为错误编译(默认情况下) |
-DBTOP_FORTIFY=<ON|OFF> | 用_FORTIFY_SOURCE=3 检测缓冲区溢出(默认情况下) |
-DCMAKE_INSTALL_PREFIX=<path> | 安装前缀('/usr/local'默认为 |
要强制任何CXX=<compiler> cmake -B build -G Ninja
编译器
安装
cmake --install build
可能需要根特权
卸载
CMAKE默认情况下不会生成卸载目标。要删除已安装的文件,请运行
cat build/install_manifest.txt | xargs rm -irv
清理构建目录
cmake --build build -t clean
至少需要GCC 10。
请注意,GNU Make( gmake
)需要在OpenBSD上进行编译。
安装依赖项
pkg_add gmake gcc%11 g++%11 coreutils git lowdown
克隆存储库
git clone https://github.com/aristocratos/btop.git
cd btop
编译
gmake CXX=eg++
制作选项:
旗帜 | 描述 |
---|---|
VERBOSE=true | 显示完整的编译器/链接器命令 |
STATIC=true | 用于静态汇编(仅LIBGCC和LIBSTDC ++) |
QUIET=true | 对于更少的详细输出 |
STRIP=true | 强制剥离调试符号(添加-s 链接标志) |
DEBUG=true | 将Optflags设置为-O0 -g ,并启用更多详细调试记录 |
ARCH=<architecture> | 手动设置目标体系结构 |
FORTIFY_SOURCE=false | 用_FORTIFY_SOURCE=3 禁用强化 |
ADDFLAGS=<flags> | 用于将标志附加到编译器和链接器 |
CXX=<compiler> | 手动设置要使用的编译器 |
示例: gmake ADDFLAGS=-march=native
可能只为您自己的系统编译,可能会给出性能提升。
安装
sudo gmake install
附加PREFIX=/target/dir
设置目标,默认值: /usr/local
注意!仅在安装到非用户拥有的目录时使用“ sudo”。
(建议)设置suid位以使BTOP始终以root(或其他用户)运行
sudo gmake setuid
sudo
无需查看非用户拥有的流程的信息,并启用信号发送到任何过程。
安装后运行并使用相同的前缀(如果使用时使用)。
将SU_USER
和SU_GROUP
设置为选择用户和组,默认值为root
and wheel
卸载
sudo gmake uninstall
从源DIR中删除任何对象文件
gmake clean
删除所有对象文件,二进制文件和在源代码中创建的目录
gmake distclean
显示帮助
gmake help
安装构建依赖项
需要GCC,Cmake,Ninja,Lowdown和Git
注意: LLVM的LIBC ++用OpenBSD 7.4运送了太旧,无法编译BTOP。
pkg_add cmake g++%11 git ninja lowdown
克隆存储库
git clone https://github.com/aristocratos/btop.git && cd btop
编译
# Configure
CXX=eg++ cmake -B build -G Ninja
# Build
cmake --build build
这将自动构建版本的BTOP。
传递到配置步骤的一些有用的选项:
配置标志 | 描述 |
---|---|
-DBTOP_LTO=<ON|OFF> | 启用链接时间优化(默认情况下) |
-DBTOP_USE_MOLD=<ON|OFF> | 使用模具链接BTOP(默认情况下) |
-DBTOP_PEDANTIC=<ON|OFF> | 编译其他警告(默认情况下) |
-DBTOP_WERROR=<ON|OFF> | 以警告作为错误编译(默认情况下) |
-DBTOP_FORTIFY=<ON|OFF> | 用_FORTIFY_SOURCE=3 检测缓冲区溢出(默认情况下) |
-DCMAKE_INSTALL_PREFIX=<path> | 安装前缀('/usr/local'默认为 |
要强制任何CXX=<compiler> cmake -B build -G Ninja
编译器
安装
cmake --install build
可能需要根特权
卸载
CMAKE默认情况下不会生成卸载目标。要删除已安装的文件,请运行
cat build/install_manifest.txt | xargs rm -irv
清理构建目录
cmake --build build -t clean
btop
和btop-desktop
。桌面版本要大得多,并且包括允许单击启动btop
所需的桌面条目。安装快照
sudo snap install btop
or
sudo snap install btop-desktop
从边缘频道安装最新的快照
sudo snap install btop --edge
or
sudo snap install btop-desktop --edge
连接接口
sudo snap connect btop:removable-media
or
sudo snap connect btop-desktop:removable-media
所有选项都可以从UI内变化。存储在$XDG_CONFIG_HOME/btop
或$HOME/.config/btop
文件夹中的配置和日志文件
# ? Config file for btop v. 1.2.2
# * Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
# * Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
color_theme = " Default "
# * If the theme set background should be shown, set to False if you want terminal background transparency.
theme_background = True
# * Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
truecolor = True
# * Set to true to force tty mode regardless if a real tty has been detected or not.
# * Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
force_tty = False
# * Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
# * Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
# * Use whitespace " " as separator between different presets.
# * Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
presets = " cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty "
# * Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
# * Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
vim_keys = False
# * Rounded corners on boxes, is ignored if TTY mode is ON.
rounded_corners = True
# * Default symbols to use for graph creation, "braille", "block" or "tty".
# * "braille" offers the highest resolution but might not be included in all fonts.
# * "block" has half the resolution of braille but uses more common characters.
# * "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
# * Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
graph_symbol = " braille "
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_cpu = " default "
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_mem = " default "
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_net = " default "
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_proc = " default "
# * Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
shown_boxes = " proc cpu mem net "
# * Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = 1500
# * Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive",
# * "cpu lazy" sorts top process over time (easier to follow), "cpu responsive" updates top process directly.
proc_sorting = " cpu lazy "
# * Reverse sorting order, True or False.
proc_reversed = False
# * Show processes as a tree.
proc_tree = False
# * Use the cpu graph colors in the process list.
proc_colors = True
# * Use a darkening gradient in the process list.
proc_gradient = True
# * If process cpu usage should be of the core it's running on or usage of the total available cpu power.
proc_per_core = True
# * Show process memory as bytes instead of percent.
proc_mem_bytes = True
# * Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
proc_info_smaps = False
# * Show proc box on left side of screen instead of right.
proc_left = False
# * Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
# * Select from a list of detected attributes from the options menu.
cpu_graph_upper = " total "
# * Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
# * Select from a list of detected attributes from the options menu.
cpu_graph_lower = " total "
# * Toggles if the lower CPU graph should be inverted.
cpu_invert_lower = True
# * Set to True to completely disable the lower CPU graph.
cpu_single_graph = False
# * Show cpu box at bottom of screen instead of top.
cpu_bottom = False
# * Shows the system uptime in the CPU box.
show_uptime = True
# * Show cpu temperature.
check_temp = True
# * Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
cpu_sensor = " Auto "
# * Show temperatures for cpu cores also if check_temp is True and sensors has been found.
show_coretemp = True
# * Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
# * Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
# * Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
# * Example: "4:0 5:1 6:3"
cpu_core_map = " "
# * Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
temp_scale = " celsius "
# * Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
base_10_sizes = False
# * Show CPU frequency.
show_cpu_freq = True
# * Draw a clock at top of screen, formatting according to strftime, empty string to disable.
# * Special formatting: /host = hostname | /user = username | /uptime = system uptime
clock_format = " %H:%M "
# * Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
background_update = True
# * Custom cpu model name, empty string to disable.
custom_cpu_name = " "
# * Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
# * Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
disks_filter = " exclude=/boot "
# * Show graphs instead of meters for memory values.
mem_graphs = True
# * Show mem box below net box instead of above.
mem_below_net = False
# * Count ZFS ARC in cached and available memory.
zfs_arc_cached = True
# * If swap memory should be shown in memory box.
show_swap = True
# * Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk = True
# * If mem box should be split to also show disks info.
show_disks = True
# * Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
only_physical = True
# * Read disks list from /etc/fstab. This also disables only_physical.
use_fstab = False
# * Set to true to show available disk space for privileged users.
disk_free_priv = False
# * Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
show_io_stat = True
# * Toggles io mode for disks, showing big graphs for disk read/write speeds.
io_mode = False
# * Set to True to show combined read/write io graphs in io mode.
io_graph_combined = False
# * Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
# * Example: "/mnt/media:100 /:20 /boot:1".
io_graph_speeds = " "
# * Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
net_download = 100
net_upload = 100
# * Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
net_auto = True
# * Sync the auto scaling for download and upload to whichever currently has the highest scale.
net_sync = False
# * Starts with the Network Interface specified here.
net_iface = " br0 "
# * Show battery stats in top right if battery is present.
show_battery = True
# * Which battery to use if multiple are present. "Auto" for auto detection.
selected_battery = " Auto "
# * Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
# * The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
log_level = " DEBUG "
usage: btop [-h] [-v] [-/+t] [-p <id>] [--utf-force] [--debug]
optional arguments:
-h, --help show this help message and exit
-v, --version show version info and exit
-lc, --low-color disable truecolor, converts 24-bit colors to 256-color
-t, --tty_on force (ON) tty mode, max 16 colors and tty friendly graph symbols
+t, --tty_off force (OFF) tty mode
-p, --preset <id> start with preset, integer value between 0-9
--utf-force force start even if no UTF-8 locale was detected
--debug start in DEBUG mode: shows microsecond timer for information collect
and screen draw functions and sets loglevel to DEBUG
Apache许可证2.0