Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meaningless temperature names on macOS #71

Closed
moonfruit opened this issue Nov 27, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@moonfruit
Copy link

commented Nov 27, 2018

Please give the following info:

  • The output of uname -a: Darwin xxxx.local 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct 5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64
  • Any relevenat hardware info:
  • Terminal shell (like zsh or bash): zsh
  • Terminal emulator (like iTerm or gnome terminal): iTerm
  • tmux version if using tmux:

On the macOS, the temperature names is meaningless. We don't know which one is cpu temperature, or gpu temperature.

See the image:

screenshot_2018-11-27_18-37-54

@cjbassi

This comment has been minimized.

Copy link
Owner

commented Dec 2, 2018

That is unfortunate and I'm not sure why that happens. I'll create an issue in the gopsutil repo to see if there's anything they can do about that. In the meantime, I pushed a commit to master that removes all temperatures that output 0, so that should clean things up a bit.

@cjbassi

This comment has been minimized.

Copy link
Owner

commented Dec 2, 2018

Also, could you give provide your computer specs or computer model? That might help with debugging.

@cjbassi cjbassi added the dep:gopsutil label Dec 2, 2018

@moonfruit

This comment has been minimized.

Copy link
Author

commented Dec 3, 2018

MacBook Pro (15-inch, 2017) - MacBookPro14,3
macOS 10.14.1
cpu: Intel Core i7 2.9GHz
memory: 8 GB LPDDR3 2133 MHz x2
gpu: Intel HD Graphics 630
gpu: Radeon Pro 560

@cjbassi cjbassi removed the dep:gopsutil label Dec 3, 2018

cjbassi added a commit that referenced this issue Dec 3, 2018

@cjbassi

This comment has been minimized.

Copy link
Owner

commented Dec 3, 2018

I pushed some changes to master that I think fix the issue. Could you try the master branch and let me know if it works?

edit: Let me know if you need me to build you a binary to test instead of building from source.

@moonfruit

This comment has been minimized.

Copy link
Author

commented Dec 4, 2018

e596d52 build fail on macOS

# github.com/cjbassi/gotop/src/widgets
src/widgets/temp_darwin.go:20:3: could not determine kind of name for C.AMBIENT_AIR_0
src/widgets/temp_darwin.go:21:3: could not determine kind of name for C.AMBIENT_AIR_1
src/widgets/temp_darwin.go:51:51: could not determine kind of name for C.CELSIUS
src/widgets/temp_darwin.go:22:3: could not determine kind of name for C.CPU_0_DIODE
src/widgets/temp_darwin.go:23:3: could not determine kind of name for C.CPU_0_HEATSINK
src/widgets/temp_darwin.go:24:3: could not determine kind of name for C.CPU_0_PROXIMITY
src/widgets/temp_darwin.go:25:3: could not determine kind of name for C.ENCLOSURE_BASE_0
src/widgets/temp_darwin.go:26:3: could not determine kind of name for C.ENCLOSURE_BASE_1
src/widgets/temp_darwin.go:27:3: could not determine kind of name for C.ENCLOSURE_BASE_2
src/widgets/temp_darwin.go:28:3: could not determine kind of name for C.ENCLOSURE_BASE_3
src/widgets/temp_darwin.go:29:3: could not determine kind of name for C.GPU_0_DIODE
src/widgets/temp_darwin.go:30:3: could not determine kind of name for C.GPU_0_HEATSINK
src/widgets/temp_darwin.go:31:3: could not determine kind of name for C.GPU_0_PROXIMITY
src/widgets/temp_darwin.go:32:3: could not determine kind of name for C.HARD_DRIVE_BAY
src/widgets/temp_darwin.go:34:3: could not determine kind of name for C.MEMORY_SLOTS_PROXIMITY
src/widgets/temp_darwin.go:33:3: could not determine kind of name for C.MEMORY_SLOT_0
src/widgets/temp_darwin.go:35:3: could not determine kind of name for C.NORTHBRIDGE
src/widgets/temp_darwin.go:36:3: could not determine kind of name for C.NORTHBRIDGE_DIODE
src/widgets/temp_darwin.go:37:3: could not determine kind of name for C.NORTHBRIDGE_PROXIMITY
src/widgets/temp_darwin.go:38:3: could not determine kind of name for C.THUNDERBOLT_0
src/widgets/temp_darwin.go:39:3: could not determine kind of name for C.THUNDERBOLT_1
src/widgets/temp_darwin.go:40:3: could not determine kind of name for C.WIRELESS_MODULE
src/widgets/temp_darwin.go:46:8: could not determine kind of name for C.close_smc
src/widgets/temp_darwin.go:51:25: could not determine kind of name for C.get_tmp
src/widgets/temp_darwin.go:45:2: could not determine kind of name for C.open_smc

This is because import "C" can not be placed in parentheses with other imports.

// #cgo LDFLAGS: -framework IOKit
// #include "include/smc.c"
import (
"C"
"github.com/cjbassi/gotop/src/utils"
)

change codes to

// #cgo LDFLAGS: -framework IOKit
// #include "include/smc.c"
import "C"
import (
	"github.com/cjbassi/gotop/src/utils"
)

It works well.

gotop

@cjbassi cjbassi closed this in a2d80c8 Dec 4, 2018

@cjbassi

This comment has been minimized.

Copy link
Owner

commented Dec 4, 2018

Yah I was wondering that. Just fixed it, and glad it's working for you.

tonylambiris added a commit to tonylambiris/gotop that referenced this issue Dec 14, 2018

tonylambiris added a commit to tonylambiris/gotop that referenced this issue Dec 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.