cjbassi / gotop Goto Github PK
View Code? Open in Web Editor NEWA terminal based graphical activity monitor inspired by gtop and vtop
License: GNU Affero General Public License v3.0
A terminal based graphical activity monitor inspired by gtop and vtop
License: GNU Affero General Public License v3.0
This was obviously done on purpose, as the definition of Error() throws a panic at the end. What drove this design decision, rather than gracefully handling the error?
On both Mac and Linux, I can't run gotop for more than 24 hours because -- whether due to a sleep/resume or some other random condition -- gotop inevitably receives a value it doesn't like, raises an Error, and panics out. On Linux, this appears to happen most with the net widget; maybe when my wireless goes down temporarily? I can't tell. But I'm baffled why you wrote the application to panic when gotop can't interpret a value.
Hi,
Can you compile Gotop for the raspberry architecture (ARM) to having it into the release page ?
uname -a
Linux minibian 4.9.80-v7+ #1098 SMP Fri Mar 9 19:11:42 GMT 2018 armv7l GNU/Linux
With env GOOS=linux GOARCH=arm GOARM=5 go build
Thank
thank u.
Check current version with `gotop -v` and check the latest version from the releases tab on GitHub. ✔️
On Linux:
Current temp sensors are sorted alphabetically: acpitz, coretemp_core0, ..., coretemp_core5, coretemp_packageid0
acpitz is mostly irrelevant, while package is usually a pretty informative temp if individual core temps are unavailable.
Currently, resizing the gotop window to a smaller window means that acpitz will remain visible the longest, while the more relevant info of packageid0 will become invisible first.
I want to suggest moving coretemp to the first position.
Hi,
I'm testing gotop Version 1.4.0 on a pi zero w with the latest image of Raspian Strech Lite.
The only problem I have is that no Temperatures are shown.
The output of uname -a
Linux adc 4.14.34+ #1110 Mon Apr 16 14:51:42 BST 2018 armv6l GNU/Linux
Terminal shell (like zsh or bash)
bash
Terminal emulator (like iTerm or gnome terminal)
mac terminal -> ssh > server
Using tmux?
no
Regards
Hey, your program is pretty neat! I was wondering if you could possibly use the background color for the foreground of the selected process? It would really help those who have difficulty reading text with low-contrast.
Hello,
I'm testing gotop 1.3.0 ( gotop_1.3.0_linux_amd64.tgz )
I noticed on my EPYC Server it won't show any CPU in
the CPU widgets while is fine on my Intel boxes.
The box has 2 * 16C/32T CPUs installed.
getconf _NPROCESSORS_ONLN
64
uname -a
Linux ant 4.16.11-fw1 #1 SMP PREEMPT Tue May 22 21:17:26 CEST 2018 x86_64 AMD EPYC 7281 16-Core Processor AuthenticAMD GNU/Linux
$ echo $SHELL
/bin/bash
konsole -> ssh -> server ( cli )
No
Also k10temp is wrong on ZEN .. Each CPU has 4 dies and each die a temp
meaning on 2 soket box we get 8 different temperatures not just one.
eg this:
k10temp-pci-00e3
Adapter: PCI adapter
temp1: +20.5°C (high = +70.0°C)
k10temp-pci-00d3
Adapter: PCI adapter
temp1: +20.8°C (high = +70.0°C)
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +23.5°C (high = +70.0°C)
k10temp-pci-00fb
Adapter: PCI adapter
temp1: +19.8°C (high = +70.0°C)
k10temp-pci-00eb
Adapter: PCI adapter
temp1: +20.5°C (high = +70.0°C)
k10temp-pci-00db
Adapter: PCI adapter
temp1: +20.2°C (high = +70.0°C)
k10temp-pci-00cb
Adapter: PCI adapter
temp1: +20.1°C (high = +70.0°C)
k10temp-pci-00f3
Adapter: PCI adapter
temp1: +19.0°C (high = +70.0°C)
If you need more infos please let me know.
Regards
Need to fix the following issues caused by gopsutil on OSX:
I don't have a Mac to test on so help is appreciated.
Your 1.4.2 release darwin binaries are corrupt, which affects the homebrew install. File size is 45 bytes!
Make sure gotop is updated and the issue still persists before creating an issue.
Check current version with gotop -v
and check the latest version from the releases tab on GitHub.
$./gotop -v
1.4.1
Please give the following info when creating an issue:
uname -a
Linux neuro 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
I installed gotop as stated in the README.md file, however after running it I do not see the cpu/men usage or network graph.
Make sure gotop is updated and the issue still persists before creating an issue.
Check current version with gotop -v
and check the latest version from the releases tab on GitHub.
11:39:43-c@d:~$gotop -v
1.2.14
Please give the following info when creating an issue:
uname -a
11:39:46-c@d:~$uname -a
Linux d 4.13.0-39-generic #44~16.04.1-Ubuntu SMP Thu Apr 5 16:43:10 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
bash
ubuntu default terminal
nope
I expected to see all chromium-browser (Which is the blue "Chrome" you can get with apt get, not the yellow "Chrome" from google ...) grouped in one line. (This is what I'm use to, but not sure if it's the standard or something specific to the system)
(I'll comment the another result I have on another computer)
(Not sure what is kworker but it could be grouped too ? maybe it's wiser/ more interesting not to group kworkers i'm not sure ???)
If memory usage is more than 1 gb it only show rounded integers(till the 1.5gb it only shows 1gb, after the 1.5gb it shows 2gb etc...) and that is obviously not accurate at all. Same thing for network usage. Can you convert these variables to floats please?
Hi dev! So, I just updated my distro and this bug happen with gotop:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x50f86f]goroutine 12 [running]:
github.com/cjbassi/gotop/src/widgets.(*Disk).update(0xc42000d2c0)
/home/cjbassi/go/src/github.com/cjbassi/gotop/src/widgets/disk.go:90 +0x66f
github.com/cjbassi/gotop/src/widgets.NewDisk(0x0)
/home/cjbassi/go/src/github.com/cjbassi/gotop/src/widgets/disk.go:42 +0x195
main.initWidgets.func5()
/home/cjbassi/go/src/github.com/cjbassi/gotop/main.go:214 +0x22
created by main.initWidgets
/home/cjbassi/go/src/github.com/cjbassi/gotop/main.go:213 +0xda
Looks like its the same bug that happen with this guy: #39
Heres my distro info:
Linux 4.14.52-1-MANJARO #1 SMP PREEMPT Tue Jun 26 15:24:31 UTC 2018 x86_64 GNU/Linux
Shell: bash
Terminal: urxvt
I have tmux but im not using it to see gotop.
gotop version 1.4.0.
Do I need to change the gotop code or inform manjaro devs?
download.sh
script downloads wrong architecture:
xxx@espressobin:/tmp/gotop$ bash -x download.sh
+ VERSION=1.2.12
++ uname -sm
+ arch='Linux aarch64'
+ case "$arch" in
+ download linux_amd64
+ archive=gotop_1.2.12_linux_amd64.tgz
+ curl -LO https://github.com/cjbassi/gotop/releases/download/1.2.12/gotop_1.2.12_linux_amd64.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 619 0 619 0 0 885 0 --:--:-- --:--:-- --:--:-- 884
100 967k 100 967k 0 0 454k 0 0:00:02 0:00:02 --:--:-- 1050k
+ tar xf gotop_1.2.12_linux_amd64.tgz
+ rm gotop_1.2.12_linux_amd64.tgz
so after repairing download.sh
script like this:
case "$arch" in
Darwin\ *_64) download darwin_amd64 ;;
Darwin\ *86) download darwin_386 ;;
Linux\ *_64) download linux_amd64 ;;
....
it downloads correct version:
xxx@espressobin:/tmp/gotop$ bash -x download.sh
+ VERSION=1.2.12
++ uname -sm
+ arch='Linux aarch64'
+ case "$arch" in
+ download linux_arm8
+ archive=gotop_1.2.12_linux_arm8.tgz
+ curl -LO https://github.com/cjbassi/gotop/releases/download/1.2.12/gotop_1.2.12_linux_arm8.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 618 0 618 0 0 906 0 --:--:-- --:--:-- --:--:-- 906
100 903k 100 903k 0 0 402k 0 0:00:02 0:00:02 --:--:-- 700k
+ tar xf gotop_1.2.12_linux_arm8.tgz
+ rm gotop_1.2.12_linux_arm8.tgz
So please repair your download.sh
script ;)
Thx.
Maybe a silly question but where do I need to save a *.go theme configuration, in order to make it available on gotop?
Have the same issue in Windows:
Issue with CPU percentages.
Diagnostics:
self.Count: 8
gopsutil.Counts(): 8
len(percents): 0
percents: []
self.interval: 1s
panic: 1
goroutine 17 [running]:
github.com/cjbassi/gotop/utils.Error(0x5a120a, 0xf, 0xc0421720c0, 0x52)
d:/WLCR/GoProjects/src/github.com/cjbassi/gotop/utils/utils.go:30 +0x246
github.com/cjbassi/gotop/widgets.(*CPU).update(0xc042140000)
d:/WLCR/GoProjects/src/github.com/cjbassi/gotop/widgets/cpu.go:57 +0x539
created by github.com/cjbassi/gotop/widgets.NewCPU
d:/WLCR/GoProjects/src/github.com/cjbassi/gotop/widgets/cpu.go:38 +0x2da
Did by
$ go get -u -v github.com/cjbassi/gotop
$ gotop
Hi, gotop is crashing on my computer, I am using Arch Linux :
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x50f86f]goroutine 26 [running]:
github.com/cjbassi/gotop/src/widgets.(*Disk).update(0xc420220000)
/home/cjbassi/go/src/github.com/cjbassi/gotop/src/widgets/disk.go:90 +0x66f
github.com/cjbassi/gotop/src/widgets.NewDisk(0x0)
/home/cjbassi/go/src/github.com/cjbassi/gotop/src/widgets/disk.go:42 +0x195
main.initWidgets.func5()
/home/cjbassi/go/src/github.com/cjbassi/gotop/main.go:214 +0x22
created by main.initWidgets
/home/cjbassi/go/src/github.com/cjbassi/gotop/main.go:213 +0xda
Please give the following info when creating an issue:
Currently getting compiling errors due to gopsutil when trying to cross compile for 32bit OSX on Linux 64bit
Hello,
When running gotop on a fresh terminal, I get stdout & stderr coming from other processes ; these text offset all gotop display, therefore making it unuseful.
Any idea to skip these (maybe redirect other process, or totally refresh gotop each time) ?
Thank you,
Sébastien.
I think you should try to get this into Linux disros.
So maybe we can track this here?
Some people have been having slow startups so I created an issue for it.
If you feel inclined to provide some debugging info and have the Go toolchain set up, you can:
go get github.com/cjbassi/gotop
# move into the repo
git checkout slow-startup
go run main.go
gotop should print some numbers. If gotop stays on a number for a while, let me know:
Thanks!
Hello,
probably a feature ( however for me this is kind bug ).
Right now we see a X% usage .. however from what?
It should show something like:
Main (100MB/1GB) 10%
Swap (0MB/1GB) 0%
Regards
Data:
Gotop version: 1.2.11
MacOS 10.12.6
Darwin Kernel Version 16.7.0: Tue Jan 30 11:27:06 PST 2018;
root:xnu-3789.73.11~1/RELEASE_X86_64 x86_64
Shell is bash
Terminal is iTerm
Not using tmux
Error:
Error caught. Exiting program.
Issue with CPU percentages.
Diagnostics:
self.Count: 8
gopsutil.Counts(): 8
len(percents): 0
percents: []
self.interval: 1s
panic: 1
goroutine 15 [running]:
github.com/cjbassi/gotop/utils.Error(0x11841d7, 0xf, 0xc42001e4e0, 0x52)
/home/cjbassi/go/src/github.com/cjbassi/gotop/utils/utils.go:30 +0x23f
github.com/cjbassi/gotop/widgets.(*CPU).update(0xc42000b020)
/home/cjbassi/go/src/github.com/cjbassi/gotop/widgets/cpu.go:57 +0x532
created by github.com/cjbassi/gotop/widgets.NewCPU
/home/cjbassi/go/src/github.com/cjbassi/gotop/widgets/cpu.go:38 +0x2d3
panic: runtime error: index out of range
goroutine 6 [running]:
github.com/cjbassi/gotop/widgets.(*CPU).update(0xc42000afc0)
/home/cjbassi/go/src/github.com/cjbassi/gotop/widgets/cpu.go:52 +0x3c9
created by github.com/cjbassi/gotop/widgets.NewCPU
/home/cjbassi/go/src/github.com/cjbassi/gotop/widgets/cpu.go:35 +0x2cc
like the top manual,could you please add users information
When I terminate openvpn, gotop gave this output:
Error caught. Exiting program.
Issue with net data.
Diagnostics:
curRecvTotal: 698817528
curSentTotal: 86045375
self.prevRecvTotal: 706101718
self.prevSentTotal: 86246367
recvRecent: 18446744073702267426
sentRecent: 18446744073709350624
int(recvRecent): -7284190
int(sentRecent): -200992
panic: 1
goroutine 54 [running]:
github.com/cjbassi/gotop/src/utils.Error(0x58301f, 0x8, 0xc4200220e0, 0xde)
/home/cjbassi/go/src/github.com/cjbassi/gotop/src/utils/utils.go:49 +0x23f
github.com/cjbassi/gotop/src/widgets.(*Net).update(0xc420264fa0)
/home/cjbassi/go/src/github.com/cjbassi/gotop/src/widgets/net.go:60 +0x519
github.com/cjbassi/gotop/src/widgets.NewNet.func1(0xc4201d22d0, 0xc420264fa0)
/home/cjbassi/go/src/github.com/cjbassi/gotop/src/widgets/net.go:39 +0x5c
created by github.com/cjbassi/gotop/src/widgets.NewNet
/home/cjbassi/go/src/github.com/cjbassi/gotop/src/widgets/net.go:37 +0x20e
uname -a
: Linux void-lap 4.17.14_2 #1 SMP PREEMPT Wed Aug 15 13:45:55 UTC 2018 x86_64 GNU/LinuxIt would be cool if the colorscheme file was just a config file so we don't need to recompile gotop in order to create our own themes.
* Kernel: Archlinux 4.17.12
* Terminal shell: Fish
* Terminal emulator: Termite
* Gotop version: 1.4.1
It appears that there is some kind of rounding error done on Gotops behalf.
I have a feeling that it defaults to GiB instead of the displayed GB.
Either way, it results in more numbers being displayed than there actually are.
As an example, a 100GB partition is used for 22%, but claims to have 82GB free.
Another would be RAM, which is rounded up from 16GB to 17.
Other programs like Htop report this correctly under the same circumstances.
If this is deliberate and it calculates GiB, I'd recommend changing the name or giving an option to tweak it.
- Arch Linux 4.17.14
- Fish & Bash
- Termite
- Gotop 1.4.1
Behavior:
Isolating CPU cores via Cpuset (cset) results in Gotop crashing on initializing.
This does not happen if Gotop is already running and isolation is achieved afterwards.
Only after isolating cores before running Gotop, does Gotop crash
It throws the following exception
~> Gotop
Error caught. Exiting program.
Issue with CPU percentages.
Diagnostics:
self.Count: 2
gopsutil.Counts(): 2
len(percents): 8
percents: [20.000000000004547 0 0 0 16.494845360824865 0 0 0]
self.interval: 1s
panic: 1
goroutine 6 [running]:
github.com/cjbassi/gotop/src/utils.Error(0x5845e0, 0xf, 0xc420202000, 0x83)
/home/cjbassi/.local/src/github.com/cjbassi/gotop/src/utils/utils.go:49 +0x23f
github.com/cjbassi/gotop/src/widgets.(*CPU).update(0xc4201cada0)
/home/cjbassi/.local/src/github.com/cjbassi/gotop/src/widgets/cpu.go:57 +0x646
created by github.com/cjbassi/gotop/src/widgets.NewCPU
/home/cjbassi/.local/src/github.com/cjbassi/gotop/src/widgets/cpu.go:38 +0x2f4
To me, at least, this is very low priority, but I stumbled across it while messing around with Cset.
So I figured I'd report it anyways.
I have a feeling any CPU isolation would result in the same problem, since It doesn't like not being able to read/interact as nicely with the isolated cores.
Interestingly enough, Htop doesn't seem to have a problem with reporting the isolated cores.
Might be worth while checking out how they handle that.
i hope use gotop to show custom data ? example, http qps? redis ops ?
thank u.
Apologies for this, I know everyone hates it when someone brings this up, but please don't encourage the bad practice of running uninspected, untrusted code off of the internet.
sh -c "$(curl $link)"
This is really, really not good. The user has no chance to inspect the script. Please encourage this practice instead:
curl -O /tmp/get-gotop.sh && vim /tmp/get-gotop.sh
# Happy with the script?
sh -c /tmp/get-gotop.sh
I know it's not as convenient, but it's far safer. Alternatively, you could use the awesome fpm to just make packages for the various distros. fpm
makes it really simple and pleasant to do so, and this way the user isn't installing things on their system that their package managers can't see.
Again, sorry to bring this up, and I really love the project! I'm going to use this a ton at my job where we have systems with no package manager. I've missed having htop
and this is an awesome replacement. I just get anal retentive about this particular thing.
Title pretty much says it all.
Make sure gotop is updated and the issue still persists before creating an issue.
gotop was installed with the instructions:
brew tap cjbassi/gotop
brew install gotop
Check current version with gotop -v
and check the latest version from the releases tab on GitHub.
1006)~ % gotop -v
panic: runtime error: integer divide by zero
Please give the following info when creating an issue:
* The output of uname -a
1007)~ % uname -a
Darwin PHLLT8526.middleearth.home 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
* Terminal shell (like zsh or bash)
1028)~ % $SHELL --version
zsh 5.4.2 (x86_64-apple-darwin17.3.0)
* Terminal emulator (like iTerm or gnome terminal)
iTerm2
Build 3.1.6
* Using tmux?
Absolutely!
1030)~ % tmux -V
tmux 2.6
Hi,
First of all, good work.
Please don't start CPU names from 1, it will confuse people. Just reflecting what is on the system would be better:
# ls -1d /sys/devices/system/cpu/cpu[0-9]
/sys/devices/system/cpu/cpu0/
/sys/devices/system/cpu/cpu1/
/sys/devices/system/cpu/cpu2/
/sys/devices/system/cpu/cpu3/
/sys/devices/system/cpu/cpu4/
/sys/devices/system/cpu/cpu5/
/sys/devices/system/cpu/cpu6/
/sys/devices/system/cpu/cpu7/
Kernel: Linux resilio 4.13.16-1-pve #1 SMP PVE 4.13.16-45 (Wed, 28 Mar 2018 15:47:11 +0200) x86_64 GNU/Linux
Bash, Terminal Emulator: ITerm
Latest version from github
OS: Debian 9.4
Error caught. Exiting program.
Issue with table rows.
Diagnostics:
rowNum: -1
self.TopRow: -1
len(self.Rows): 15
self.Y: 17
panic: 1
goroutine 25 [running]:
github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui.Error(0x585ac3, 0xa, 0xc420720100, 0x38)
/home/cjbassi/go/src/github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui/utils.go:35 +0x23f
github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui.(*Table).Buffer(0xc4200a6210, 0x0)
/home/cjbassi/go/src/github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui/table.go:79 +0x8da
github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui.(*Grid).Buffer(0xc420059a40, 0x58e448)
/home/cjbassi/go/src/github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui/grid.go:53 +0xbc
github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui.Render.func1(0xc420235330, 0x5a16e0, 0xc420059a40)
/home/cjbassi/go/src/github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui/render.go:23 +0x76
created by github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui.Render
/home/cjbassi/go/src/github.com/cjbassi/gotop/vendor/github.com/cjbassi/termui/render.go:21 +0xa7
run gotop it only shows logs and exited
2018/04/10 13:54:01
self.Count: 8
gopsutil.Counts(): 8
len(percents): 0
percents: []
One of my favorite features of ps
/htop
is the ability to display processes hierarchically. It's really nice to see the process tree. For example:
[root@machine ~]# ps aux -H
...snip...
root 1112 0.0 0.0 82468 1396 ? Ss Apr16 0:00 /usr/sbin/sshd
root 12834 1.0 0.2 142960 5144 ? Ss 09:23 0:00 sshd: root@pts/0
root 12836 0.0 0.1 115384 2020 pts/0 Ss 09:23 0:00 -bash
root 12853 0.0 0.1 151192 1908 pts/0 R+ 09:23 0:00 ps aux -H
htop
has similar functionality.
I don't know how much of a pain this would be to implement, so please feel free to close this if it would be obnoxious to do. I really love this tool and I figured this feature might be useful to people.
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.