GithubHelp home page GithubHelp logo

bpytop's Introduction

bpytop

Packaging status

Linux OSX FreeBSD Usage Python bpytop_version pypi_version Test Status Donate Sponsor Coffee

bpytopbpytop

Index

News

C++ Version

18 September 2021

btop++

The Linux version of btop++ is complete. Released as version 1.0.0

Get it at https://github.com/aristocratos/btop

The development plan right now:

  • 1.1.0 Mac OsX support
  • 1.2.0 FreeBSD support
  • 1.3.0 Support for GPU monitoring
  • 1.X.0 Other platforms and features...
2 May 2021

I've started work on the third iteration of bashtop->bpytop. It's being written in C++ and will simply be called btop.

I'm aiming at releasing a beta version around August this year and will publish the repo when I've got the core functionality and structure ready for anybody that wanna help out.

This project is gonna take some time until it has complete feature parity with bpytop, since all system information gathering will likely have to be written from scratch without any external libraries. And will need some help in the form of code contributions to get complete support for BSD and OSX.

If you got suggestions of C++ libraries that are multi-platform and are as extensive as psutil are for python, feel free to open up a new thread in Discussions, it could help speed up the development a lot.

Will post any updates about this project here until the repo is made available.

Documents

Description

Resource monitor that shows usage and stats for processor, memory, disks, network and processes.

Python port and continuation of bashtop.

Features

  • Easy to use, with a game inspired menu system.
  • Full mouse support, all buttons with a highlighted key is clickable and mouse scroll works in process list and menu boxes.
  • Fast and responsive UI with UP, DOWN keys process selection.
  • Function for showing detailed stats for selected process.
  • Ability to filter processes, multiple filters can be entered.
  • Easy switching between sorting options.
  • Send SIGTERM, SIGKILL, SIGINT to selected process.
  • UI menu for changing all config file options.
  • Auto scaling graph for network usage.
  • Shows message in menu if new version is available
  • Shows current read and write speeds for disks

Themes

Bpytop uses the same theme files as bashtop so any theme made for bashtop will work.

See themes folder for available themes.

The make install command places the default themes in /usr/local/share/bpytop/themes. If installed with pip3 the themes will be located in a folder called bpytop-themes in the python3 site-packages folder. User created themes should be placed in $HOME/.config/bpytop/themes.

Let me know if you want to contribute with new themes.

Support and funding

You can sponsor this project through github, see my sponsors page for options.

Or donate through paypal or ko-fi.

Any support is greatly appreciated!

Prerequisites

Mac Os X

Will not display correctly in the standard terminal (unless truecolor is set to False)! Recommended alternative iTerm2

Will also need to be run as superuser to display stats for processes not owned by user.

OsX on Apple Silicon (arm) requires psutil version 5.8.0 to work and currently has no temperature monitoring. Upgrade psutil with sudo pip3 install psutil --upgrade

Linux, Mac Os X and FreeBSD

For correct display, a terminal with support for:

  • 24-bit truecolor (See list of terminals with truecolor support)
  • 256-color terminals are supported through 24-bit to 256-color conversion when setting "truecolor" to False in the options or with "-lc/--low-color" argument.
  • Wide characters (Are sometimes problematic in web-based terminals)

Also needs a UTF8 locale and a font that covers:

  • Unicode Block “Braille Patterns” U+2800 - U+28FF
  • Unicode Block “Geometric Shapes” U+25A0 - U+25FF
  • Unicode Block "Box Drawing" and "Block Elements" U+2500 - U+259F

Notice (Text rendering issues)

If you are having problems with the characters in the graphs not looking like they do in the screenshots, it's likely a problem with your systems configured fallback font not having support for braille characters.

See Terminess Powerline for an example of a font that includes the braille symbols.

See comments by @sgleizes link and @XenHat link in issue #100 for possible solutions.

If text are misaligned and you are using Konsole or Yakuake, turning off "Bi-Directional text rendering" is a possible fix.

Characters clipping in to each other or text/border misalignments is not bugs caused by bpytop, but most likely a fontconfig or terminal problem where the braille characters making up the graphs aren't rendered correctly. Look to the creators of the terminal emulator you use to fix these issues if the previous mentioned fixes don't work for you.

Notice (SSH)

Dropbear seems to not be able to set correct locale. So if accessing bpytop over ssh, OpenSSH is recommended.

Dependencies

Python3 (v3.7 or later)

psutil module (v5.7.0 or later)

Optionals for additional stats

(Optional OSX) coretemp (recommended), or osx-cpu-temp (less accurate) needed to show CPU temperatures.

Screenshots

Main UI showing details for a selected process. Screenshot 1

Main UI in mini mode. Screenshot 2

Main menu. Screenshot 3

Options menu. Screenshot 4

Installation

I only maintain the PyPi package, so will not take responsibility for issues caused by any other install method!

PyPi (will always have latest version)

Install or update to latest version

pip3 install bpytop --upgrade

Mac OsX

Install with Homebrew

brew install bpytop

Optional coretemp (Shows temperatures for cpu cores)

brew install hacker1024/hacker1024/coretemp

Alternatively install with MacPorts

port install bpytop

OsX on Apple Silicon (arm) requires psutil version 5.8.0 to work and currently has no temperature monitoring. Upgrade psutil with sudo pip3 install psutil --upgrade

Arch Linux

Available in the Arch Linux [community] repository as bpytop

Installation

sudo pacman -S bpytop

Debian based

Available in official Debian repository since Debian 11

Installation

sudo apt install bpytop

Available for debian/ubuntu from Azlux's repository

FreeBSD package

Available in FreeBSD ports

Install pre-built package

sudo pkg install bpytop

Fedora/CentOS 8 package

Available in the Fedora and EPEL-8 repository.

Installation

sudo dnf install bpytop

Gentoo / Calculate Linux

Available from adrien-overlay

Installation

sudo emerge -av sys-process/bpytop

Mageia Cauldron (Mageia 8)

Available in Mageia Cauldron and then Mageia 8 when it is released.

Installation

sudo urpmi bpytop
sudo dnf install bpytop

MX Linux

Available in the MX Test Repo as bpytop Please use MX Package Installer MX Test Repo tab to install.

http://mxrepo.com/mx/testrepo/pool/test/b/bpytop/

Void Linux

Available in void repo and void-packages ports tree

Installation

sudo xbps-install bpytop

Snap package

(Note! There is some issues caused by the snap sandboxing)

by @kz6fittycent

https://github.com/kz6fittycent/bpytop-snap

Install the package

sudo snap install bpytop

The config folder will be located in ~/snap/bpytop/current/.config/bpytop

Manual installation

Dependencies installation Linux

Install python3 and git with a package manager of you choice

Install psutil python module (sudo might be required)

python3 -m pip install psutil

Dependencies installation OSX

Install homebrew if not already installed

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install python3 if not already installed

brew install python3 git

Install psutil python module

python3 -m pip install psutil

Install optional dependency coretemp (recommended), or osx-cpu-temp (less accurate)

brew install hacker1024/hacker1024/coretemp
brew install osx-cpu-temp

Dependencies installation FreeBSD

Install with pkg and pip

sudo pkg install git python3 py37-psutil

Manual installation Linux, OSX and FreeBSD

Clone and install

git clone https://github.com/aristocratos/bpytop.git
cd bpytop
sudo make install

to uninstall it

sudo make uninstall

Configurability

All options changeable from within UI. Config files stored in "$HOME/.config/bpytop" folder

bpytop.cfg: (auto generated if not found)

"/etc/bpytop.conf" will be used as default seed for config file creation if it exists. ("/usr/local/etc/bpytop.conf" on BSD)

#? Config file for bpytop v. 1.0.64

#* Color theme, looks for a .theme file in "/usr/[local/]share/bpytop/themes" and "~/.config/bpytop/themes", "Default" for builtin default theme.
#* Prefix name by a plus sign (+) for a theme located in user themes folder, i.e. color_theme="+monokai"
color_theme="monokai"

#* If the theme set background should be shown, set to False if you want terminal background transparency
theme_background=False

#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
truecolor=True

#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
shown_boxes="cpu mem net proc"

#* Update time in milliseconds, increases automatically if set below internal loops processing time, recommended 2000 ms or above for better sample times for graphs.
update_ms=2000

#* Processes update multiplier, sets how often the process list is updated as a multiplier of "update_ms".
#* Set to 2 or higher to greatly decrease bpytop cpu usage. (Only integers)
proc_update_mult=2

#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive",
#* "cpu lazy" updates top process over time, "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

#* Which depth the tree view should auto collapse processes at
tree_depth=3

#* 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=False

#* Show process memory as bytes instead of percent
proc_mem_bytes=True

#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available, see:
#* https://psutil.readthedocs.io/en/latest/#psutil.cpu_times for attributes available on specific platforms.
#* 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, see:
#* https://psutil.readthedocs.io/en/latest/#psutil.cpu_times for attributes available on specific platforms.
#* 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

#* Shows the system uptime in the CPU box.
show_uptime=True

#* Check cpu temperature, needs "osx-cpu-temp" on MacOS X.
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

#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine"
temp_scale="celsius"

#* Show CPU frequency, can cause slowdowns on certain systems with some versions of psutil
show_cpu_freq=True

#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
draw_clock="%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 a comma ",".
#* 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

#* 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=True

#* Toggles if io stats should be shown in regular disk usage view
show_io_stat=True

#* Toggles io mode for disks, showing only 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 (10 by default), use format "device:speed" separate disks with a comma ",".
#* Example: "/dev/sda:100, /dev/sdb:20"
io_graph_speeds=""

#* Set fixed values for network graphs, default "10M" = 10 Mibibytes, possible units "K", "M", "G", append with "bit" for bits instead of bytes, i.e "100mbit"
net_download="100Mbit"
net_upload="100Mbit"

#* Start in network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
net_auto=True

#* Sync the scaling for download and upload to whichever currently has the highest scale
net_sync=False

#* If the network graphs color gradient should scale to bandwidth usage or auto scale, bandwidth usage is based on "net_download" and "net_upload" values
net_color_fixed=False

#* Starts with the Network Interface specified here.
net_iface="br0"

#* Show battery stats in top right if battery is present
show_battery=True

#* Show init screen at startup, the init screen is purely cosmetical
show_init=False

#* Enable check for new version from github.com/aristocratos/bpytop at start.
update_check=True

#* Set loglevel for "~/.config/bpytop/error.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

Command line options:

usage: bpytop.py [-h] [-b BOXES] [-lc] [-v] [--debug]

optional arguments:
  -h, --help            show this help message and exit
  -b BOXES, --boxes BOXES
                        which boxes to show at start, example: -b "cpu mem net proc"
  -lc, --low-color      disable truecolor, converts 24-bit colors to 256-color
  -v, --version         show version info and exit
  --debug               start with loglevel set to DEBUG overriding value set in config

LICENSE

Apache License 2.0

bpytop's People

Contributors

aaaaadrien avatar aethanfoot avatar araczkowski avatar aristocratos avatar brhal avatar carewdavid avatar caughtquick avatar cclauss avatar cjolowicz avatar daissi avatar dpshelio avatar drazil100 avatar erwinjunge avatar gerbenwelter avatar hacker1024 avatar hecodes2much avatar kekepower avatar kyli0x-backup avatar lwhsu avatar naelsondouglas avatar notjedi avatar pietryszak avatar rcristiano avatar redbearak avatar rohithill avatar svetlemodry avatar swamprabbit avatar thecomputerguy96 avatar tim77 avatar umarj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bpytop's Issues

[REQUEST] Allow abriviating CoreXX to XX

Is your feature request related to a problem? Please describe.

With many cores or very constraint space, the CPU list uses a lot of extra space for CoreXX and starts to look unpleasant/confusing. Sometimes the C of Celsius and the C of Core and up being directly next to each other.

Describe the solution you'd like

Being able to abbreviate the CoreXX to a 2 (or 3) digit number would save some space

Describe alternatives you've considered

  • cXX would be an alternative solution
  • this could, instead of a config option be an automatic option when space gets tight
  • It would be possible to just not show core number at all

Additional context
here an image (this looks kind of broken to me)

image

[BUG] Up does nothing after you open info until you press down or close info

Once you open the info of a process the selection bar disappears. In this state pressing down brings back the selection bar on the row below where it was when you opened the process info. Pressing up in this state doesn't do anything. Once the selection bar is on screen again you can navigate normally.

This is probably a holdover from before it started remembering your position in the proc list.

[REQUEST]

Adding Docker Support
Most of the platform issues can be resolved by providing Docker support for the application.

Dockerize the application
Create a Dockerfile which will be a one step and easy way to execute the application. Also provide the necessary documentation for the same.

Bpytop high CPU usage [BUG]

Describe the bug

bpytop creates a python 3 process that consumes 90% of a single CPU core or 90% combined across 2 CPU cores

To Reproduce

Start bpytop as normal

Expected behavior

bpytop to not run using a single core so heavily.

Screenshots

image

Info (please complete the following information):

  • bpytop version: 1.0.10
  • psutil version: `5.7.2
  • (Linux) Linux distribution and version: Arch w/ kernel 5.7.12-arch1-1 x86_64
  • Terminal used: Kitty
  • Font used: MesloLGS NF 10pt
  • Python version: 3.8.5

Additional context

contents of ~/.config/bpytop/error.log

(try running bpytop with --debug flag if error.log is empty)

error.log was empty. When running with debug flag no issues show

11/08/20 (11:19:41) | INFO: New instance of bpytop version 1.0.10 started with pid 53308
11/08/20 (11:19:41) | INFO: Loglevel set to WARNING
11/08/20 (11:19:41) | DEBUG: Using psutil version 5.7.2
11/08/20 (11:19:41) | DEBUG: CMD: /usr/bin/bpytop --debug
11/08/20 (11:19:46) | DEBUG: Collect and draw completed in 2.244664 seconds
11/08/20 (11:19:48) | DEBUG: Init completed in 6.378906 seconds

[BUG] Permission denied: '/proc/partitions' in snap version (Solved: Reading the snap instructions)

Describe the bug

In snap (ver. 1.0.2 of 2020-08-04) Exits after initial checks with a PermissionError: [Errno 13] Permission denied: '/proc/partitions'

To Reproduce

snap install bpytop
bpytop
cat ~/snap/bpytop/58/.config/bpytop/error.log

Expected behavior

Start functioning and then show the graphics without crashing.

Screenshots

Only ascii in the issue, after breaking at 86% at startup "Collecting...":

$ bpytop 
Bpytop exited with errorcode (1). See ~/snap/bpytop/58/.config/bpytop/error.log for more information!

Info (please complete the following information):

  • bpytop version: 1.0.2

  • psutil version: 5.4.2 inside the snap (version 5.7.0 or above is required) ⚠️ 🤔 Maybe the bug is here?

  • psutil version: bpytop -v (version 5.7.0 or above is required)

  • (Linux) Linux distribution and version: Ubuntu 16.04.7 LTS (snap based in core18)

  • Terminal used: GNOME Terminal 3.18.3

  • Font used:

  • Python version, python3 --version (version 3.6 or above is required): No idea on ow to look in the snap

# snap info bpytop 
name:      bpytop
summary:   A Python-based resource monitor for your terminal
publisher: James Tigert (kz6fittycent)
store-url: https://snapcraft.io/bpytop
contact:   https://github.com/kz6fittycent/bpytop-snap
license:   Apache-2.0
description: ...
commands:
  - bpytop
snap-id:      iH0DT1txUogChVISBwaxXrKZVCXifuTL
tracking:     latest/stable
refresh-date: today at 11:26 CEST
channels:
  latest/stable:    1.0.2 2020-08-04 (58) 9MB -
  latest/candidate: 
  latest/beta:      
  latest/edge:      1.0.2 2020-08-04 (58) 9MB -
installed:          1.0.2            (58) 9MB -

Additional context

contents of ~/.config/bpytop/error.log

$ cat ~/snap/bpytop/58/.config/bpytop/error.log
08/08/20 (11:31:08) | ERROR: Data collection thread failed with exception: [Errno 13] Permission denied: '/proc/partitions'
Traceback (most recent call last):
  File "/snap/bpytop/58/usr/bin/bpytop", line 2319, in _runner
    collector._collect()
  File "/snap/bpytop/58/usr/bin/bpytop", line 2602, in _collect
    io_counters = psutil.disk_io_counters(perdisk=True if SYSTEM == "Linux" else False, nowrap=True)
  File "/snap/bpytop/58/usr/lib/python3/dist-packages/psutil/__init__.py", line 2014, in disk_io_counters
    rawdict = _psplatform.disk_io_counters()
  File "/snap/bpytop/58/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1040, in disk_io_counters
    partitions = get_partitions()
  File "/snap/bpytop/58/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1022, in get_partitions
    with open_text("%s/partitions" % get_procfs_path()) as f:
  File "/snap/bpytop/58/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 201, in open_text
    return open(fname, "rt", **kwargs)
PermissionError: [Errno 13] Permission denied: '/proc/partitions'
08/08/20 (11:31:08) | WARNING: Exiting with errorcode (1). Runtime 0:00:08 

[BUG] Error: Permission denifed: '/proc/partitions'

Describe the bug

[A clear and concise description of what the bug is.]

I'm getting the error: permission denied: '/proc/partitions'
Full error:

04/08/20 (16:36:52) | ERROR: Data collection thread failed with exception: [Errno 13] Permission denied: '/proc/partitions'
Traceback (most recent call last):
File "/snap/bpytop/26/usr/local/bin/bpytop", line 2313, in _runner
collector._collect()
File "/snap/bpytop/26/usr/local/bin/bpytop", line 2579, in _collect
io_counters = psutil.disk_io_counters(perdisk=True if SYSTEM == "Linux" else False, nowrap=True)
File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/init.py", line 2014, in disk_io_counters
rawdict = _psplatform.disk_io_counters()
File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1040, in disk_io_counters
partitions = get_partitions()
File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1022, in get_partitions
with open_text("%s/partitions" % get_procfs_path()) as f:
File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 201, in open_text
return open(fname, "rt", **kwargs)
PermissionError: [Errno 13] Permission denied: '/proc/partitions'
04/08/20 (16:36:52) | WARNING: Exiting with errorcode (1). Runtime 0:00:03

To Reproduce

  1. Install bpytop by running: sudo snap install bpytop
  2. In a terminal, launch bpytop with bpytop.
  3. It will start running, and then crash at the stage that's one after data collection and drawer something (it's too fast for me to see and the error log doesn't say at which staged it crashed).
    *Note: The error is logged in the log file at: /snap/bpytop/26/.config/bpytop/error.log (for me, at least)

Expected behavior

For the application to finish booting up properly.

Info (please complete the following information):

  • bpytop version: 1.0.1
  • psutil version: bpytop -v (version 5.7.0 or above is required) - 5.4.2, even though I installed on my system v5.7.2 (latest at the time of writing this)
  • (Linux) Linux distribution and version:
  • (OSX/FreeBSD) Os release version: Kubuntu 20.04
  • Terminal used: Konsole
  • Font used: FiraCode Nerd Font
  • Python version, python3 --version (version 3.6 or above is required): 3.8.2

Additional context

contents of ~/.config/bpytop/error.log (installed bpytop via snap so the error log's path for me is ~/snap/bpytop/26/.config/bpytop/error.log):

04/08/20 (16:36:52) | ERROR: Data collection thread failed with exception: [Errno 13] Permission denied: '/proc/partitions'
Traceback (most recent call last):
  File "/snap/bpytop/26/usr/local/bin/bpytop", line 2313, in _runner
    collector._collect()
  File "/snap/bpytop/26/usr/local/bin/bpytop", line 2579, in _collect
    io_counters = psutil.disk_io_counters(perdisk=True if SYSTEM == "Linux" else False, nowrap=True)
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/__init__.py", line 2014, in disk_io_counters
    rawdict = _psplatform.disk_io_counters()
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1040, in disk_io_counters
    partitions = get_partitions()
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1022, in get_partitions
    with open_text("%s/partitions" % get_procfs_path()) as f:
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 201, in open_text
    return open(fname, "rt", **kwargs)
PermissionError: [Errno 13] Permission denied: '/proc/partitions'
04/08/20 (16:36:52) | WARNING: Exiting with errorcode (1). Runtime 0:00:03 

04/08/20 (16:37:00) | ERROR: Data collection thread failed with exception: [Errno 13] Permission denied: '/proc/partitions'
Traceback (most recent call last):
  File "/snap/bpytop/26/usr/local/bin/bpytop", line 2313, in _runner
    collector._collect()
  File "/snap/bpytop/26/usr/local/bin/bpytop", line 2579, in _collect
    io_counters = psutil.disk_io_counters(perdisk=True if SYSTEM == "Linux" else False, nowrap=True)
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/__init__.py", line 2014, in disk_io_counters
    rawdict = _psplatform.disk_io_counters()
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1040, in disk_io_counters
    partitions = get_partitions()
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1022, in get_partitions
    with open_text("%s/partitions" % get_procfs_path()) as f:
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 201, in open_text
    return open(fname, "rt", **kwargs)
PermissionError: [Errno 13] Permission denied: '/proc/partitions'
04/08/20 (16:37:00) | WARNING: Exiting with errorcode (1). Runtime 0:00:03 

04/08/20 (16:48:27) | ERROR: Data collection thread failed with exception: [Errno 13] Permission denied: '/proc/partitions'
Traceback (most recent call last):
  File "/snap/bpytop/26/usr/local/bin/bpytop", line 2313, in _runner
    collector._collect()
  File "/snap/bpytop/26/usr/local/bin/bpytop", line 2579, in _collect
    io_counters = psutil.disk_io_counters(perdisk=True if SYSTEM == "Linux" else False, nowrap=True)
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/__init__.py", line 2014, in disk_io_counters
    rawdict = _psplatform.disk_io_counters()
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1040, in disk_io_counters
    partitions = get_partitions()
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1022, in get_partitions
    with open_text("%s/partitions" % get_procfs_path()) as f:
  File "/snap/bpytop/26/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 201, in open_text
    return open(fname, "rt", **kwargs)
PermissionError: [Errno 13] Permission denied: '/proc/partitions'
04/08/20 (16:48:27) | WARNING: Exiting with errorcode (1). Runtime 0:00:03 

"rawdict = _psplatform.disk_io_counters()" raises ValueError "not sure how to interpret line"

Upon startup, i see the intro screen (r'ly?) and it quickly bails out with:

03/08/20 (16:21:32) | ERROR: Data collection thread failed with exception: not sure how to interpret line ' 8 0 sda 61540896 14301543 2070222521 18032078 107627996 33672188 4122914856 94277324 0 74681256 32698424 0 0 0 0\n'
Traceback (most recent call last):
File "./bpytop.py", line 2315, in _runner
collector._collect()
File "./bpytop.py", line 2578, in _collect
io_counters = psutil.disk_io_counters(perdisk=True if SYSTEM == "Linux" else False, nowrap=True)
File "/usr/lib/python3/dist-packages/psutil/init.py", line 2013, in disk_io_counters
rawdict = _psplatform.disk_io_counters()
File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1081, in disk_io_counters
raise ValueError("not sure how to interpret line %r" % line)
ValueError: not sure how to interpret line ' 8 0 sda 61540896 14301543 2070222521 18032078 107627996 33672188 4122914856 94277324 0 74681256 32698424 0 0 0 0\n'
03/08/20 (16:21:32) | WARNING: Exiting with errorcode (1). Runtime 0:00:03

Need any more data?

Got error at startup: KeyError: 'eth0:0'

03/08/20 (12:17:12) | ERROR: Data collection thread failed with exception: 'eth0:0'
Traceback (most recent call last):
  File "./bpytop.py", line 2315, in _runner
    collector._collect()
  File "./bpytop.py", line 2719, in _collect
    cls._get_nics()
  File "./bpytop.py", line 2691, in _get_nics
    for nic in sorted(psutil.net_if_addrs(), key=lambda nic: (io_all[nic].bytes_recv + io_all[nic].bytes_sent), reverse=True):
  File "./bpytop.py", line 2691, in <lambda>
    for nic in sorted(psutil.net_if_addrs(), key=lambda nic: (io_all[nic].bytes_recv + io_all[nic].bytes_sent), reverse=True):
KeyError: 'eth0:0'
03/08/20 (12:17:12) | WARNING: Exiting with errorcode (1). Runtime 0:00:03 

[BUG] Crashing

Describe the bug

bpytop crashes while starting it up!

To Reproduce

Running bpytop in terminal crashes it at "Collecting data" stage

Expected behavior
bpytop not crashing

Screenshots

None

Info (please complete the following information):

  • bpytop version: bpytop version: 1.0.12
  • psutil version: psutil version: 5.7.2
  • (Linux) Linux distribution and version: Pop!_OS 20.04 LTS x86_64
  • (OSX/FreeBSD) Os release version: NA
  • Terminal used: Alacritty
  • Font used: Hack Nerd Font (Patched)
  • Python version, Python 3.8.5

Additional context
When I first installed bpytop it worked flawlessly, but today it crashes... And when I run the mini version: bpytop -m it works fine...

Error log

12/08/20 (13:39:47) | ERROR: Data collection thread failed with exception: Sign not allowed in string format specifier
Traceback (most recent call last):
  File "/usr/local/bin/bpytop", line 2367, in _runner
    collector._draw()
  File "/usr/local/bin/bpytop", line 3186, in _draw
    ProcBox._draw_fg()
  File "/usr/local/bin/bpytop", line 2155, in _draw_fg
    label = (f'{THEME.title}{Fx.b}{Mv.to(y, x)}{"Pid:":>7} {"Program:" if prog_len > 8 else "Prg:":<{prog_len}}' + (f'{"Arguments:":<{arg_len-4}}' if arg_len else "") +
ValueError: Sign not allowed in string format specifier
12/08/20 (13:39:47) | WARNING: Exiting with errorcode (1). Runtime 0:00:03

[BUG] Memory bar does not account for 100%

Describe the bug
The right edge of the bar overlaps the 1 in "100%"

Screenshot from 2020-08-04 08-09-56

(double checked and this is a bashtop problem too)

Edit: I just checked and it seems to be a problem with my font choice (Ubuntu Mono). Do you have a recommended font?

[BUG] Correct Core Numbering

Describe the bug

CPU cores are listed as "Core1", "Core2", etc..

No (modern, or any, that I'm aware of) AMD or Intel CPU numbers their cores starting from 1; they all start from 0.
For example, on my system, running lscpu displays:

CPU(s):                          24
On-line CPU(s) list:             0-23

Yet bpytop lists "Core1" .. "Core24".

This misnumbering is unexpected and makes correlating with other monitoring tools difficult and error-prone.

To Reproduce

Run bpytop and look at CPU widget.

Expected behavior

CPU cores should be listed accurately, as "Core0", "Core1", etc.; or there should at least be a display option for switching between "correct" and "human-friendly" mode or similar.

Info (please complete the following information):

  • bpytop version: 1.0.3
  • psutil version: 5.5.1
  • (Linux) Linux distribution and version: Ubuntu 20.04
  • Terminal used: Gnome
  • Font used: monospace regular
  • Python version: 3.8.2

Additional context

not applicable

[BUG] tree and info on a proc crashes

if i am in tree mode and select info on a proc it crashes or if i select info on a proc then go into tree view
error log says

03/08/20 (19:08:03) | ERROR: type NoneType doesn't define round method
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 2440, in _collect_temps
cls.cpu_temp_high, cls.cpu_temp_crit = round(entry.high), round(entry.critical)
TypeError: type NoneType doesn't define round method
03/08/20 (19:08:13) | ERROR: Data collection thread failed with exception: 'cmd'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 2319, in _runner
collector._collect()
File "/usr/local/bin/bpytop", line 2934, in _collect
cls.details["cmdline"] = cls.processes[c_pid]["cmd"]
KeyError: 'cmd'
03/08/20 (19:08:13) | WARNING: Exiting with errorcode (1). Runtime 0:00:13

[BUG] Crashes when show_disks=False

Describe the bug

Crashes when restarting bpytop with "Show disk" is disabled

To Reproduce

  1. rm -rf ~/.config/bpytop
  2. Start bpytop
  3. Set "Show disk" to False
  4. Exit bpytop
  5. Start bpytop: Bpytop exited with errorcode (1)

Info (please complete the following information):

  • bpytop version: 1.0.6
  • psutil version: 5.6.7
  • Python version: 3.8.5

Additional context

Traceback (most recent call last):
  File "Applications/bpytop", line 2630, in _collect
    io_counters = psutil.disk_io_counters(perdisk=True if SYSTEM == "Linux" else False, nowrap=True)
  File "/usr/lib64/python3.8/site-packages/psutil/__init__.py", line 2168, in disk_io_counters
    rawdict = _psplatform.disk_io_counters(**kwargs)
  File "/usr/lib64/python3.8/site-packages/psutil/_pslinux.py", line 1125, in disk_io_counters
    for entry in gen:
  File "/usr/lib64/python3.8/site-packages/psutil/_pslinux.py", line 1098, in read_procfs
    raise ValueError("not sure how to interpret line %r" % line)
ValueError: not sure how to interpret line ' 259       0 nvme0n1 71111 19806 3610632 14338 113525 86192 5716165 121101 0 68165 154621 0 0 0 0 5919 19181\n'
06/08/20 (10:34:51) | ERROR: Data collection thread failed with exception: type object 'MemCollector' has no attribute 'disks'
Traceback (most recent call last):
  File "Applications/bpytop", line 2338, in _runner
    collector._draw()
  File "Applications/bpytop", line 2725, in _draw
    MemBox._draw_fg()
  File "Applications/bpytop", line 1672, in _draw_fg
    if len(mem.disks) * 3 <= h + 1:
AttributeError: type object 'MemCollector' has no attribute 'disks'
06/08/20 (10:34:51) | WARNING: Exiting with errorcode (1). Runtime 0:00:03 

[BUG] ERROR: list index out of range

03/08/20 (17:31:03) | ERROR: list index out of range
Traceback (most recent call last):
  File "./bpytop.py", line 2442, in _collect_temps
    cls.cpu_temp[THREADS // 2 + n].append(t)
IndexError: list index out of range

Fix:

--- bpytop.py.orig      2020-08-03 18:17:37.982721770 +0300
+++ bpytop.py   2020-08-03 18:16:07.183272634 +0300
@@ -2437,7 +2437,7 @@
                                if len(cores) < THREADS:
                                        if cpu_type == "intel" or (cpu_type == "other" and len(cores) == THREADS // 2):
                                                cls.cpu_temp[0].append(temp)
-                                               for n, t in enumerate(cores, start=1):
+                                               for n, t in enumerate(cores, start=0):
                                                        cls.cpu_temp[n].append(t)
                                                        cls.cpu_temp[THREADS // 2 + n].append(t)
                                        elif cpu_type == "ryzen" or cpu_type == "other":

Bring back shiftless control.

I much preferred when all of the controls were all lowercase and if two actions shared a first letter a different letter of the second action was chosen. (E.g. terminate and tree)

Call me lazy but I like pressing one key instead of 2.

Old   New   Action
 m     m    menu
 f     f    filter
 c    del   clear filter
 r     R    reverse
 e     T    tree
 t     t    terminate
 k     k    kill
 i     i    interrupt
 b     b    back network device
 n     n    next network device
       M    mini
       g    graph
       s    swap
       C    colors
       G    gradient
       P    per-core
       z    zero

After making this list I have a couple takeaways.

  1. I don't see why colors and gradient need a shortcut to toggle. Maybe other people are switching back and forth more than I think but these are more style preferences and are wasting screen real-estate. I am not particularly bothered by them requiring shift to activate if they do need shortcuts.
  2. Reverse, Colors, and Per-Core have no reason to require shift other than to match the formatting of the other surrounding actions. As stated above I don't think Colors and Gradient really need quick toggles so if they were removed that would only leave M and T as required capital letters to have the key match the first letter of the action.
  3. switching between tree and not tree is something I do frequently and having to hold shift to toggle the option is going to be a bit annoying. I much preferred e for that option. If a convention has to be broken id prefer the convention that doesn't require me to push additional keys be broken.

I don't really know what you would do with mini. All of its letters are taken by other actions.

[BUG] 0.0% in info when you cant see the process

sourta related to #21 ig
if you select something hit info then search for something thats not it repots cpu as 0.0%
image

i should prob use this
bpytop version: 1.0.5
psutil version: 5.7.2

(Linux) Linux distribution and version: arch linux
Terminal used: alacritty
Font used: noto sans mono 14
Python version, Python 3.8.5

[REQUEST] Give the background of percentage bars their own color in the theme.

As mentioned in #54 the labels for uptime and network ranges are too dark however they can't reasonably be brightened up without also brightening up the backgrounds of percentage bars.

As a result I am forced to make a choice between this where the labels are hard to read...
Screenshot from 2020-08-11 05-32-53

and something else where the bars backgrounds are much brighter that doesn't look as good but I can actually read the text.

[BUG] UI becomes misaligned with use

Describe the bug

When bpytop has been running for a few minutes, the text and borders become misaligned and the app becomes hard to read. Here is a screen shot:

image

Info (please complete the following information):

  • bpytop version: 1.0.7
  • psutil version: 5.7.0
  • (Linux) Linux distribution and version: Debian 9 in ChromeOS via Crostiini
  • Terminal used: Crostini terminal on Chrome
  • Python version, 3.7.7

[REQUEST] Tree mode processes with sort

When filtering processes by tree mode, is it possible to sort by the memory or cpu of the parent process? For example chrome always spawns like 20 different processes, would it be possible in tree mode to group all of their memory and cpu consumption together?

[REQUEST] Remove min width and height requirements

Is your feature request related to a problem? Please describe.
For now I'm unable to make terminal workspace with width less than 80 (in what unit this size is?) and height less than 24. I'm pretty sure there shouldn't be any limitation because if something not fully visible it's up on a user.

Describe the solution you'd like
The solution would be to make possible to sort/add/remove columns if you want to view only usaful info that can be viewed in small window. But the main goal is to remove limitation of min width/height.

Describe alternatives you've considered
No alternatives

Additional context
The min width/height requirements shows up when I try to make terminal workspace smaller. I'm aware that this way can give me a small picture of information but it's what I need to see actually

Feature request: site-wide config file in /etc

Currently the config is read from "$HOME/.config/bpytop/bashtop.cfg" and if that does not exist, build-in default values are used.

It would be nice if there was a check for a side-wide /etc/bashtop.cfg or /etc/bpytop/bashtop.cfg and if found, that would be used.

If there are a lot of different users on a machine, it would give them the preferred site-wide default config without them having to manually configure it.

[REQUEST] Icon and .desktop file to launch bpytop from Gnome or other desktops

I'd like to suggest that there is an icon and .desktop file created with the package so end uses can launch bpytop from the desktop. Presently HTOP does something similar.

I created the attached instructions and files to support this in Gnome. The Icon needs some work.

Thank you for the awesome tool.

BPYTOP.desktop
[Desktop Entry]
Version=1.0
Type=Application
Comment=Show System Processes
Name=BPYTOP
Icon=/usr/share/pixmaps/BPYTOPlogo.png
Exec=bpytop
Categories=ConsoleOnly;System;
GenericName=Process Viewer
Terminal=true
StartupNotify=true

BPYTOPlogo
Install BPYTOP.txt

[BUG] Bpytop doesn't show temps on RPi4

Hardware: Raspberry Pi 4B 8GB
Software: Twister OS 1.5 (basically just a skin on top of Raspbian 32-bit)

Bpytop doesn't show CPU temps for me on this platform, which is odd because Bashtop shows the temps just fine on the same machine. Doesn't seem to be a problem with the menu setting.

Screenshot (Bashtop left, Bpytop right):

Screenshot_2020-08-08_16-00-59

[REQUEST] Memory usage in megabytes instead of percents

Is your feature request related to a problem? Please describe.
I couldn't find a way to show memory usage in megabytes, only percents. I know that I can view in megabytes once I choose a process but it's not a solution when I want to see all processes' memory in MBs.

Describe the solution you'd like
I would like to see a new column that shows memory usage in MBs with ability to resort/remove/re-add existing columns such as memory usage in percents. This will also give a possibility to make min required width of a window lower than 80 but let's leave this task to another issue. For now sorting/removing/adding columns with ability to select memory in MBs would be awesome

Describe alternatives you've considered
There are no alternatives:)

I'm just using your application since today but it looks promissing! Thanks

[BUG] Crash:

Bpytop exited with errorcode (1). See /Users/jakobbg/.config/bpytop/error.log for more information!

Expected behavior

bpytop not crashing

Info (please complete the following information):

$ ./bpytop.py -v
bpytop version: 1.0.8
psutil version: 5.7.2
$ uname -a
Darwin bzzzt.local 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul  5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64
  • Terminal used: iTerm Build 3.4.0beta2

  • Font used: Inconsolata for PowerLine

  • Python version: Python 3.8.5

contents of ~/.config/bpytop/error.log:

11/08/20 (07:54:14) | ERROR: Data collection thread failed with exception: list index out of range
Traceback (most recent call last):
  File "./bpytop.py", line 2366, in _runner
    collector._draw()
  File "./bpytop.py", line 2562, in _draw
    CpuBox._draw_fg()
  File "./bpytop.py", line 1556, in _draw_fg
    out += (f'{THEME.inactive_fg} ⡀⡀⡀⡀⡀{Mv.l(5)}{THEME.gradient["temp"][cpu.cpu_temp[0][-1]]}{Graphs.temps[0](None if cls.resized else cpu.cpu_temp[0][-1])}'
IndexError: list index out of range
11/08/20 (07:54:16) | WARNING: Exiting with errorcode (1). Runtime 1 day, 0:09:22

bpytop crashes when using left/right errors repeatedly on OSX

Just installed bpytop and followed the procedures to add all of the required dependencies. When using the program, it seems fine for a bit until I use the left/right arrows to manipulate the process tree. Then it suddenly crashes. The excerpt from the error log is below:

10/08/20 (11:22:33) | ERROR: Data collection thread failed with exception: '<' not supported between instances of 'float' and 'str' Traceback (most recent call last): File "/usr/local/bin/bpytop", line 2365, in _runner collector._collect() File "/usr/local/bin/bpytop", line 2947, in _collect for p in sorted(psutil.process_iter(cls.p_values + ["memory_info"] if CONFIG.proc_mem_bytes else [], err), key=lambda p: eval(sort_cmd), reverse=reverse): TypeError: '<' not supported between instances of 'float' and 'str' 10/08/20 (11:22:35) | WARNING: Exiting with errorcode (1). Runtime 0:01:30

[REQUEST] Please brighten and move the uptime indicator

Screen Shot 2020-08-10 at 1 31 25 PM

I have a lot of fairly old laptops and screens on which I've been using both bashtop and now bpytop. They don't have the best contrast anymore, even the ones that started out as a world-class Apple IPS panel. So for a long time I kept wondering why there was a weird glitch in the bottom left CPU graph.

In other words, the font color of the uptime indicator is so dark that until I squinted at it up close on a better monitor, I couldn't tell there was anything there but a group of black squares interfering with the CPU graph rendering.

Please consider making the uptime indicator at least as bright as the colored characters that indicate keyboard shortcuts.

Also, it would really be nice to see the uptime move up into the "menu bar" area. Right next to the update interval display would be a great place for it. It would help balance all the words that are now on the left side and would no longer mar the CPU graph. It looks really ugly during a stress test.

The upload/download speed indicators in the corner of the network graph are suffering from the same problem. They're just too dark for anyone who doesn't have a high-contrast screen.

[REQUEST] Configurable minimum upload/download graph scale

As cool as it is to have more graph showing I think the network section would be far more useful if you had the ability to set a minimum scale for the graphs to fixed values based on what you know your hardware/network is capable of. Anything that goes over the user defined minimums can scale the graph to accommodate the way it functions currently. Adding this feature would make it so your network usage doesn't look like its going through the roof when its only maxing out the 10k range.

[Bug] Crash after killing a Process (using key "k")

Log:

Traceback (most recent call last):
File "bpytop.py", line 2611, in _collect
io_counters = psutil.disk_io_counters(perdisk=True if SYSTEM == "Linux" else False, nowrap=True)
File "/usr/lib64/python3.8/site-packages/psutil/init.py", line 2168, in disk_io_counters
rawdict = _psplatform.disk_io_counters(**kwargs)
File "/usr/lib64/python3.8/site-packages/psutil/_pslinux.py", line 1125, in disk_io_counters
for entry in gen:
File "/usr/lib64/python3.8/site-packages/psutil/_pslinux.py", line 1098, in read_procfs
raise ValueError("not sure how to interpret line %r" % line)
ValueError: not sure how to interpret line ' 11 0 sr0 9 0 4 10 0 0 0 0 0 16 10 0 0 0 0 0 0\n'

Allow installation without admin privileges [REQUEST]

Not all potential users have administrative privileges due to institutional restrictions.

I use this on my personal machine, but cannot on work because of it restrictions (they would need to insteall each and every update for me!

Can this be designed in such a way that it can be used by only a single user without admin privileges?

[BUG] tree + info + filter = crash

if i use tree and check information on something then use the filter seems to crash
04/08/20 (17:52:49) | ERROR: type NoneType doesn't define __round__ method Traceback (most recent call last): File "/usr/local/bin/bpytop", line 2449, in _collect_temps cls.cpu_temp_high, cls.cpu_temp_crit = round(entry.high), round(entry.critical) TypeError: type NoneType doesn't define __round__ method 04/08/20 (17:53:02) | ERROR: Data collection thread failed with exception: __init__() missing 1 required positional argument: 'pid' Traceback (most recent call last): File "/usr/local/bin/bpytop", line 2328, in _runner collector._collect() File "/usr/local/bin/bpytop", line 2931, in _collect if not c_pid in cls.processes: raise psutil.NoSuchProcess TypeError: __init__() missing 1 required positional argument: 'pid'

[BUG] Incorrect sorting by Mem% usage and maybe CPU usage

Describe the bug

Incorrect sorting by Mem% usage and maybe CPU usage

To Reproduce

Install latest version from git and run. Memory usage of process should be > 10% to see bug. I think that problem is in string sorting, not integer sorting.

Expected behavior

In attached screenshot process with pid 16518 should be first

https://i.imgur.com/rSyDfBa.jpg

[If applicable, add screenshots to help explain your problem.]

Info (please complete the following information):

  • bpytop version: 1.0.2
  • psutil version: 5.7.2
  • python3 --version - Python 3.7.8
  • uname -a
Linux localhost.localdomain 5.7.9-gentoo #2 SMP Wed Jul 22 00:10:11 MSK 2020 x86_64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz GenuineIntel GNU/Linux

[BUG] CPU box linebreaks on small terminals

Describe the bug

If the terminal window is small (80x24-26) and the core-count is 12, the avg. load breaks to next line:
12core

To Reproduce

Start bpytop in a 80x25 window on a system with 12 cores.

Expected behavior

Something like how it looks, if terminal-size is 27 lines or more (Or CPU count is lower).
Or probably just with the avg Load omitted, if it doesn't fit well.

Info

  • bpytop version: 1.0.10
  • psutil version: 5.7.2
  • Linux distribution and version: arch with kernel 5.4.55-1-lts
  • Terminal used: xterm 358
  • Font used: 6x13U (bitmap)
  • Python version: 3.8.5

[BUG] Cannot run on FreeBSD 12.1-STABLE

bpytop version: 1.0.1
psutil version: 5.7.2
FreeBSD 12.1-STABLE r363784
Terminal: Xshell
locale: ru_RU.UTF-8
Python: 3.7.8

log output:

03/08/20 (22:02:01) | ERROR: Data collection thread failed with exception: 'utf-8' codec can't decode byte 0xff in position 153: invalid start byte
Traceback (most recent call last):
File "./bpytop.py", line 2313, in _runner
collector._collect()
File "./bpytop.py", line 2406, in _collect
if hasattr(psutil.cpu_freq(), "current"):
File "/usr/local/lib/python3.7/site-packages/psutil/init.py", line 1879, in cpu_freq
ret = _psplatform.cpu_freq()
File "/usr/local/lib/python3.7/site-packages/psutil/_psbsd.py", line 454, in cpu_freq
current, available_freq = cext.cpu_frequency(cpu)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 153: invalid start byte
03/08/20 (22:02:01) | WARNING: Exiting with errorcode (1). Runtime 0:00:03

[BUG] rxvt-unicode compatibility seems broken

Describe the bug

rxvt-unicode display is quite broken. Also, mouse support seems to be kind of defect.

To Reproduce

  • Install rxvt-unicode ( 9.22-1+b1 here)
  • run bpytop.py

Expected behavior

  • Normal display
  • mouse handling should work

Screenshots

Bildschirmfoto_2020-08-03_17-33-10

Info (please complete the following information):

  • bpytop version: 1.0.0
  • psutil version: 5.7.2
  • (Linux) Linux distribution and version: Debian Stretch with a few buster/sid/experimental upgrades
  • Terminal used: rxvt-unicode
  • Font used: Ormaxx
  • Python version, python3 --version (version 3.6 or above is required): 3.7.2+

Additional context

May be related to additional xressources (although i can't see any related)

[REQUEST] Remember and restore position after selecting a process

Is your feature request related to a problem? Please describe.
After pressing on Enter I see a mini window at the top with additional information about process. Then I'm clicking arrow down, or arrow up, or enter and expect that cursor will be moved to a process that was selected before pressing enter but the cursor (i.e. selected item in the list of processes) moves to the start of the list in window which is not super useful.

Describe the solution you'd like
Instead I propose to remember the position of process that was selected and then to restore that position and highlight it in the list.

[REQUEST] Add GPU monitoring

Is your feature request related to a problem? Please describe.
I'm always frustrated when I have to open another window to monitor the usage of my GPUs.

Describe the solution you'd like
I would love to see the GPU utilization and memory usage in bpytop when bpytop detects dedicated GPUs.
Users that made the effort to install a dedicated GPU or bought a computer with a dedicated GPU likely care a lot about the GPU usage.

Describe alternatives you've considered
An alternative would be to open nvtop or run watch nvidia-smi.

Feature request: Installability as a PyPI package

I think it would be easier (a one-liner) to install, if bpytop would be packaged as Python package, and be uploaded to the Python Package Index (PyPI).
I can create a setup.py and open a PR, if desired.

[REQUEST] Redraw Options (Key Shortcut, Disable, Enable)

Is your feature request related to a problem? Please describe.
I would love to have populated graphs directly after "startup". Since this would require some kind of daemon (that is kind of "over the top"), I tried to send bpytop to the background using dtach. It's working for the graphs that are redrawn, but not for the decorations.

Describe the solution you'd like
I have two ideas regarding this:

  1. It would be awesome to have a key to redraw the decorations - or simply the complete ui. Since this is already done after a window resize, it's only the link to a key press that is missing ;)
  2. It would be even more awesome to have a way to disable redrawing and enable it again if needed to reduce cpu load while it's in the background. Could be a key press or a signal (kill -USR1) - personally I would prefer a signal.

Describe alternatives you've considered
Currently I simply resize my terminal emulator to get a redraw done. Works perfectly fine!

Additional context
Layout after re-attaching:
image

[REQUEST] The ability to disable the resizing screen (except when window is too small)

I use a dropdown terminal and every time I drop it down bpytop displays the resizing screen for a second. It would be nice if I could disable the resizing screen when there isn't a problem so I don't need to wait a second to use bpytop every time I bring my terminal up. I understand the need to display the resizing screen though if the window is too small.

Network graph zooms way out during internet speed test

While playing around with #49 yesterday I was able to make a few observations about how the network graph actually functions. During internet speed tests I noticed that the graphs would zoom way out for some reason.
Screenshot from 2020-08-10 10-38-59

Given that bpytop doesn't know what your actual top speed is and only knows what it has recorded it makes sense that it should zoom out but this may be a tad excessive of a zoom-out. Whats even odder about it is it happens several seconds after the data has stopped and then it zooms way in again the next zoom adjustment.

[REQUEST] Arguments in tree view

It would be really nice especially with mini mode and proc colors if the arguments didn't just completely go away. If you are worried about real estate it could maybe be a mini mode only thing.

At the BARE minimum it would be nice to be able to filter based on arguments even if the arguments aren't showing though. As it is right now I can filter out bpytop when not in tree view but the moment I enable tree view I lose the ability to find bpytop by filtering "bpytop"

Crash on biew process info

Crash on biew process info

Bpytop exited with errorcode (1).

To Reproduce

v1.0.2 from git, busy system, actively walk on processes, press Enter

Expected behavior

View process info

Info:
bpytop version: 1.0.2
psutil version: 5.7.2
mate-terminal 1.16.3 + Anka/Coder Condensed
Ubuntu 16.04.6 LTS
Python 3.7.6 (built from source)

Additional context

04/08/20 (10:11:35) | ERROR: Data collection thread failed with exception: 'cmd'
Traceback (most recent call last):
  File "bpytop.py", line 2319, in _runner
    collector._collect()
  File "bpytop.py", line 2934, in _collect
    cls.details["cmdline"] = cls.processes[c_pid]["cmd"]
KeyError: 'cmd'
04/08/20 (10:11:37) | WARNING: Exiting with errorcode (1). Runtime 0:10:38

[REQUEST] Similar Layout To BashTOP

I was told by multiple people that BPyTOP is supposed to replace BashTOP, but the struggle I'm having with this is that I love BashTOP especially for its layout. Despite the massive improvements in performance and really cool features, the layout in my opinion has taken an aesthetic hit in BPyTOP over its BashTOP predecessor.

Describe the solution you'd like
A 1:1 BPyTOP style/layout that makes switching over from the BASH version essentially no-compromise.

Describe alternatives you've considered
I've fiddled about in the options menu to no avail, nothing seems to restore the original BashTOP style.

ValueError: 'CPU' is not in list

Hello there,

I installed bpytop as described. 'psutil' is installed. But it keeps failing with this ValueError.

[nico@void ~]$ python --version
Python 3.8.4
[nico@void ~]$ pip --version
pip 20.2 from /usr/lib/python3.8/site-packages/pip (python 3.8)
[nico@void ~]$ lsb_release -a
LSB Version:	1.0
Distributor ID:	VoidLinux
Description:	Void Linux
Release:	rolling
Codename:	void
[nico@void ~]$ python3 -m pip install psutil
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: psutil in /usr/lib/python3.8/site-packages (5.7.2)
[nico@void ~]$ git clone https://github.com/aristocratos/bpytop.git
Klone nach 'bpytop' ...
remote: Enumerating objects: 103, done.
remote: Counting objects: 100% (103/103), done.
remote: Compressing objects: 100% (70/70), done.
remote: Total 103 (delta 52), reused 77 (delta 29), pack-reused 0
Empfange Objekte: 100% (103/103), 638.70 KiB | 587.00 KiB/s, Fertig.
Löse Unterschiede auf: 100% (52/52), Fertig.
[nico@void ~]$ cd bpytop
[nico@void bpytop]$ sudo make install
**[nico@void bpytop]$ bpytop
Traceback (most recent call last):
  File "/usr/local/bin/bpytop", line 3968, in <module>
    CPU_NAME: str = get_cpu_name()
  File "/usr/local/bin/bpytop", line 3710, in get_cpu_name
    name = nlist[nlist.index("CPU")+1]
ValueError: 'CPU' is not in list**

[nico@void ~]$ bpytop -v
bpytop version: 1.0.0
psutil version: 5.7.2

[REQUEST] Generate deb and rpm packages and msix

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I want to see packages published from Azure CI/CD to the Release Page to more easily install this without having to clone and make.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Fedora/CentOS does this as well as Debian/Ubuntu just mention the major distros for deb/rpm. If they are created here, they are more likely to be brought into upstream. Using msix would allow publishing into the MS Store for easy installation though just having an msix on github is enough due to winget, chocolately, scoop, etc.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Build yourself.
Additional context
Add any other context or screenshots about the feature request here.
Azure CI/CD is free for OSS projects and should help with creating packages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.