-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: read temperature sensors darwin arm #1672
Conversation
Thank you for your contribution! At first glance, it looks good. However, I don't have an environment to test it, so could someone else please verify its functionality? And also,
|
Sure! |
@shirou Can we get this merged? I'd like to release a new version of my app [with Mac ARM temperatures working], but not with a replace line in the go mod. I'm happy to pin to the Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Thank you for your contribution!
And @davidnewhall, your assistance with the confirmation was very helpful. Thank you so much
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/shirou/gopsutil/v4](https://github.com/shirou/gopsutil) | `v4.24.6` -> `v4.24.7` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fshirou%2fgopsutil%2fv4/v4.24.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fshirou%2fgopsutil%2fv4/v4.24.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fshirou%2fgopsutil%2fv4/v4.24.6/v4.24.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fshirou%2fgopsutil%2fv4/v4.24.6/v4.24.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>shirou/gopsutil (github.com/shirou/gopsutil/v4)</summary> ### [`v4.24.7`](https://github.com/shirou/gopsutil/releases/tag/v4.24.7) [Compare Source](https://github.com/shirou/gopsutil/compare/v4.24.6...v4.24.7) <!-- Release notes generated using configuration in .github/release.yml at v4.24.7 --> #### **Important Notice Regarding Value Changes on mem.SwapMemory() on Windows** In change [#​1677](https://github.com/shirou/gopsutil/issues/1677), the values returned by `mem.SwapMemory()` on Windows have been significantly revised. Previously, these values were calculated from the [`PERFORMANCE_INFORMATION`](https://learn.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-performance_information) structure of the [`GetPerformanceInfo`](https://learn.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getperformanceinfo) win32 function, but this calculation was incorrect. Consequently, it has been adjusted to align with the [psutil implementation](https://github.com/giampaolo/psutil/blob/c034e6692cf736b5e87d14418a8153bb03f6cf42/psutil/\_pswindows.py#L250-L273). As a result, the values returned by `mem.SwapMemory()` are expected to differ greatly from previous values. #### What's Changed ##### docker - fix: docker_memory in centos\_7.5 & docker\_1.13.1 by [@​coderZoe](https://github.com/coderZoe) in [shirou/gopsutil#1670 ##### mem - \[windows]\[mem]: change to use Performance Counter on SwapMemory. by [@​shirou](https://github.com/shirou) in [shirou/gopsutil#1677 ##### Other Changes - fix: read temperature sensors darwin arm by [@​Girbons](https://github.com/Girbons) in [shirou/gopsutil#1672 - fix: remove macos11 and add ubuntu-24.04 on GitHub runner list. by [@​shirou](https://github.com/shirou) in [shirou/gopsutil#1676 #### New Contributors - [@​coderZoe](https://github.com/coderZoe) made their first contribution in [shirou/gopsutil#1670 **Full Changelog**: shirou/gopsutil@v4.24.6...v4.24.7 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/shirou/gopsutil/v4](https://github.com/shirou/gopsutil) | `v4.24.6` -> `v4.24.7` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fshirou%2fgopsutil%2fv4/v4.24.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fshirou%2fgopsutil%2fv4/v4.24.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fshirou%2fgopsutil%2fv4/v4.24.6/v4.24.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fshirou%2fgopsutil%2fv4/v4.24.6/v4.24.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>shirou/gopsutil (github.com/shirou/gopsutil/v4)</summary> ### [`v4.24.7`](https://github.com/shirou/gopsutil/releases/tag/v4.24.7) [Compare Source](https://github.com/shirou/gopsutil/compare/v4.24.6...v4.24.7) <!-- Release notes generated using configuration in .github/release.yml at v4.24.7 --> #### **Important Notice Regarding Value Changes on mem.SwapMemory() on Windows** In change [#​1677](https://github.com/shirou/gopsutil/issues/1677), the values returned by `mem.SwapMemory()` on Windows have been significantly revised. Previously, these values were calculated from the [`PERFORMANCE_INFORMATION`](https://learn.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-performance_information) structure of the [`GetPerformanceInfo`](https://learn.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getperformanceinfo) win32 function, but this calculation was incorrect. Consequently, it has been adjusted to align with the [psutil implementation](https://github.com/giampaolo/psutil/blob/c034e6692cf736b5e87d14418a8153bb03f6cf42/psutil/\_pswindows.py#L250-L273). As a result, the values returned by `mem.SwapMemory()` are expected to differ greatly from previous values. #### What's Changed ##### docker - fix: docker_memory in centos\_7.5 & docker\_1.13.1 by [@​coderZoe](https://github.com/coderZoe) in [shirou/gopsutil#1670 ##### mem - \[windows]\[mem]: change to use Performance Counter on SwapMemory. by [@​shirou](https://github.com/shirou) in [shirou/gopsutil#1677 ##### Other Changes - fix: read temperature sensors darwin arm by [@​Girbons](https://github.com/Girbons) in [shirou/gopsutil#1672 - fix: remove macos11 and add ubuntu-24.04 on GitHub runner list. by [@​shirou](https://github.com/shirou) in [shirou/gopsutil#1676 #### New Contributors - [@​coderZoe](https://github.com/coderZoe) made their first contribution in [shirou/gopsutil#1670 **Full Changelog**: shirou/gopsutil@v4.24.6...v4.24.7 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xOC4xNyIsInVwZGF0ZWRJblZlciI6IjM4LjE4LjE3IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Description
proposal to read temperature sensors for mac with apple silicon
fixes #1332
Tested with M1
![image](https://private-user-images.githubusercontent.com/5927088/346152386-e8022046-69b9-4ade-9e9a-d69b6c5c57ed.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNzI4NTMsIm5iZiI6MTcyNjE3MjU1MywicGF0aCI6Ii81OTI3MDg4LzM0NjE1MjM4Ni1lODAyMjA0Ni02OWI5LTRhZGUtOWU5YS1kNjliNmM1YzU3ZWQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMjAyMjMzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Yzk2MWM0NjczYWU2YjBiOTY3ZTFjYzQ4ZWY1MGQ2Nzc4NDE3OTI4Y2YzZWMwNTBjYzQ3MGNjMjk1YmQzMmQyOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.SLBD5CoSxqHzRCKb5xgeXiLsQH8kvx9zm945de1QQ2E)