-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow overriding the default /proc folder in blkioController
A host may share its /proc FS folder with a privileged container, mounted in an alternative folder (e.g. /host/proc), as some users prefer to run their monitoring software inside a container instead of as a host process. This patch allows overriding the default /proc folder to allow the blkio Controller working inside containerized monitoring software. The /proc root can be overriden via an optional function (ProcRoot) to avoid introducing a new NewBlkio constructor or introducing breaking changes in the current API. Then, the NewBlkio constructor can be invoked as usual, or in the following form, to override the /proc path: ctrl := NewBlkio("/sys/fs/cgroup", ProcRoot("/host/proc")) Signed-off-by: Mario Macias <mariomac@gmail.com>
- Loading branch information
Showing
2 changed files
with
48 additions
and
5 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