-
-
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
Improve AIX Support #1651
Improve AIX Support #1651
Conversation
…commit). Version set properly to 1.18, which is the new minimum needed for changes in this branch. Run go mod tidy again with version set back to 1.18.
@shirou If you're at all concerned about AIX support, I'm willing to be a code owner for the AIX portions only to help alleviate that. Alternatively, I can help you get set up with an emulated AIX system to work from. |
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.
Thank you for your contribution! I haven't actually run it, but it looks fine at first glance, with some nit comments. If there are any issues on AIX, someone will likely open an issue for it. This is how we've handled other architectures in the past.
Unrelated to this PR, but for my future reference, could you let me know the best way to set up an AIX emulation environment? Would QEMU be a good option?
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/go-ole/go-ole v1.2.6 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/tklauser/numcpus v0.6.1 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) | ||
|
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.
Do those required
need to be added to the go.mod file?
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.
You'll likely know better than I do. I simply rand go mod tidy
and went with what go itself says.
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.
I tried removing them, and running go mod tidy
again. It readded them. So golang thinks they need to be there.
@@ -1,6 +1,6 @@ | |||
module github.com/shirou/gopsutil/v3 | |||
|
|||
go 1.15 | |||
go 1.18 |
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.
I know the 1.15 is too old, but should it be updated in this PR?
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.
It is required for the code in this PR to actually function, so in my opinion yes. I will however defer it to another PR if you think that best.
Yes, but not using libvirt (virsh or the gui virt-manager). I scoured the internet, and played around a lot, to get this to work. It is a combination of other peoples' work, and my own knowledge. I only have it working for AIX 7.2 at this time, still working on 7.3.
You can edit the cpu line, I've had it working with just EDIT: This was the command I used to create my disk image: Would you also be interested in my little test/sample program that I used to actually test this manually? I can dump it into a gist. |
Move a function from nocgo to main file for disk package
Here is the test program gist https://gist.github.com/Dylan-M/3dd22484c7fa30e6826ede5566e291eb |
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.
Thank you for your great contribution! Unfortunately, I haven't had the time to test this PR with QEMU, but it seems unlikely there will be any issues. If there are any problems, someone will probably create an issue. Additionally, gopsutil depends on sys/unix, which specifies Go 1.18, so it seems necessary to update to Go 1.18.
[![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/v3](https://github.com/shirou/gopsutil) | `v3.24.4` -> `v3.24.5` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.4/v3.24.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.4/v3.24.5?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/v3)</summary> ### [`v3.24.5`](https://github.com/shirou/gopsutil/releases/tag/v3.24.5) [Compare Source](https://github.com/shirou/gopsutil/compare/v3.24.4...v3.24.5) <!-- Release notes generated using configuration in .github/release.yml at v3.24.5 --> #### What's Changed ##### cpu - Improve AIX Support by [@​Dylan-M](https://github.com/Dylan-M) in [https://github.com/shirou/gopsutil/pull/1651](https://github.com/shirou/gopsutil/pull/1651) ##### process - Add fallback for lsof output by [@​MDrakos](https://github.com/MDrakos) in [https://github.com/shirou/gopsutil/pull/1640](https://github.com/shirou/gopsutil/pull/1640) - \[process]\[openbsd]: add cwd on openbsd. by [@​shirou](https://github.com/shirou) in [https://github.com/shirou/gopsutil/pull/1649](https://github.com/shirou/gopsutil/pull/1649) ##### Other Changes - remove duplicate code in mktypes.sh by [@​zhanluxianshen](https://github.com/zhanluxianshen) in [https://github.com/shirou/gopsutil/pull/1646](https://github.com/shirou/gopsutil/pull/1646) - add arm/arm64 category for github pr label. by [@​zhanluxianshen](https://github.com/zhanluxianshen) in [https://github.com/shirou/gopsutil/pull/1647](https://github.com/shirou/gopsutil/pull/1647) #### New Contributors - [@​zhanluxianshen](https://github.com/zhanluxianshen) made their first contribution in [https://github.com/shirou/gopsutil/pull/1646](https://github.com/shirou/gopsutil/pull/1646) - [@​MDrakos](https://github.com/MDrakos) made their first contribution in [https://github.com/shirou/gopsutil/pull/1640](https://github.com/shirou/gopsutil/pull/1640) - [@​Dylan-M](https://github.com/Dylan-M) made their first contribution in [https://github.com/shirou/gopsutil/pull/1651](https://github.com/shirou/gopsutil/pull/1651) **Full Changelog**: shirou/gopsutil@v3.24.4...v3.24.5 </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 has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM4OC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
…3356) [![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/v3](https://github.com/shirou/gopsutil) | `v3.24.4` -> `v3.24.5` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.4/v3.24.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fshirou%2fgopsutil%2fv3/v3.24.4/v3.24.5?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/v3)</summary> ### [`v3.24.5`](https://github.com/shirou/gopsutil/releases/tag/v3.24.5) [Compare Source](https://github.com/shirou/gopsutil/compare/v3.24.4...v3.24.5) <!-- Release notes generated using configuration in .github/release.yml at v3.24.5 --> #### What's Changed ##### cpu - Improve AIX Support by [@​Dylan-M](https://github.com/Dylan-M) in [https://github.com/shirou/gopsutil/pull/1651](https://github.com/shirou/gopsutil/pull/1651) ##### process - Add fallback for lsof output by [@​MDrakos](https://github.com/MDrakos) in [https://github.com/shirou/gopsutil/pull/1640](https://github.com/shirou/gopsutil/pull/1640) - \[process]\[openbsd]: add cwd on openbsd. by [@​shirou](https://github.com/shirou) in [https://github.com/shirou/gopsutil/pull/1649](https://github.com/shirou/gopsutil/pull/1649) ##### Other Changes - remove duplicate code in mktypes.sh by [@​zhanluxianshen](https://github.com/zhanluxianshen) in [https://github.com/shirou/gopsutil/pull/1646](https://github.com/shirou/gopsutil/pull/1646) - add arm/arm64 category for github pr label. by [@​zhanluxianshen](https://github.com/zhanluxianshen) in [https://github.com/shirou/gopsutil/pull/1647](https://github.com/shirou/gopsutil/pull/1647) #### New Contributors - [@​zhanluxianshen](https://github.com/zhanluxianshen) made their first contribution in [https://github.com/shirou/gopsutil/pull/1646](https://github.com/shirou/gopsutil/pull/1646) - [@​MDrakos](https://github.com/MDrakos) made their first contribution in [https://github.com/shirou/gopsutil/pull/1640](https://github.com/shirou/gopsutil/pull/1640) - [@​Dylan-M](https://github.com/Dylan-M) made their first contribution in [https://github.com/shirou/gopsutil/pull/1651](https://github.com/shirou/gopsutil/pull/1651) **Full Changelog**: shirou/gopsutil@v3.24.4...v3.24.5 </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 has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM4OC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Implement additional AIX support
I have very little Golang experience.
So... please point out anything I'm doing wrong from Golang perspective
Also anything I can do to improve efficiency of some of the things I had to do as loops to pick something out of several lines.
Or really, anything else. I don't take offense, unless you're rude about it. Constructive criticism is always welcome.
This should now support all packages except process, which I don't have the time to develop (process is very in-depth)
Added:
Partially addresses #1490