kubernetes/pkg/kubelet/winstats
Kubernetes Submit Queue 8201e4ba00
Merge pull request #57124 from JiangtianLi/jiangtli-memfunc
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use GlobalMemoryStatusEx to get total physical memory on Windows node

**What this PR does / why we need it**:
This PR fixes issue #57110 due to failure in getting total physical memory on some Windows VM such as in VMWare Fusion or Virtualbox. This change uses GlobalMemoryStatusEx instead of GetPhysicallyInstalledSystemMemory to retrieve total physical memory on Windows node. The amount obtained this way is also closer in parity with reading MemTotal from /proc/meminfo on Linux node.
(thanks to @martinivanov and @marono for the help)

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57110

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-02-06 13:53:09 -08:00
..
BUILD Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
perfcounter_nodestats.go Use GlobalMemoryStatusEx to get total physical memory on Windows node 2018-01-24 19:44:13 -08:00
perfcounters.go This PR fixes issue #55031 where kubelet.exe crashes on Windows Server Core. The root cause is that kubelet.exe depends on package lxn/win pdh and kernel32 wrapper for node metrics. However, opengl32.dll is not available in Server Core and lxn/win requires the presence of all win32 DLLs. 2017-11-10 15:02:17 -08:00
version.go Get windows kernel version directly from registry 2018-01-19 11:09:45 +08:00
winstats_test.go Use GetVersion() API instead of ver command 2017-11-21 03:05:24 +00:00
winstats.go Use GetVersion() API instead of ver command 2017-11-21 03:05:24 +00:00