aristocratos / bashtop Goto Github PK
View Code? Open in Web Editor NEWLinux/OSX/FreeBSD resource monitor
License: Apache License 2.0
Linux/OSX/FreeBSD resource monitor
License: Apache License 2.0
Describe the bug
Closes after a few seconds
To Reproduce
Rnn bashtop
Info (please complete the following information):
Additional context
$HOME/.config/bashtop/error.log" (enable error-logging in "$HOME/.config/bashtop/bashtop.cfg" if missing)
New instance of bashtop version: 0.8.4 Pid: 89374
10:59:27 ERROR: On line 1976
10:59:27 ERROR: On line 1976 (MUTED!)
./bashtop: line 1317: ( 100*(3677863579281055702-3677863579281055702-3677863579280962350+3677863579280962350) ) / (3677863579281055702-3677863579281055702) : division by 0 (error token is "(3677863579281055702-3677863579281055702) ")
The gradient is really cool looking but it makes it a little hard to read the processes at the bottom. I really think it looks cool but I would like an option to turn it off.
Current size: │
80x24
Need to be atleast:
80x25
Describe the bug
When actual disk space is freed up, Free
disk space is increased but Used
space is not decreased (until bashtop is restarted).
To Reproduce
Free
changed but Used
did not, resulting in them not adding up to 100Expected behavior
Both should be updated in real time
Info (please complete the following information):
Additional context
$HOME/.config/bashtop/error.log:
New instance of bashtop version: 0.8.13 Pid: 1914836
New instance of bashtop version: 0.8.13 Pid: 1916971
New instance of bashtop version: 0.8.13 Pid: 1918707
Error message:
./bashtop: line 33: shopt: globasciiranges: invalid shell option name
Environment:
Describe the bug
When launching bashtop an division by zero occur line 1590
Info (please complete the following information):
Linux distribution and version :
Ubuntu Server 18.04 bionic
Bash version (version 4.4 or above is required) :
version 4.4.20(1)-release
Additional context
error.log :
New instance of bashtop version: 0.8.14 Pid: 11032
10:51:33 ERROR: On line 666
/usr/bin/bashtop: line 1590: ( ( 6638-6530 ) * 1000 * 1000 ) / ( cpu[hz]*time_elapsed*cpu[threads] ) : division by 0 (error token is "( cpu[hz]*time_elapsed*cpu[threads] ) ")
I don't have time this afternoon to investigate. Saw the post on reddit and thought I'd give it a quick try. Immediately errors and exits.
error.log:
New instance of ./bashtop Pid: 25873
./bashtop: line 158: 1586128712.082293/1000: syntax error: invalid arithmetic operator (error token is ".082293/1000")
./bashtop: line 158: 1586128712.083603/1000: syntax error: invalid arithmetic operator (error token is ".083603/1000")
bash version
> bash --version
GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Distro info
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan
Describe the bug
On my machine, bashtop
often goes up to 50% of CPU usage on refreshes.
To be exact, it varies between 20% and 60% of CPU usage according to htop
. Computed by itself, it doesn't go upper than 4% of CPU (different CPU usage calculation?).
I increased refresh delay up to 5s to reduce CPU usage, so that happens less.
To Reproduce
Steps to reproduce the behavior:
Launch bashtop
Observe CPU usage on refreshes
Decrease refresh delay (2s shows high CPU usage nearly constantly)
Expected behavior
Lower CPU usage.
I still find 15%-20% would be still high, but more acceptable.
Cf. tests on another machine below.
Screenshots
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
31145 root 20 0 217M 6896 2416 S 40.4 0.0 0:28.97 bash /usr/local/bin/bashtop
Info (please complete the following information):
Additional context
Here are my latest error logs (please note that I upgraded bashtop
before further testing and opening this issue):
New instance of bashtop version: 0.8.5 Pid: 1651
09:44:08 ERROR: On line 1731
09:44:11 ERROR: On line 1731 (MUTED!)
New instance of bashtop version: 0.8.15 Pid: 30665
New instance of bashtop version: 0.8.15 Pid: 31145
Compared to 0.8.5
, CPU usage is lower on latest version (didn't reach 50% as far as I've seen), it's more between 20% to 40%
On a remote 6c/[email protected] remote machine (bash v4.4.23, Gentoo Linux 5.3.7, no ZFS and 2 volumes), CPU usage on htop
varies between 4% and 25% as I've seen.
This latest CPU usage sounds reasonable for me, if there's tweaks I can do on my main host I'd like to target this CPU usage. Is my 40%-50% CPU usage locally kind of common for bashtop
or is it abnormal?
Side note
Thanks for your amazing work! (#59)
bash from Debian Buster: GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu)
Started with and without .bashrc
(bash --norc
):
New instance of /usr/local/bin/bashtop Pid: 3983
01:00:00 ERROR: On line 611 01:00:00 ERROR: On line 615 01:00:00 ERROR: On line 186 /usr/local/bin/bashtop: line 1538: ( ( 829-829 ) * 1000 * 1000 ) / ( cpu[hz]*time_elapsed*cpu[threads] ) : division by 0 (error token is "( cpu[hz]*time_elapsed*cpu[threads] ) ")
Hello there!
I just stumbled upon your project on Reddit!
I decided to try it out but, unfortunately, when trying to launch it, it crashes.
I have bash 5.0.3, and the terminal window is fullscreen.
When trying to launch bashtop, it just crashes/closes unexpectedly without giving out any message.
How can I fix this?
First - this is one awesome tool! Thanks a million!
Second - I use NVIDIA GPUs, and I would love if monitoring them could be incorporated into bastop. The needed metrics are exposed in the either /proc or /sys.
Thank you!
Jeff Layton
Is your feature request related to a problem? Please describe.
Yes. I tried bashtop on an Ubuntu 16.04 machine, which only has Bash 4.3. bashtop crashed a few seconds after starting, without displaying any error message. (It works fine on my other Fedora 31 machine, which has Bash 5.x.)
Describe the solution you'd like
bashtop should check the bash version and exit with a non-zero error code if the Bash version on the system is lower than 4.4.
I could look at implementing this if this feature is desired.
Describe alternatives you've considered
N/A
Additional context
N/A
I have not run the program, i was just reading the source code.
I think you made a booboo:
-d|-dimensions) if [[ $2 =~ ^[0-9]+$ && $3 =~ ^[0-9]+$ && $3 =~ ^[0-9]+$ && $4 =~ ^[0-9]+$ ]]; then #? Graph dimensions
line=$2; col=$3; height=$4; width=$5; shift 4; fi;;
You're testing $3 value twice, and you're not testing $5.
Also, since you're using it a lot, you could actually refactor that test a function, it would improve readability:
_all_int() {
local param
for param; do
[[ $param =~ ^[0-9]+$ ]] || return
done
}
For --dimensions parsing, you can call it like this:
if _all_int "${@:2:4}"; then line=$2 ... ; shift 4 ; fi ;;
Is there a guideline for what kind of fonts I would need to be able to see the usage bars and graphs?
On README, it says that it only requires Bash, then tells it also requires date
command on previous versions, which isn't a Bash builtin.
I looked for external commands and I found these dependencies:
%N
if that mattersThere may be more.
Describe the bug
Logged into a few of our AWS Ubuntu 16 machines, and they would render the frames, then it would crash. If it's not supported, this should help you figure compatibility to list in the README.
Info (please complete the following information):
Additional context
$HOME/.config/bashtop/error.log"
New instance of bashtop version: 0.8.3 Pid: 18459
04:49:12 AM ERROR: On line 724
04:49:12 AM ERROR: On line 724 (MUTED!)
./bashtop: line 669: /sys/devices/system/cpu/cpu-1/cpufreq/scaling_cur_freq: No such file or directory
04:49:12 AM ERROR: On line 669
04:49:12 AM ERROR: On line 682
04:49:12 AM ERROR: On line 724
04:49:12 AM ERROR: On line 724 (MUTED!)
./bashtop: line 1412: mem[available]*100/mem[total]: division by 0 (error token is "mem[total]")
error: improper AIX field descriptor
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
04:49:12 AM ERROR: On line 1503
./bashtop: line 669: /sys/devices/system/cpu/cpu-1/cpufreq/scaling_cur_freq: No such file or directory
04:49:12 AM ERROR: On line 669
04:49:12 AM ERROR: On line 682
./bashtop: line 914: local: `': not a valid identifier
04:49:12 AM ERROR: On line 914
./bashtop: line 914: local: `': not a valid identifier
04:49:12 AM ERROR: On line 914 (MUTED!)
./bashtop: line 914: local: `': not a valid identifier
./bashtop: line 914: local: `': not a valid identifier
error: improper AIX field descriptor
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
04:49:14 AM ERROR: On line 1503
./bashtop: line 669: /sys/devices/system/cpu/cpu-1/cpufreq/scaling_cur_freq: No such file or directory
04:49:15 AM ERROR: On line 669
04:49:15 AM ERROR: On line 682
04:49:15 AM ERROR: On line 939
04:49:15 AM ERROR: On line 939 (MUTED!)
./bashtop: line 1743: (Receive-Receive)*1000/(net[new_timestamp]-net[old_timestamp]) : division by 0 (error token is "(net[new_timestamp]-net[old_timestamp]) ")
E.g. starting bashtop on a slightly smaller window, I get
current size: 23x80 need to be at least 80x25
while I expect to see
current size: 80x23 need to be at least 80x25
And when resizing dynamically, the message box also uses HxW.
Better to stick to the more common WxH everywhere...
Describe the bug
It creates an config file at $HOME/.config/bashtop/bashtop.cfg
To Reproduce
Steps to reproduce the behavior:
bashtop
Expected behavior
Create an config file at ${XDG_CONFIG_HOME:-$HOME/.config}/bashtop/bashtop.cfg
Screenshots
(none)
Info (please complete the following information):
Additional context
Line 3412 in dac039e
There is also $XDG_CONFIG_DIRS
you could use if you implement "config layering" (like get the (default) values from the system configuration first etc.)
See the XDG Base Directory Specification, and the XDG Base Directory article on the archlinux wiki.
Is your feature request related to a problem? Please describe.
GPU Memory and Core is currently not displayed
Describe the solution you'd like
Something that either shows the recent history of GPU usage, or current GPU usage
Describe alternatives you've considered
Currently using https://github.com/Syllo/nvtop, the same could be looked at being integrated
Additional context
Awesome project!
Is your feature request related to a problem? Please describe.
currently, there is no release / no tag.
Describe the solution you'd like
it could be nice to make official release of bashtop version (at list with tags
Describe alternatives you've considered
I can see that there is a AUR package but it's targetting only git
version.
Additional context
this software is super cool
Describe the bug
The brand new load average feature clips through the right-hand side of my terminal back into the left
To Reproduce
Steps to reproduce the behavior:
Run bashtop with a CPU with many cores
Expected behavior
Load average view doesn't clip
Info (please complete the following information):
Description
Bashtop freezes after trying to reverse, when additional info of pocess opened
To Reproduce
Some info about test environment:
Manjaro Linux 20.0
Bash version 5.0.16
Linux kernel 5.6.7-1-MANJARO
Describe the bug
Seems to have an issue with lots of mounts / maybe ZFS?
To Reproduce
Run bashtop
Expected behavior
Prettyness
Screenshots
App exits after drawing the boxes with:
./bashtop: line 1171: -: syntax error: operand expected (error token is "-")
Info (please complete the following information):
Additional context
New instance of bashtop version: 0.8.3 Pid: 33115
./bashtop: line 1171: -: syntax error: operand expected (error token is "-")
New instance of bashtop version: 0.8.3 Pid: 33612
./bashtop: line 1171: -: syntax error: operand expected (error token is "-")
New instance of bashtop version: 0.8.3 Pid: 36473
./bashtop: line 1171: -: syntax error: operand expected (error token is "-")
New instance of bashtop version: 0.8.3 Pid: 37120
git/bashtop/bashtop: line 1171: -: syntax error: operand expected (error token is "-")
New instance of bashtop version: 0.8.3 Pid: 37775
git/bashtop/bashtop: line 1171: -: syntax error: operand expected (error token is "-")
When using bashtop without additional color themes, the Default theme is used but its numbering in the Options menu is wrong: "Color theme: 2/1".
Steps to reproduce the behavior:
Delete or empty the ~/.config/bashtop/themes
directory. Launch bashtop and display the Options menu (either by Esc
+ Options menu selection or by o
shortcut).
Expected behavior:
When displaying the Options menu, the numbering should read: "Color theme: 1/1".
Info:
Describe the bug
As the screen refreshes, a few lines (CPU Core 2 utilization and total Bytes uploaded) move to the right with each refresh.
To Reproduce
Steps to reproduce the behavior: Difficult to say. It's always done this on my setup. The Linux machine I'm monitoring is a VM. The host machine from which I access that machine is using the SSH plugin on Google Chrome.
Expected behavior
The two lines mentioned above should stay aligned with the rest of the information on the screen upon refresh.
Info (please complete the following information):
I think it's a good idea to let people know that bashtop it's available in the AUR under the name of bashtop-git
, here's the link
Is your feature request related to a problem? Please describe.
This is super slick, but it'd be cool if the sources for temperatures were expanded to support zenpower for newer Ryzen CPU's
Describe the solution you'd like
Here's the relevant section of sensors output for zenpower:
zenpower-pci-00c3
Adapter: PCI adapter
SVI2_Core: 1.40 V
SVI2_SoC: 1.08 V
Tdie: +65.6°C (high = +95.0°C)
Tctl: +65.6°C
Tccd1: +64.8°C
Tccd2: +50.2°C
SVI2_P_Core: 27.55 W
SVI2_P_SoC: 13.69 W
SVI2_C_Core: 20.42 A
SVI2_C_SoC: 12.65 A
Describe alternatives you've considered
If you're open to pull requests, I can work on adding support for this tomorrow. Just reply to this issue if you want me to take a stab at it.
Additional context
This is a wonderful project. I almost want to just run it in a plasma applet and have it be my background! Nice work!
Describe the bug
Strange-looking output of the option/pause menu on yakuake.
To Reproduce
Expected behavior
Correctly displayed ASCII menu entries.
The darkening background isn’t showing up the same as displayed on the screenshot as well, but I don’t consider it as an issue.
Screenshots
(Ignore the flickering at the top, It’s due to the https://github.com/phw/peek capture. I don’t know what to use for recording things like I was doing with ShareX before)
Info (please complete the following information):
-` pm@VIX
.o+` ------
`ooo/ OS: Arch Linux x86_64
`+oooo: Kernel: 5.6.6-13-tkg-bmq
`+oooooo: Uptime: 3 hours, 33 mins
-+oooooo+: Packages: 1943 (pacman)
`/:-:++oooo+: Shell: bash 5.0.16
`/++++/+++++++: Resolution: 3440x1440
`/++++++++++++++: DE: Plasma
`/+++ooooooooooooo/` WM: KWin
./ooosssso++osssssso+` WM Theme: Layan
.oossssso-````/ossssss+` Theme: Layan [Plasma], Layan-dark [GTK2/3]
-osssssso. :ssssssso. Icons: korla [Plasma], korla [GTK2/3]
:osssssss/ osssso+++. Terminal: yakuake
/ossssssss/ +ssssooo/- CPU: AMD Ryzen 5 3600X (12) @ 3.800GHz
`/ossssso+/:- -:/+osssso+- GPU: NVIDIA GeForce GTX 1060 6GB
`+sso+:-` `.-/+oso: Memory: 8369MiB / 32044MiB
`++:. `-/+/
.` `/
System locale (output of “echo $LANG”)
fr_FR.UTF-8
(us_US.UTF-8 also installed on my computer, for compatibility reasons)
Bash version
1 core/bash 5.0.016-1 (1.6 MiB 8.0 MiB) (Installed)
The GNU Bourne Again shell
Out of topic notes
Discovered your resource monitor via one article of the NextInpact french news website, I absolutely love it!
How to we use this script by UBUNTU 18.04 .
Line 197 in 38863bd
If you leave it unquoted, then a file named cpuh or cpuz can trigger globbing and change the command line. Also if failglob is enabled by the user, a globbing error might abort the script.
On the other hand, quotes on param_var are not necessary.
Describe the bug
When using arrow keys to navigating the processes there is a small delay. When viewing info for a process the delay is increased.
To Reproduce
Simply clone and run bashtop
Info:
Additional context
Using default config and no errors.
Hi. I was still reading and found this one:
Line 732 in c910e2d
[[ $foo =~ . ]]
is actually [[ -n $foo ]]
.
I think what you wanted to meant was more [[ $foo =~ \. ]]
or [[ $foo = *.* ]]
(this form should be faster to run, iirc).
Since %.*
is idempotent when there's no .
in foo's value, another possiblity would be to drop that test and do that
if [[ -n $int ]]; then
found=${found%.*}
if [[ -n $math ]]; then
math=...
found=...
fi
fi
Describe the bug
Bashtop not running on OVH VPS. The problem is about cpufreq part.
To Reproduce
Run bashtop on linux without cpufreq module loaded.
Info (please complete the following information):
Log :
New instance of bashtop version: 0.8.4 Pid: 21402
09:18:30 PM ERROR: On line 724
09:18:30 PM ERROR: On line 724 (MUTED!)
./bashtop: line 669: /sys/devices/system/cpu/cpu-1/cpufreq/scaling_cur_freq: No such file or directory
09:18:37 PM ERROR: On line 669
09:18:37 PM ERROR: On line 682
09:18:37 PM ERROR: On line 724
09:18:37 PM ERROR: On line 724 (MUTED!)
./bashtop: line 1413: mem[available]*100/mem[total]: division by 0 (error token is "mem[total]")
./bashtop: line 669: /sys/devices/system/cpu/cpu-1/cpufreq/scaling_cur_freq: No such file or directory
09:18:38 PM ERROR: On line 669
09:18:38 PM ERROR: On line 682
./bashtop: line 914: local: ': not a valid identifier 09:18:38 PM ERROR: On line 914 ./bashtop: line 914: local:
': not a valid identifier
09:18:38 PM ERROR: On line 914 (MUTED!)
./bashtop: line 914: local: ': not a valid identifier ./bashtop: line 914: local:
': not a valid identifier
./bashtop: line 1565: ( ( 32372130-32371881 ) * 1000 * 1000 ) / ( cpu[hz]time_elapsedcpu[threads] ) : division by 0 (error token is "( cpu[hz]time_elapsedcpu[threads] ) ")
Describe the bug
While running bashtop, the small CPU infobox is being overwritten by the main graph
Expected behavior
To work as in screenshots from readme
Info (please complete the following information):
Additional context
$HOME/.config/bashtop/error.log":
New instance of bashtop version: 0.8.3 Pid: 6266
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Info (please complete the following information):
Describe the bug
Processes are not listed when using procps-ng 3.3.10.
To Reproduce
Run bashtop.
Expected behavior
Process list is filled.
Screenshots
Info (please complete the following information):
Additional context
02:09:10 AM ERROR: On line 1529
error: improper AIX field descriptor
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
As described in #12:
Looking at the error.log there are indications of errors from output of "ps". Could be a version incompatibility there too, but if so, it will be fixed in the next big update where python psutil will be used instead.
As I just encountered this, I had a closer look. Debugging the ps command line, it turned out that my version of ps choked on the "thcount" format specifier.
This specifier is an alias for "nlwp". It seems it got lost in version 3.3.0 of procps-ng, and re-appeared in 3.3.12:
https://bugzilla.redhat.com/show_bug.cgi?id=1174313
https://gitlab.com/procps-ng/procps/-/blob/master/NEWS#L112
Commit breaking:
https://gitlab.com/procps-ng/procps/-/commit/0e6ac0db3e35fbf0eca0c02d09540ca6fb0ba77c
Commit fixing:
https://gitlab.com/procps-ng/procps/-/commit/3a52dfa340276a7f8f55af1b8267392ee48988b9
(That's five years, 12 versions "broken". Wow.)
"thcount" has always been an alias for "nlwp", since they were introduced in 3.1.15, so using "nlwp" instead is always guaranteed to work, and would fix the issue for procps-ng from 3.3.0 to 3.3.11. It works for me with patched bashtop + procps-ng 3.3.10.
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 No tree view like with "V" option in top ot "T" in htop
Describe the solution you'd like
Want to view processes like in with pstree utility
Describe alternatives you've considered
options in top, pstree, htop, ps -f --forest, glances(old) option.
Additional context
Hi, how are you?. Im running Centos 7.8 for first time, im using bashtop in Debian and work perfectly, but in Centos Im have the next problem when im running ./bashtop:
./bashtop: line 33: shopt: globasciiranges: invalid shell option name
Im install all dependencies but not work, could you help me please?. Regards!
Hi,
I trying your project into a LXC container.
I have this error :
New instance of bashtop version: 0.6.11 Pid: 25782
10:49:43 PM ERROR: On line 180
./bashtop: line 1292: ( 100*(60649195923-60649210126-+) ) / (60649195923-60649210126) : syntax error: operand expected (error token is ") ) / (60649195923-60649210126) ")
10:49:44 PM ERROR: On line 385
Try with : GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu)
Here is tracing.log file (it's quite huge):
tracing.log
Hi,
I've just cloned the repo and tried to run it without any parameters on my Mac OS X system and it prints various errors and stops:
./bashtop
./bashtop: line 33: shopt: globasciiranges: invalid shell option name
./bashtop: line 33: shopt: globstar: invalid shell option name
./bashtop: line 112: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
I'm using ZSH but bash is installed (and that shouldn't change much):
bash --version ─╯
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.
Is your feature request related to a problem? Please describe.
Default colors could not match a user's color setup
Describe the solution you'd like
I would suggest trying to set the used colors based on a user's .Xresources
file and if not, then fallback to the current colorscheme
Describe alternatives you've considered
None
Additional context
Hi @aristocratos
I wanted to say I think this is a very nice and fancy tool and I really like it.
I noticed you had this item on your TODO list I just thought I would give you an idea to consider in order to achieve it.
I could potentially come up with a PR if I can find some time, but in the meantime I just wanted to raise this as a feature request.
Thanks!
Could you share a cryptocurrency address, a Paypal, a Patreon or whatever so we can support please? 🙂
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.