Separate out linux & windows implementation of CollectSystemInfo()#5341
Merged
Conversation
derekwbrown
force-pushed
the
db/process_system_info_win
branch
3 times, most recently
from
April 17, 2020 06:12
1fdc853 to
7f7765a
Compare
albertvaka
reviewed
Apr 17, 2020
Comment on lines
+43
to
+44
| PhysicalId: "", | ||
| CoreId: "", |
Contributor
There was a problem hiding this comment.
Is it okay to lose these fields?
Contributor
Author
There was a problem hiding this comment.
those weren't being filled in by the underlying gopsutil anyway
| clockSpeed, _ := strconv.ParseInt(cpuInfo["mhz"], 10, 64) | ||
| l2Cache, _ := strconv.ParseInt(cpuInfo["cache_size_l2"], 10, 64) | ||
| cpus := make([]*model.CPUInfo, 0) | ||
| for i := int64(0); i < physCount; i++ { |
Contributor
There was a problem hiding this comment.
This assumes all CPUs installed are equal, which might not be the case. Can this be a problem?
Contributor
Author
There was a problem hiding this comment.
If you have multiple CPUs they have to be equal.
On windows, don't use WMI, use gohai implementation that collects same information (and can gracefully fail when some info isn't available, e.g. in a container) . Allows process agent to start in a Nano container. Requires related gohai change.
derekwbrown
force-pushed
the
db/process_system_info_win
branch
from
May 5, 2020 15:26
7f7765a to
07bb484
Compare
albertvaka
previously approved these changes
May 6, 2020
remove extra import Update pkg/process/checks/system_info_windows.go Co-authored-by: Albert Vaca <[email protected]>
derekwbrown
force-pushed
the
db/process_system_info_win
branch
from
May 6, 2020 16:37
91f6999 to
1cd4351
Compare
albertvaka
approved these changes
May 6, 2020
albertvaka
added a commit
that referenced
this pull request
May 11, 2020
Process Agent was fixed to work on Nano in #5341
shang-wang
approved these changes
May 11, 2020
albertvaka
added a commit
that referenced
this pull request
May 12, 2020
Process Agent was fixed to work on Nano in #5341
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(do not merge yet. Needs associated gohai change to be merged first)
On windows, don't use WMI, use gohai implementation that collects
same information (and can gracefully fail when some info isn't
available, e.g. in a container) .
Allows process agent to start in a Nano container.
Requires related gohai change.
Motivation
allow process agent to run on Nano