Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

meaningless temperature names on macOS #71

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

meaningless temperature names on macOS #71

moonfruit opened this issue Nov 27, 2018 · 6 comments

Comments

@moonfruit
Copy link

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
Copy link
Owner

cjbassi 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
Copy link
Owner

cjbassi commented Dec 2, 2018

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

@moonfruit
Copy link
Author

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 added a commit that referenced this issue Dec 3, 2018
@cjbassi
Copy link
Owner

cjbassi 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
Copy link
Author

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 as completed in a2d80c8 Dec 4, 2018
@cjbassi
Copy link
Owner

cjbassi commented Dec 4, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants