Commit Graph

25 Commits

Author SHA1 Message Date
Lantao Liu
2522da0ac5 Always collect disk stats for rootfs.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-03-07 10:32:12 -08:00
Igor German
046818d64c fs: get inodes and disk usage via pure go 2019-02-22 21:46:14 +03:00
Takayoshi Kimura
f988ade02d Change log level to warning instead of error when cgroups file read failed.
Because cgroups file may not exist at the timing of the read, it's better not to use error level.
2019-02-07 14:19:22 +09:00
Davanum Srinivas
4da6d809be
Move from glog to klog
Change-Id: Ic92f57c2d7f268d8d985797974883c1a537d6993
2018-11-08 18:06:28 -05:00
Nao YONASHIRO
3d284e19eb fix: unwrap error for os.IsNotExist 2018-11-07 15:01:18 +09:00
Nao YONASHIRO
2300be56d7 feat: use karrick/godirwalk 2018-11-02 08:22:42 +09:00
David Ashpole
c5510abcd7
Merge pull request #2060 from sigma/pr/inotify
replace golang.org/x/exp/inotify with standalone library
2018-10-19 15:35:21 -07:00
Yann Hodique
289e560efd replace golang.org/x/exp/inotify with standalone library
context: kubernetes/kubernetes#68478

The inotify code was removed from golang.org/x/exp several years ago. Therefore
importing it from that path prevents downstream consumers from using any module
that makes use of more recent features of golang.org/x/exp.

Given that this code is by definition frozen and that the long term path should
be to migrate to fsnotify, replacing the current code by an identical standalone
copy doesn't have maintenance cost, and will unlock other activities for
kubernetes for example.
2018-09-28 08:48:12 -07:00
William Zhang
7961198a0c fix spelling errors
Signed-off-by: William Zhang <zhang.wanmin@zte.com.cn>
2018-09-28 15:49:25 +08:00
David Ashpole
8335af9d6b Revert "Switch from Inotify to Fsnotify"
This reverts commit c1a6d6090b.
2018-06-11 10:50:23 -07:00
David Ashpole
c1a6d6090b Switch from Inotify to Fsnotify 2018-04-09 11:09:40 -07:00
David Ashpole
6988e70a3d Revert "fix #1708; move from inotify to fsnotify"
This reverts commit e6b6a1ac57.
2017-11-17 10:28:28 -08:00
David Ashpole
6d3841c68a
Merge pull request #1784 from majst01/misspelled-errors
Fix wrong error checking in fsHandler.go
2017-10-30 10:02:08 -07:00
Seth Jennings
cc77f13a2b fix long du message 2017-10-30 10:00:47 -05:00
Stefan Majer
d5e2ffbef7 Fix wrong error checking in fsHandler.go 2017-10-30 07:44:57 +01:00
Seth Jennings
fd9c6d2fde adaptive longOp for du operation 2017-10-05 09:22:54 -05:00
David Ashpole
e6b6a1ac57 fix #1708; move from inotify to fsnotify 2017-09-28 10:57:49 -07:00
Andrew Pilloud
9e40f1c837 Fix race in ignoring non-existent files 2017-06-08 11:16:31 -07: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
David Ashpole
9fdeefe3e4 Cadvisor now publishes per-container inode stats using the command 'find . -xdev printf '.'| wc -c' this is published in the v2 api using a new field 2016-10-12 13:16:21 -07:00
Chun Chen
844c98e073 GetSpec missing memory reservation 2016-08-16 23:26:46 +08:00
Shaya Potter
5ca11bb1a0 move ListContainers code to common and make rkt play nice
playing nice means not elliding the system.slice cgroup but allowing the
raw handler to handle it
2016-05-03 07:14:53 -07:00
Tim St. Clair
dc6415aef7 Check docker container existance the same way as raw & rkt 2016-04-15 11:35:31 -07:00
Tim St. Clair
4861405904 Refactor common container GetSpec
- Pull out the root container cases, since they're only relevant in the
  raw container handler
- Pass parameters rather than depending on AbstractContainerInterface
2016-04-14 16:57:52 -07:00
Shaya Potter
5e04a224ae pull out common parts of docker and raw container handlers for use by rkt handler 2016-03-02 16:12:04 -08:00