Commit Graph

135 Commits

Author SHA1 Message Date
Jimmi Dyson
d1fce20304 Regexp tidy up 2015-11-26 09:14:26 +00:00
Yazen Ghannam
3a7f6d689d ClockSpeed not defined in /proc/cpuinfo for AArch64, so return 0.
Signed-off-by: Yazen Ghannam <yazen.ghannam@linaro.org>
2015-11-20 08:43:32 -06:00
Vish Kannan
cd7657e00a Merge pull request #886 from linux-on-ibm-z/master
Code changes for zSystems (s390x)
2015-11-02 09:52:18 -08:00
shahidhs-ibm
305bb279d8 gofmt changes (new)
Formatting in 'utils/machine/machine.go' and
'utils/sysfs/sysfs.go' was incorrect and causing ./build/presubmit.sh
script to fail in Travis giving below error:
The following files are not properly formatted:
$ ./build/presubmit.sh
+./build/check_gofmt.sh .
utils/machine/machine.go utils/sysfs/sysfs.go utils/machine/machine.go
utils/sysfs/sysfs.go

Fixed the formatting using below command:
gofmt -l -w -s utils/sysfs/sysfs.go
gofmt -l -w -s utils/machine/machine.go
2015-10-19 17:13:09 +05:30
shahidhs-ibm
be8de942e7 Revert "gofmt changes"
This reverts commit c4a523adb9.
2015-10-19 17:01:41 +05:30
shahidhs
c4a523adb9 gofmt changes
Looks like formatting in 'utils/machine/machine.go' and
'utils/sysfs/sysfs.go' was incorrect and causing ./build/presubmit.sh
script to fail in Travis giving below error:
The following files are not properly formatted:
$ ./build/presubmit.sh
+./build/check_gofmt.sh .
utils/machine/machine.go utils/sysfs/sysfs.go utils/machine/machine.go
utils/sysfs/sysfs.go

Fixed the formatting using below command:
gofmt -l -w -s utils/sysfs/sysfs.go
gofmt -l -w -s utils/machine/machine.go
2015-10-19 16:07:20 +05:30
Shahid
259e42d118 Update sysfs.go 2015-10-05 21:10:58 +05:30
Luciano Antonio Borguetti Faustino
e0c994c4c5 Add flag -k to journalctl show only kernel messages 2015-09-10 23:53:34 -03:00
Shahid
bfa8c9378c Update sysfs.go 2015-09-02 13:07:40 +05:30
Shahid
0dce153b6e Update machine.go 2015-09-02 13:00:36 +05:30
Mike Danese
38ab53a8ff use gcloud-golang vanity domain 2015-08-19 16:15:01 -07:00
Alex Mavrogiannis
8d50a8da8f updated mock godep to use github instead of code.google.com 2015-07-09 17:22:38 -07:00
Alex Mavrogiannis
9666c8b38f population of memory limit for the machine container 2015-07-07 14:15:38 -07:00
Ananya Kumar
0a84ac1cda Fix incorrect use of metadata library, correct typo 2015-07-06 13:13:10 -07:00
AnanyaKumar
ee16d6e7da Victor code review 2015-06-30 15:48:56 -07:00
Ananya Kumar
1abd853d6b Create package cloudinfo 2015-06-19 02:35:08 -04:00
Victor Marmol
b923eff11c Expose multiple network interfaces in API.
Part of #686
2015-06-07 17:01:53 -07:00
Pradipta Kr. Banerjee
d88ed0ab97 Handle system UUID retrieval for Power(ppc64) Systems
This patch adds requisite support to retrieve system uuid details for Power
systems. Power systems do not have DMI data. However most of the relevant details
are either in /proc or /sys. For baremetal servers, the UID is available in
/proc/device-tree/system-id. For guests the UUID is available in
/proc/device-tree/vm,uuid inside the guest. Guest's /proc filesystem do not have
/proc/device-tree/system-id

Example
On baremetal system
$cat /proc/device-tree/system-id
2122AAA

On a guest VM
$cat /proc/device-tree/vm,uuid
4b1a1a7e-079e-479c-8072-d8108f31050c

Signed-off-by: Pradipta Kr. Banerjee <bpradip@in.ibm.com>
2015-05-22 10:40:03 +05:30
Victor Marmol
c40d18f91e Merge pull request #695 from rjnagal/docker
Fix handling of time ranges in timed store.
2015-05-07 11:02:04 -07:00
Rohit Jnagal
06c9dcd3bb Fix handling of time ranges in timed store.
The current logic assumes that entries are added to the store in
monotonically increasing order for time. This is not true when
we add creation events for existing containers.
2015-05-07 16:44:22 +00:00
Victor Marmol
834d1cf34e Lower logging level of some common logs. 2015-05-06 10:24:50 -07:00
Victor Marmol
734df4d18c Place an absolute limit on elements in TimedStore. 2015-05-01 00:03:41 -07:00
Victor Marmol
a5d99c3aa8 Add /var/log/kern.log to kernel log files.
This file is present in most distros and provides most of the logs we're
looking for. We support the others if this one is not available.
2015-04-23 19:04:58 -07:00
Victor Marmol
8d2f81e73f Make the TimedStore generic.
Accepts a timestamp and an interface to store and use.
2015-04-23 11:34:56 -07:00
Victor Marmol
08186b6297 Rename StatsBuffer to TimedStore in utils 2015-04-23 11:12:09 -07:00
Victor Marmol
32b33b215a Add support for identifying OOM victim. 2015-04-15 13:09:22 -07:00
Victor Marmol
11462d80bc Lowering log levels.
Reduce common logging using Kubernetes logging standards.
2015-04-13 15:05:41 -07:00
Rohit Jnagal
aea95e3228 Remove sched debug based load implementation. 2015-04-10 21:50:55 +00:00
Katie Knister
ee4bdc2698 Improvements to events integration test 2015-04-10 13:33:22 -07:00
Katie Knister
21e96ed61c adding systemd oomparser functionality 2015-03-24 12:33:57 -07:00
Victor Marmol
5eeb6fdd40 Merge pull request #574 from kateknister/master
Fixed some bugs in oomparser streaming
2015-03-11 09:14:07 -07:00
Katie Knister
78f3029943 Fixed some bugs in oomparser streaming 2015-03-10 18:18:54 -07:00
Victor Marmol
d357c34f22 Refactor and centralize HTTP registration. 2015-03-10 18:00:10 -07:00
Victor Marmol
563ead3cce Use mux to register HTTP handlers.
This will allow us to register handlers on the non-default HTTP handler.
2015-03-10 15:37:16 -07:00
Victor Marmol
54bc33dd2c Lowering log level for frequent events.
Lowering all frequent normal logs to v=3. Kubelet runs by default on
debug of v=2 and we don't want to log these events in that case.
2015-03-09 14:53:53 -07:00
Federico Simoncelli
02a3e46996 Add system uuid and machine id information
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-03-01 15:06:19 -05:00
Rohit Jnagal
872546ba3a Bulk move current info api to info/v1. Making room for info/v2. 2015-03-04 00:47:28 +00:00
Katie Knister
412f27798e Revised oomparser to not use all the cpu 2015-03-02 14:22:53 -08:00
Katie Knister
3856690715 Added an oomwatcher function to manager 2015-02-19 16:22:37 -08:00
Rohit Jnagal
e09f9684e6 Fix cpuset returned in spec on a single core machine.
Switch from "0-0" to "0".
2015-02-19 18:54:23 +00:00
Jihoon Chung
09aff7cb92 Filter out non-netdev entries in sysfs/class/net 2015-02-16 16:11:46 +09:00
Rohit Jnagal
48c41ba273 Merge pull request #491 from rjnagal/summary
WIP: Add utility to calculate derived stats.
2015-02-13 17:54:49 -08:00
Rohit Jnagal
009a74179d WIP: Add utility to calculate derived stats. 2015-02-13 22:11:58 +00:00
Victor Marmol
58f3cd48d5 Merge pull request #494 from rjnagal/cpu
Use shared_cpu_map instead of shared_cpu_list to get cache hierarchy.
2015-02-07 09:38:22 -08:00
Rohit Jnagal
9f9f8ad983 Use shared_cpu_map instead of shared_cpu_list to get cache hierarchy. 2015-02-07 16:24:19 +00:00
Katie Knister
1291347c73 small change to the way time is parsed from the kernel log in oomparser
small change to the way time is parsed from the kernel log in oomparser
2015-02-04 18:48:34 -08:00
Katie Knister
c806d603ba Added a test file for oomparser 2015-01-30 10:24:08 -08:00
Rohit Jnagal
0b7e41c991 Fix typo in netlink example. 2015-01-30 16:56:34 +00:00
Rohit Jnagal
62b02a6b94 Set of fixes for cpuload calculations.
. Remove counting of taskgroups from scheddebug.
. Move monitoring thread 500ms ahead of other containers housekeeping.
. Rely on /proc/loadavg for root load.
. Cover up for scheddebug atomicity issues (WIP)
. Remove counting of monitoring thread.

Getting better, but still a bit farther away from ideal load :(
2015-01-29 22:27:07 +00:00
Katie Knister
b5609e2942 Made an oomparser that gets oomkill logs from kernel messages
Made an oomparser that gets oomkill logs from kernel messages

Made an oomparser that gets oomkill logs from kernel messages

Made an oomparser that gets oomkill logs from kernel messages

Made an oomparser that gets oomkill logs from kernel messages

Made an oomparser that gets oomkill logs from kernel messages

Made an oomparser that gets oomkill logs from kernel messages
2015-01-27 10:26:38 -08:00
Rohit Jnagal
c26ca15cc7 Make cpu load stats hierarchical for scheddebug. 2015-01-26 23:48:39 +00:00
Rohit Jnagal
db3d840a9d Prefer scheddebug over netlink for cpu load. 2015-01-26 20:44:12 +00:00
Rohit Jnagal
67af1a1bbd Add scheddebug based cpuload reader.
Prefer netlink based reader when available as it provides stats for
processes in state other than running (sleep, diskio, uninterruptible).
2015-01-26 18:46:29 +00:00
Rohit Jnagal
1375f451b2 Refactor netlink implementation.
This allows us to plug in a scheddebug based interface.
2015-01-23 23:07:50 +00:00
Victor Marmol
8f0f2299ab Make network fields signed integers.
The kernel reports -1 in case of errors so it should be an allowable
returned value.

Fixes #454.
2015-01-20 22:34:10 -08:00
Rohit Jnagal
efa8890132 Add error checks for netlink read. 2015-01-20 06:53:57 +00:00
Victor Marmol
90e5dc9b08 Merge pull request #446 from rjnagal/diskinfo
Add scheduler type to disk info.
2015-01-16 16:10:52 -08:00
Rohit Jnagal
aa398c800a Add scheduler type to disk info.
Type can be one of "none", "noop", "deadline", "cfq".
For block devices that don't use scheduler (like dm), the type will be "none".
We'll also report "none" for partitions when we start reporting those.
2015-01-17 00:09:07 +00:00
Victor Marmol
909fa133e1 Merge pull request #445 from rjnagal/docker
Add task load stats to containers.
2015-01-16 16:00:50 -08:00
Rohit Jnagal
cbdd96a554 Add task load stats to containers.
The stats are only populated when cAdvisor is running outside network namespaces.
We'll add a different backend to retrieve the same data from within namespaces.
2015-01-16 23:25:22 +00:00
Victor Marmol
ffa108f148 Merge pull request #439 from rjnagal/docs
Handle root network device names other than eth.
2015-01-14 14:43:42 -08:00
Rohit Jnagal
3780075bad Handle root network device names other than eth.
New logic ignores veth, docker, and loopback devices.
2015-01-14 22:28:59 +00:00
Rohit Jnagal
aeee52161c Add a utility to read cpu load stats. 2015-01-14 00:41:53 +00:00
Rohit Jnagal
14844dbedd Remove sched stats scraping utils.
sched_debug is getting the wrong load information. Runnable tasks list
in the output include running and sleeping tasks. We only need to look
at nr_running for each scheduling entity to figure out load. We also
don't need per-core stats.

I am going to redo these to derive per-cgroup load from nr_running.
2015-01-10 07:08:35 +00:00
Rohit Jnagal
de0e8e28eb Add percentiles utility methods.
This is copied verbatim for our older prototype. We'll use it as
a starting point for building stats summary.
2015-01-09 17:36:51 +00:00
Vish Kannan
54834156eb Merge pull request #407 from rjnagal/diskinfo
Add network stats to root container.
2015-01-02 10:06:11 -08:00
Rohit Jnagal
aee5c36313 Fix vet errors 2015-01-01 22:41:55 +00:00
Rohit Jnagal
45334c6f71 Add network stats to root container. Provides machine-level networking stats. 2014-12-30 17:12:42 +00:00
Rohit Jnagal
3836d1e2ec Refactor common methods out of sysfs package and add tests. 2014-12-29 17:09:27 +00:00
Rohit Jnagal
04fef734d2 Merge pull request #402 from rjnagal/diskinfo
Add ethernet devices information to machine endpoint.
2014-12-26 09:47:11 -08:00
Rohit Jnagal
496ee65cc2 Add ethernet devices information to machine endpoint. 2014-12-25 21:15:21 +00:00
Vish Kannan
2d58ee4643 Merge pull request #401 from rjnagal/docs
Skip ROM devices in disk map.
2014-12-25 12:41:07 -08:00
Rohit Jnagal
1f23693de8 Skip ROM devices in disk map. 2014-12-25 19:01:27 +00:00
Rohit Jnagal
5994c17b1e Add cache info to machine topology 2014-12-22 17:54:36 +00:00
Rohit Jnagal
e5200948f5 Add a disk map to machine info.
This is read once at start of cAdvisor. We can use this to report
machine state as well as return logical name for block devices in UI.

Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
2014-12-17 00:15:50 +00:00
Vishnu Kannan
3e390e0f33 Use glog instead of 'log' library.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-08-07 18:38:58 +00:00
Nan Deng
324874411d the unit in /proc/<pid>/schedstat should be ns 2014-08-06 11:03:40 -07:00
Nan Deng
b804ceac30 read core loads from /proc/sched_debug 2014-07-30 17:30:01 -07:00
Nan Monnand Deng
2e98607373 license on mockfs.go 2014-07-25 20:00:59 -04:00
Nan Monnand Deng
de867f19af use gomock 2014-07-25 19:58:54 -04:00
Nan Monnand Deng
32ae136095 mockfs 2014-07-25 19:35:13 -04:00
Nan Deng
03a5d0617c procfs package 2014-07-25 13:56:30 -04:00
Vishnu Kannan
ef13440034 Addressed comments. Another series of bug fixes.
Modified the docker driver and lmctfy driver to skip containers they cannot handle.
2014-07-22 19:55:14 +00:00
Vishnu Kannan
5aae36726f Fixed bugs introduced in previous patches. 2014-07-22 18:58:16 +00:00
Vishnu Kannan
abfcd4923a Adding utils package 2014-07-22 18:58:16 +00:00