Commit Graph

36 Commits

Author SHA1 Message Date
Katarzyna Kujawa
c5a9232a94 Modify GetTopology to read information only from sysfs
* Move sysfs related functions needed to get nodes' information and tests into utils/sysfs
* Add tests for sysfs related functions

Signed-off-by: Katarzyna Kujawa <katarzyna.kujawa@intel.com>
2020-03-17 08:44:58 +01:00
David Ashpole
d7f4b3932b
Merge pull request #2421 from iwankgb/dimm_power_usage
NVM power usage
2020-03-16 10:40:17 -07:00
Davanum Srinivas
f8a119bcaf
Drop dependency on docker/docker/pkg/parsers/operatingsystem
Pick up code from winstats:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/winstats/version.go#L33

Write fresh code to parse unix files using regex

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-03-15 12:19:13 -04:00
Maciej "Iwan" Iwanowski
43641a0533
Using build tags to handle case when cgo is not available
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-03-13 10:56:47 +01:00
Maciej "Iwan" Iwanowski
338904e6ed
Using a struct to store all NVM-related information
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-03-13 10:56:47 +01:00
Maciej Iwanowski
920cb80d65
Missing space added to API docs
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-03-13 10:56:47 +01:00
Maciej Iwanowski
051854cc5a
uint must be returned
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-03-13 10:56:47 +01:00
Maciej Iwanowski
84d8801185
Updating API documentation, license headers and build instructions
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-03-13 10:56:47 +01:00
Maciej Iwanowski
98bee3087e
Initializing and uninitializing library in GetNVMAvgPowerBudget function
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-03-13 10:56:46 +01:00
Maciej Iwanowski
8594a6fb2c
Setting NVM power budget information on MachineInfo struct
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-03-13 10:56:46 +01:00
Maciej Iwanowski
6dac5794f7
Retrieving NVM average power budget
Conflicts:
	info/v1/machine.go

Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-03-13 10:56:38 +01:00
iwankgb
a8de0e0fff
Nvm and dimm information (#2415)
* Adding information about memory capacity and number of memory DIMMs by memory type

Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
2020-03-06 11:56:13 -08:00
Katarzyna Kujawa
a5890578dd Extending machine API by number of cpu physical cores and cpu sockets
Signed-off-by: Katarzyna Kujawa <katarzyna.kujawa@intel.com>
2020-03-03 09:51:31 +01:00
Ted Yu
29824ab110 Simplify getNodeIdFromCpuBus 2020-02-24 11:28:49 -08:00
zhsj
31a5e4f095
Skip TestTopology on non-amd64 (#2391)
* Skip TestTopology tests on unsupported platforms
2020-02-11 08:59:17 -08:00
Mario
b1d569a9f1
Update machine.go 2020-01-13 19:43:40 +08:00
Mario
9b35cba5d6
Ignore CPU clock for mips64 2020-01-13 19:07:32 +08:00
Carlos de Paula
77aef51a9b Ignore CPU clock for riscv64 2020-01-07 17:00:26 -03:00
David Ashpole
5d7c0c5869
Merge pull request #2304 from ohsewon/huge_page_info_per_node
Add hugepage info to v1 node structure
2019-10-07 11:09:23 -07:00
sewon.oh
255729d1ae
Add comments and unit tests for GetHugePagesInfo()
Signed-off-by: sewon.oh <sewon.oh@samsung.com>
2019-10-07 11:15:00 +09:00
sewon
95453fe0aa
Update machine/machine.go
Co-Authored-By: Odin Ugedal <odin@ugedal.com>
2019-10-04 15:49:22 +09:00
sewon.oh
cb3a2bef46
Remove duplicated logic
Signed-off-by: sewon.oh <sewon.oh@samsung.com>
2019-10-04 14:31:01 +09:00
choury
f009931603
Add error handle in machine info 2019-09-05 19:52:18 +08:00
sewon.oh
d138b59aa2
Add hugepage info to v1 node structure
Signed-off-by: sewon.oh <sewon.oh@samsung.com>
2019-09-05 15:12:13 +09:00
Bin Lu
5fe243eca8 Bug fix if no NUMA support in kernel
Signed-off-by: Bin Lu <bin.lu@arm.com>
2018-12-14 01:56:05 -08:00
David Ashpole
8b1337898f
Merge pull request #2114 from lubinszARM/cpuinfo
Fix bug:getTopology will be failed on Arm platform
2018-12-05 17:29:52 -08:00
Bin Lu
2e0d48f16a Fix bug:getTopology will be failed on Arm platform
On Arm platform, no 'core id' and 'physical id' in '/proc/cpuinfo'.
So we should search sysfs cpu path directly to get the data of
'thread_id' &'core_id' & 'node_id'.
This method can also be used on other platforms, such as x86, ppc64le...
/sys/bus/cpu/devices/cpu%d contains the information of 'core_id' & 'node_id'.
Such as:
cat /sys/bus/cpu/devices/cpu0/topology/core_id
ls /sys/bus/cpu/devices/cpu0/node0

Signed-off-by: Bin Lu <bin.lu@arm.com>
2018-12-05 11:15:07 +08:00
Davanum Srinivas
4da6d809be
Move from glog to klog
Change-Id: Ic92f57c2d7f268d8d985797974883c1a537d6993
2018-11-08 18:06:28 -05:00
Seth Jennings
a88f575eb0 use more robust docker os-release parser 2018-04-20 12:22:50 -05:00
Tim Allclair
5b435b4b70
Clean up cAdvisor logging 2017-11-27 19:48:05 -08:00
Tobias Klauser
24493b8458 Simplify Utsname string conversion
Use Utsname from golang.org/x/sys/unix which contains byte array
instead of int8/uint8 array members. This allows to simplify the string
conversions of these members.
2017-10-31 12:14:10 +01:00
Seth Jennings
6c900995ce make lack of hugepages support non-fatal 2017-08-17 13:55:45 -05:00
Derek Carr
556c7b125a Machine info introspects hugepages 2017-08-11 23:27:15 -04:00
Clayton Coleman
4e25a7951f
Report container FS metrics into prometheus /metrics
PerDiskStats reported from cgroups were not being surfaced into
prometheus. In order to properly correlate the metrics, we need to
assign a device label to each metric (which is the FS or device path).
Since blkio cgroup tracks devices, we create a synthetic device
`/dev/NAME` for the metric.

Assign a Device label to each PerDiskStat for the handlers up front, and
then surface the PerDiskStat values into the prometheus metrics. Report
two new metrics - total bytes read and total bytes written.
2017-04-24 20:46:55 -04:00
derekwaynecarr
cccf9d5fec Allow clients to know if inodes are supported on a filesystem 2016-07-26 11:15:07 -04:00
Tim St. Clair
4d3ef349fb Move utils/machine -> machine 2016-05-02 15:56:49 -07:00