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