All Projects → chenchun → cgroupfs

chenchun / cgroupfs

Licence: other
Cgroupfs provides an emulated /proc/meminfo, /proc/cpuinfo... for containers

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to cgroupfs

Containerfs
a cluster filesystem for containers
Stars: ✭ 264 (+842.86%)
Mutual labels:  fuse, container
daspanel
Free, open-source, server agnostic, self-hosted web hosting control panel using Docker
Stars: ✭ 71 (+153.57%)
Mutual labels:  container
render
A simple web service that renders a Blender 3D scene with custom text.
Stars: ✭ 27 (-3.57%)
Mutual labels:  container
dingo
Generated dependency injection containers in go (golang)
Stars: ✭ 75 (+167.86%)
Mutual labels:  container
ultimate-kubernetes-bootcamp
Ultimate Kubernetes Bootcamp
Stars: ✭ 43 (+53.57%)
Mutual labels:  container
examples
Fuse examples
Stars: ✭ 13 (-53.57%)
Mutual labels:  fuse
imagepullsecret-patcher
A simple Kubernetes client-go application that creates and patches imagePullSecrets to service accounts in all Kubernetes namespaces to allow cluster-wide authenticated access to private container registry.
Stars: ✭ 159 (+467.86%)
Mutual labels:  container
redis-fs
Mount a Redis database as a filesystem using fuse.
Stars: ✭ 76 (+171.43%)
Mutual labels:  fuse
docker-suricata
A Suricata Docker image.
Stars: ✭ 120 (+328.57%)
Mutual labels:  container
ext2py
The slowest ext2fs driver ever! (in Python)
Stars: ✭ 14 (-50%)
Mutual labels:  fuse
easy-css-layout
Easy css layout
Stars: ✭ 117 (+317.86%)
Mutual labels:  container
ecs-gen
docker-gen for AWS ECS
Stars: ✭ 46 (+64.29%)
Mutual labels:  container
fuse-device-plugin
kubernetes device plugin for using /dev/fuse without privilege
Stars: ✭ 17 (-39.29%)
Mutual labels:  fuse
easy-container
A small PHP dependency injection container from Laravel Container, support PHP 5.3
Stars: ✭ 32 (+14.29%)
Mutual labels:  container
docker-varnish
Varnish docker image used within EMGAG environments
Stars: ✭ 25 (-10.71%)
Mutual labels:  container
xwmfs
X11 Window-Manager file system based on FUSE
Stars: ✭ 21 (-25%)
Mutual labels:  fuse
nordvpn
NordVpn Docker Client
Stars: ✭ 475 (+1596.43%)
Mutual labels:  container
nginx-container
Nginx high-performance HTTP server and reverse proxy container images based on Red Hat Software Collections and intended for OpenShift and general usage. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
Stars: ✭ 77 (+175%)
Mutual labels:  container
gobazel
gobazel is a tool to help golang bazel developers to map bazel's folder structure to golang's standard folder structure, through FUSE (thus only works for Linux and MacOS users).
Stars: ✭ 28 (+0%)
Mutual labels:  fuse
php7-alpine
Docker container for PHP 7 in Alpine Linux, with almost all extensions that you may need
Stars: ✭ 20 (-28.57%)
Mutual labels:  container

cgroupfs

Build Status

Like lxcfs https://github.com/lxc/lxcfs, cgroupfs provides an emulated /proc/meminfo, /proc/cpuinfo... for containers.

build

make

Usage

container_id=`docker create -v /tmp/cgroupfs/meminfo:/proc/meminfo -m=15m ubuntu sleep 213133`

## In the second console tab
mkdir /tmp/cgroupfs
./cgroupfs /tmp/cgroupfs /docker/$container_id

## Go to the first tab
docker start $container_id

## Take a look at /tmp/cgroupfs/meminfo now
## cgroupfs file system should be able to show the memory usage of the container
root@linux-dev:/home/vagrant# cat /tmp/cgroupfs/meminfo
MemTotal:       15360 kB
MemFree:        13432 kB
MemAvailable:   13432 kB
Buffers:        0 kB
Cached:         1804 kB
SwapCached:     0 kB

## Enter docker container, you should see free is showing the real usage
docker exec -it $container_id bash
root@251d4d18bca6:/# free -m
             total       used       free     shared    buffers     cached
Mem:            15          2         12          0          0          1
-/+ buffers/cache:          0         14
Swap:            0          0          0

FAQ

1. fusermount: exec: "fusermount": executable file not found in $PATH

You should install fuse

On debian/ubuntu
sudo apt-get install fuse

2. meminfo file cannot be mounted because it is located inside "/proc"

You should update docker to 1.11+ or patch the related changes https://github.com/opencontainers/runc/pull/452, https://github.com/opencontainers/runc/pull/560

See related issues https://github.com/opencontainers/runc/issues/400

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].