dca曲线 python_一款基于 Python 语言的 Linux 资源监视器!

本文介绍了开源项目bpytop,它是作者继bashtop后的新作,使用Python编写,支持Linux/OSX/FreeBSD,提供易用的界面、鼠标操作和丰富的功能,如进程管理、网络监控等。还在开发中,可关注GitHub获取更多信息。
摘要由CSDN通过智能技术生成

大家好,我是 JackTian。

还记得前不久给大家推荐的《一款霸榜 GitHub 的开源 Linux 资源监视器!—— bashtop》吗?它是一个用 Bash 编写的 Linux 资源监视器。

昨天刚好闲逛 GitHub,发现这个作者又开源了一款基于 Python 语言的 Linux / OSX / FreeBSD 资源监视器 —— bpytop,其主要作用跟之前的 bashtop 大同小异,用于显示处理器,内存,磁盘,网络和进程的使用情况和状态。

首先我们先来看看 bpytop 资源监视器主界面。

特征

易使用,带有游戏启发的菜单系统;

完全支持鼠标,所有带有突出显示键的按钮均可单击,并且鼠标滚动可在进程列表和菜单框中使用;

快速反应灵敏的 UI,带有 UP,DOWN 键可自行过程选择;

用于显示所选进程的详细统计信息的功能;

具有过滤过程的能力,可输入多个过滤器;

在排序选项之间轻松切换;

将 SIGTERM,SIGKILL,SIGINT 发送到选定的进程;

用于更改所有配置文件选项的 UI 菜单;

网络使用情况的自动缩放图;

如有新版本可用,可在菜单选项中进行显示;

显示磁盘的当前读写速度;

Bpytop 使用与 bashtop 相同的主题文件,因此为 bashtop 制作的任何主题都可以使用。

可根据自己的需求修改及设置 Main 配色,在自定义设置主题时,重新生成一个名为.theme的主题文件并设置默认变量赋值。

#Bashtop theme with default colors and black background

......

# Main background, empty for terminal default, need to be empty if you want transparent background

theme[main_bg]="#00"

# Main text color

theme[main_fg]="#cc"

# Title color for boxes

theme[title]="#ee"

# Higlight color for keyboard shortcuts

theme[hi_fg]="#90"

# Background color of selected item in processes box

theme[selected_bg]="#7e2626"

# Foreground color of selected item in processes box

theme[selected_fg]="#ee"

# Color of inactive/disabled text

theme[inactive_fg]="#40"

# Misc colors for processes box including mini cpu graphs, details memory graph and details status text

theme[proc_misc]="#0de756"

# Cpu box outline color

theme[cpu_box]="#3d7b46"

# Memory/disks box outline color

theme[mem_box]="#8a882e"

# Net up/down box outline color

theme[net_box]="#423ba5"

# Processes box outline color

theme[proc_box]="#923535"

# Box divider line and small boxes line color

theme[div_line]="#30"

# Temperature graph colors

theme[temp_start]="#4897d4"

theme[temp_mid]="#5474e8"

theme[temp_end]="#ff40b6"

# CPU graph colors

theme[cpu_start]="#50f095"

theme[cpu_mid]="#f2e266"

theme[cpu_end]="#fa1e1e"

# Mem/Disk free meter

theme[free_start]="#223014"

theme[free_mid]="#b5e685"

theme[free_end]="#dcff85"

# Mem/Disk cached meter

theme[cached_start]="#0b1a29"

theme[cached_mid]="#74e6fc"

theme[cached_end]="#26c5ff"

# Mem/Disk available meter

theme[available_start]="#292107"

theme[available_mid]="#ffd77a"

theme[available_end]="#ffb814"

# Mem/Disk used meter

theme[used_start]="#3b1f1c"

theme[used_mid]="#d9626d"

theme[used_end]="#ff4769"

# Download graph colors

theme[download_start]="#231a63"

theme[download_mid]="#4f43a3"

theme[download_end]="#b0a9de"

# Upload graph colors

theme[upload_start]="#510554"

theme[upload_mid]="#7d4180"

theme[upload_end]="#dcafde"

更多的主题配色,可通过 Bpytop 项目中的 themes 文件夹查看。

安装

依赖项安装 Linux,使用 python3 和 git 安装

安装 psutil python 模块(可能需要sudo)

# python3 -m pip install psutil

依赖项安装 OSX,用于显示 CPU 温度。

# brew install osx-cpu-temp

手动安装 Linux,OSX 和 FreeBSD

# git clone https://github.com/aristocratos/bpytop.git

# cd bpytop

# sudo make install

命令行选项

USAGE: bpytop [argument]

Arguments:

-m, --mini            Start in minimal mode without memory and net boxes  // 最小模式下启动

-v, --version         Show version info and exit  // 显示版本信息并退出

-h, --help            Show this help message and exit  // 显示此帮助信息并退出

--debug               Start with loglevel set to DEBUG overriding value set in config

由此看来目前 bpytop 还处于开发阶段,接下来,还有很多要去做新功能:

最后贴下该项目 GitHub 地址,大家感兴趣的可前去围观:

https://github.com/aristocratos/bpytop

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值