Giter VIP home page Giter VIP logo

Comments (32)

pbnj avatar pbnj commented on May 20, 2024 2

@cjbassi:

  • yes, I'm on macOS Sierra 10.12.6.
  • Terminal Stack: iTerm + zsh + oh-my-zsh
  • The issue is at startup from what I can tell. Launching gotop command just hangs.

Update 1: I'm also running inside tmux v2.6

from gotop.

pbnj avatar pbnj commented on May 20, 2024 1

@cjbassi - I just ran go get github.com/cjbassi/gotop and ran $GOPATH/bin/gotop, but it's completely blank nothing happens.

Also, tried go build and running ./gotop. Same result.

screen shot 2018-04-09 at 11 20 20 am

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024 1

@petermbenjamin the panic you were getting should hopefully be fixed. Can you try the latest version to see what happens this time?

from gotop.

pbnj avatar pbnj commented on May 20, 2024 1

@cjbassi - Indeed.
Tested by running:

$ go get -u -v github.com/cjbassi/gotop
$ gotop

And it doesn't crash or panic.

But, it's still taking about a minute before anything appears on the screen. I am not sure why.

Would you like me to open a separate GH issue for the slow startup time on macOS?
Also, any pointers/directions on troubleshooting/debugging this problem?

from gotop.

pbnj avatar pbnj commented on May 20, 2024 1

from gotop.

stephencornelius avatar stephencornelius commented on May 20, 2024 1

I get the same issue as @rkumar when installing via brew but it works when installing via goget

from gotop.

maxtar avatar maxtar commented on May 20, 2024 1

@cjbassi Created :)

from gotop.

chlins avatar chlins commented on May 20, 2024

2018-04-09 4 54 09
Mac OS 10.13.3

from gotop.

heruan avatar heruan commented on May 20, 2024

Same here, running macOS 10.13.4. Installed with:

sh -c "$(curl https://raw.githubusercontent.com/cjbassi/gotop/master/download.sh)"

from gotop.

danielmunoz avatar danielmunoz commented on May 20, 2024

Same. Running macOS 10.12.6.

panic: runtime error: index out of range

goroutine 6 [running]:
github.com/cjbassi/gotop/widgets.(*CPU).update(0xc42000b080)
	/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

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

I don't have a mac to test on, but I just pushed a commit to the repo and I'd appreciate if someone could go get github.com/cjbassi/gotop, run gotop, and then let me know what happens or what the error messages are this time. Thanks!

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

@chlins is a different issue I think, similar to #12.

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

@petermbenjamin Are you also on OSX? What terminal are you using?

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

Also, are these issues on startup? Or when?

from gotop.

pbnj avatar pbnj commented on May 20, 2024

@cjbassi - ok, some updates.

  • I tried it on Terminal.app (native terminal client on macOS). It took a few minutes (~ 1-2 mins) before gotop displayed the visualizations.

screen shot 2018-04-09 at 1 28 40 pm

  • I tried it on iTerm and waited a few minutes to compare. It erred out with the following error message:

screen shot 2018-04-09 at 1 31 30 pm

Update 1:

  • Tried on iTerm outside of tmux, still takes about 1-2 mins before it throws error (which seems to be similar to #12):

screen shot 2018-04-09 at 1 33 50 pm

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

@petermbenjamin I appreciate all the troubleshooting you're doing. Looks like the index out of range error is the same one that chlins is getting. I just pushed some changes that include better error logging so it'd help if you could update and build/run from source and see what the errors give you this time.

from gotop.

viktor-evdokimov avatar viktor-evdokimov commented on May 20, 2024

Just checked with the same config as @petermbenjamin but without tmux. It seems to work, only i have light solar theme and text is white on white

screen shot 2018-04-09 at 6 16 47 pm

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

@viktor-evdokimov I think the issue there is that the default colorscheme for gotop has a transparent background which doesn't look great on white colored terminals. You could try one of the other colorschemes by using the -c flag, or if none of those work I could add a colorscheme that better suits white backgrounds.

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

@viktor-evdokimov Just added the 'default-dark' colorscheme for brighter backgrounds to the latest release. Let me know if that works or if there's still issues.

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

@petermbenjamin Yah I think opening a new issue would be good.

I think the best way to debug the slow startup is to throw a bunch of fmt.Println("1"), fmt.Println("2"), etc into main.go and see where the program hangs for a while. If you're not familiar with Go I could create a branch with the print statements for you to test, just let me know.

from gotop.

heliostatic avatar heliostatic commented on May 20, 2024

Also on 10.12.6, clean install via

$ go get -u -v github.com/cjbassi/gotop
$ gotop

and this is the error I'm getting after about 45-60 seconds:

Error caught. Exiting program.

Issue with CPU percentages.

Diagnostics:
self.Count: 4
gopsutil.Counts(): 4
len(percents): 0
percents: []
self.interval: 1s

panic: 1

goroutine 19 [running]:
github.com/cjbassi/gotop/utils.Error(0x1183b16, 0xf, 0xc42017e060, 0x52)
	/home/cjbassi/go/src/github.com/cjbassi/gotop/utils/utils.go:30 +0x23f
github.com/cjbassi/gotop/widgets.(*CPU).update(0xc420092fa0)
	/home/cjbassi/go/src/github.com/cjbassi/gotop/widgets/cpu.go:55 +0x532
created by github.com/cjbassi/gotop/widgets.NewCPU
	/home/cjbassi/go/src/github.com/cjbassi/gotop/widgets/cpu.go:37 +0x2d3

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

@heliostatic So the program runs and works for about 45 seconds and then gives that error?

The error is caused by gopsutil which I've already submitted an issue to, but it's good to get more info.

from gotop.

heliostatic avatar heliostatic commented on May 20, 2024

@cjbassi Good clarification--No, it sits at a blank terminal and then errors out.

from gotop.

rkumar avatar rkumar commented on May 20, 2024

Getting this on OSX Sierra on both iTerm and Terminal. Nothing happens for half a minute, then I get this error. Installed using homebrew.

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 17 [running]:
github.com/cjbassi/gotop/utils.Error(0x1184197, 0xf, 0xc4201ba060, 0x52)
/home/cjbassi/go/src/github.com/cjbassi/gotop/utils/utils.go:30 +0x23f
github.com/cjbassi/gotop/widgets.(*CPU).update(0xc420156000)
/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

from gotop.

maxtar avatar maxtar commented on May 20, 2024

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

from gotop.

f1337 avatar f1337 commented on May 20, 2024

Worked for me, just now, with a 20-second startup delay (timed with stopwatch).go is installed via homebrew (brew install go). I compiled from source:

go get -u -v github.com/cjbassi/gotop
gotop

My system details:
macOS High Sierra 10.13.4
MacBook Pro (Retina, 15-inch, Mid 2015)
Processor: 2.5 GHz i7
Memory: 16 GB
Terminal: iTerm2 + fish shell + ohmyfish. no tmux.

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

Thanks for all the info and sorry people have been having issues. It turns out gopsutil has some issues on OSX which makes gotop unusable on OSX right now. Hoping to fix that in the future, but I also don't have a mac to test on right now so help is appreciated. Going to close this issue and open another one that pools the issues people have been having on OSX.

from gotop.

maxtar avatar maxtar commented on May 20, 2024

What about windows?

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

@maxtar gotop is untested on windows but feel free to try it and let me know if it works or create an issue if it doesn't. I'd be happy to add support if people want it.

from gotop.

maxtar avatar maxtar commented on May 20, 2024

@cjbassi As I mentioned here I've got the same issue. Need I creating new issue fro windows?

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

@maxtar Oh sorry, I didn't see that you were having the same issue on windows. But yah actually if you create a new issue for that, that would be great. Thanks.

from gotop.

cjbassi avatar cjbassi commented on May 20, 2024

gotop should be working on OSX now, and you can install using either Git, Homebrew, or from Source as documented in the readme. Let me know if you're still having any issues! Thanks @f1337 for helping get it to work!

from gotop.

Related Issues (20)

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.