Giter VIP home page Giter VIP logo

gotop's Introduction

NO LONGER MAINTAINED. A maintained fork of gotop exists at https://github.com/xxxserxxx/gotop.



Another terminal based graphical activity monitor, inspired by gtop and vtop, this time written in Go!

Installation

Working and tested on Linux, FreeBSD and macOS. Windows support is planned. OpenBSD works with some caveats.

Source

go get github.com/cjbassi/gotop

Prebuilt binaries

Note: Doesn't require Go.

Clone the repo and then run scripts/download.sh to download the correct binary for your system from the releases tab:

git clone --depth 1 https://github.com/cjbassi/gotop /tmp/gotop
/tmp/gotop/scripts/download.sh

Then move gotop into your $PATH somewhere.

Arch Linux

Install gotop, gotop-bin, or gotop-git from the AUR.

FreeBSD

pkg install gotop

Homebrew

brew tap cjbassi/gotop
brew install gotop

Snap

snap install gotop-cjbassi

Note: You may need to enable certain permissions for all of the widgets to work:

snap connect gotop-cjbassi:hardware-observe
snap connect gotop-cjbassi:mount-observe
snap connect gotop-cjbassi:system-observe

Usage

Keybinds

  • Quit: q or <C-c>
  • Process navigation
    • k and <Up>: up
    • j and <Down: down
    • <C-u>: half page up
    • <C-d>: half page down
    • <C-b>: full page up
    • <C-f>: full page down
    • gg and <Home>: jump to top
    • G and <End>: jump to bottom
  • Process actions:
    • <Tab>: toggle process grouping
    • dd: kill selected process or group of processes
  • Process sorting
    • c: CPU
    • m: Mem
    • p: PID
  • CPU and Mem graph scaling:
    • h: scale in
    • l: scale out
  • ?: toggles keybind help menu

Mouse

  • click to select process
  • mouse wheel to scroll through processes

Colorschemes

gotop ships with a few colorschemes which can be set with the -c flag followed by the name of one. You can find all the colorschemes in the colorschemes folder.

To make a custom colorscheme, check out the template for instructions and then use default.json as a starter. Then put the file at ~/.config/gotop/<name>.json and load it with gotop -c <name>. Colorschemes PR's are welcome!

CLI Options

-c, --color=NAME Set a colorscheme.
-m, --minimal Only show CPU, Mem and Process widgets.
-r, --rate=RATE Number of times per second to update CPU and Mem widgets [default: 1].
-V, --version Print version and exit.
-p, --percpu Show each CPU in the CPU widget.
-a, --averagecpu Show average CPU in the CPU widget.
-s, --statusbar Show a statusbar with the time.
-b, --battery Show battery level widget (minimal turns off). preview -i, --interface=NAME Select network interface [default: all].

Built With

Stargazers over time

Stargazers over time

gotop's People

Contributors

0mp avatar 999eagle avatar brlin-tw avatar chiefy avatar cjbassi avatar codelingobot avatar f1337 avatar h8liu avatar mattllvw avatar omar-polo avatar panter-dsd avatar phpor avatar reasonablytall avatar tie avatar whuang8 avatar zp 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

gotop's Issues

macOS: process name is cropped

See the image:

screen shot 2018-08-08 at 13 23 42

  • The output of uname -a

Darwin november 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64

  • Terminal shell (like zsh or bash)

bash

  • Terminal emulator (like iTerm or gnome terminal)

iTerm

  • Using tmux?

Nope

Adding OSX support

Need to fix the following issues caused by gopsutil on OSX:

  • temperatures widget doesn't work
  • CPU percentages only work when building from source (cross compiling doesn't work)
  • getting process info takes a long time and is CPU intensive

I don't have a Mac to test on so help is appreciated.

Quantity Rounding

* 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.

panic: runtime error: invalid memory address or nil pointer dereference

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?

EPYC/ZEN CPUs not supported ?

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

epyc_64c_box

  • The output of 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

  • Terminal shell (like zsh or bash)
$ echo $SHELL
/bin/bash

  • Terminal emulator (like iTerm or gnome terminal)
konsole -> ssh -> server ( cli )

  • Using tmux?
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

Support dynamic color schemes

  • The output of uname -a: Linux void-lap 4.17.14_2 #1 SMP PREEMPT Wed Aug 15 13:45:55 UTC 2018 x86_64 GNU/Linux
  • Any relevenat hardware info:
  • Terminal shell (like zsh or bash): bash
  • Terminal emulator (like iTerm or gnome terminal): st
  • tmux version if using tmux: none

It 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.

segmentation violation on arch linux

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:

  • gotop -v : 1.4.0
  • uname -a : Linux ixo-dev 4.16.8-1-ARCH #1 SMP PREEMPT Wed May 9 11:25:02 UTC 2018 x86_64 GNU/Linux
  • Terminal shell : bash
  • Terminal emulator : gnome terminal
  • Using tmux : no

Implement displaying processes hierarchically

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.

Panic: integer divide by zero

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

Excessive panics/crashes

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.

Theme directory?

Maybe a silly question but where do I need to save a *.go theme configuration, in order to make it available on gotop?

Slow startup

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:

  • which one it is
  • how long it stays there
  • what your OS is
  • whether gotop does eventually display normally

Thanks!

Add support for 32bit OSX

Currently getting compiling errors due to gopsutil when trying to cross compile for 32bit OSX on Linux 64bit

Raspberry compatibility

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

Process grouping not working

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:

  • The output of 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
  • Terminal shell (like zsh or bash)
    bash
  • Terminal emulator (like iTerm or gnome terminal)
    ubuntu default terminal
  • Using tmux?
    nope

image

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 ???)

gotop show logs and exit

  • Operating System : macOS 10.13.3 (17D102)
  • CPU architecture : Darwin MacBookPro 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
  • zsh
  • Using tmux? no
  • use download script

run gotop it only shows logs and exited

2018/04/10 13:54:01 
self.Count: 8
gopsutil.Counts(): 8
len(percents): 0
percents: []

Panic caused by sparkline issue

I got it 5 times today. It generally happen when I do some heavy cpu docker build.

After the panic, the terminal is unusable, I have to close it and restart it.

If you need more informations on the system I'll be happy to help.

image

Termui code cleanup

  • Buffers should ignore characters set outside the widget area
    • ignore writes or give an error?
  • Blocks should be indexed at 0, and maybe change their X and Y variables too
  • draw borders and label after widget contents
  • only merge buffers that are within the original's area

No graphs displayed

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:

  • The output of 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
  • Terminal shell (like zsh or bash)
    zsh
  • Terminal emulator (like iTerm or gnome terminal)
    Xterm
  • Using tmux?
    Nope

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.

screenshot_2018-07-24_09-11-11

Panic on Mac caused by cpu percentages issue

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

Terminating OpenVPN process makes gotop exit

  • gotop -v: 1.4.0
  • uname -a: Linux ege-arch 4.16.10-1-macbook #1 SMP PREEMPT Mon May 21 20:51:39 EDT 2018 x86_64 GNU/Linux
  • Shell: zsh
  • Emulator: Alacritty
  • No tmux

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

Panic on Windows

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

Crash on start

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

Parasitic display

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.

Panic: Issue with CPU percentages

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

Wrong download for "aarch64"

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.

Convert memory and network usage data from integer to float.

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?

Suggestion: List Package Temp before Core Temps

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.

Crash with Cpu Isolation

- 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.

Memory Usage widget

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

Linux distro packages

I think you should try to get this into Linux disros.

So maybe we can track this here?

Please don't encourage bad practices

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.

Use background color for selected foreground

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.

No Temperatures shown with Raspberry Pi

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

Please don't change cpu names

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/

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.