forked from google/cadvisor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filesystem stats are now per container. As of now, fs stats are repor…
…ted only for the root cgroup. To make cadvisor detect all the disks, the rootfs of host needs to mounted inside cadvisor.
- Loading branch information
Showing
6 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ MAINTAINER [email protected] [email protected] [email protected] | |
|
||
# Grab cadvisor from the staging directory. | ||
ADD cadvisor /usr/bin/cadvisor | ||
RUN mkdir /rootfs | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT ["/usr/bin/cadvisor"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
package fs | ||
|
||
type FsStat struct { | ||
Name string `json:"name"` | ||
Device string `json:"device,omitempty"` | ||
Major uint `json:"major"` | ||
Minor uint `json:"minor"` | ||
Capacity uint64 `json:"capacity"` | ||
Free uint64 `json:"free"` | ||
} | ||
|
||
type FsInfo interface { | ||
// Returns capacity and free space, in bytes, of all the ext2, ext3, ext4 filesystems used by container 'containerName'. | ||
GetFsStats(containerName string) ([]FsStat, error) | ||
// Returns capacity and free space, in bytes, of all the ext2, ext3, ext4 filesystems on the host. | ||
GetFsStats() ([]FsStat, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters