Commit Graph

13 Commits

Author SHA1 Message Date
Natanael Copa
d45ba645a8 Get inodes and disk usage via pure go
Fix inode usage calculation to use filepath.Walk instead of executing an
external find. Also calculate the disk usage while at it so we also get
rid of the external dependency of `nice` and `du`. (#95172)

This is similar to what cadvisor does since commit
046818d64c

This solves three problems:
- Counts number of inodes correct when there are hardlinks (#96114)
- Makes kubelet work without GNU findutils (#95186)
- Makes kubelet work without GNU coreutils (#95172)
2021-04-06 14:19:35 +02:00
JieJhih Jhang
f1829a7744 fix golint in volume fs 2021-01-12 06:35:52 +08:00
Pengfei Ni
66da2ddcd0 Rename Du() to DiskUsage() for more expressive 2018-05-22 10:52:06 +08:00
wackxu
f737ad62ed update import 2018-02-27 20:23:35 +08:00
David Ashpole
a90c7951d4 add volume timestamps 2017-03-02 15:01:59 -08:00
Dr. Stefan Schimanski
bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
David Ashpole
d494ef66f0 Collects volume inode stats using the same find command that cadvisor uses these are included in the summary 2016-11-01 10:51:11 -07:00
Angus Salkeld
a1b2fcb10f Disambiguate unsupported metrics from metrics errors 2016-09-15 10:05:30 +10:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Paul Morie
6415c2d288 Wrap more comments in pkg/volume 2016-06-04 14:14:00 -04:00
Vishnu Kannan
baa8ac4d6b Add metrics support for a few network based volumes.
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2016-05-23 09:33:12 -07:00
Phillip Wittrock
1e5175594d Fix volume secret_test.go on darwin by not checking volume usage metrics 2016-02-17 12:56:37 -08:00
Phillip Wittrock
c67ce887f2 Volume Metrics Interface and base implementation.
- Add volume.MetricsProvider function to Volume interface.
- Add volume.MetricsDu for providing metrics via executing "du".
- Add volulme.MetricsNil for unsupported Volumes.
2015-12-09 16:06:24 -08:00