Coder Social home page Coder Social logo

chenchun / cgroupfs Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 9.0 879 KB

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

Home Page: https://github.com/chenchun/cgroupfs

Go 97.30% Shell 0.63% Makefile 2.07%
cgroupfs container docker fuse golang

cgroupfs's People

Contributors

chenchun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cgroupfs's Issues

make failed

It said cannot find package "bazil.org/fuse", log as following.

$ make
Sending build context to Docker daemon 1.065 MB
Step 1/5 : FROM golang:1.6.2
1.6.2: Pulling from library/golang
5c90d4a2d1a8: Pull complete
ab30c63719b1: Pull complete
c6072700a242: Pull complete
0ffc1204e0ab: Pull complete
d8a921df8ce9: Pull complete
d34bc98c2770: Pull complete
b0850b14d0d1: Pull complete
Digest: sha256:95875692658d8938644205d5911d655a134b621dd83b94569bd395fb59b08fa9
Status: Downloaded newer image for golang:1.6.2
 ---> 8ecba0e9bd48
Step 2/5 : RUN apt-get update && apt-get install -y fuse
 ---> Running in 9339bd5fb67f
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://httpredir.debian.org jessie InRelease
Get:2 http://httpredir.debian.org jessie-updates InRelease [145 kB]
Get:3 http://httpredir.debian.org jessie Release.gpg [2373 B]
Get:4 http://security.debian.org jessie/updates/main amd64 Packages [508 kB]
Get:5 http://httpredir.debian.org jessie Release [148 kB]
Get:6 http://httpredir.debian.org jessie-updates/main amd64 Packages [17.6 kB]
Get:7 http://httpredir.debian.org jessie/main amd64 Packages [9049 kB]
Fetched 9933 kB in 9s (1046 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libfuse2
The following NEW packages will be installed:
  fuse libfuse2
0 upgraded, 2 newly installed, 0 to remove and 52 not upgraded.
Need to get 205 kB of archives.
After this operation, 459 kB of additional disk space will be used.
Get:1 http://httpredir.debian.org/debian/ jessie/main libfuse2 amd64 2.9.3-15+deb8u2 [135 kB]
Get:2 http://httpredir.debian.org/debian/ jessie/main fuse amd64 2.9.3-15+deb8u2 [70.7 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 205 kB in 2s (88.5 kB/s)
Selecting previously unselected package libfuse2:amd64.
(Reading database ... 14719 files and directories currently installed.)
Preparing to unpack .../libfuse2_2.9.3-15+deb8u2_amd64.deb ...
Unpacking libfuse2:amd64 (2.9.3-15+deb8u2) ...
Selecting previously unselected package fuse.
Preparing to unpack .../fuse_2.9.3-15+deb8u2_amd64.deb ...
Unpacking fuse (2.9.3-15+deb8u2) ...
Setting up libfuse2:amd64 (2.9.3-15+deb8u2) ...
Setting up fuse (2.9.3-15+deb8u2) ...
/var/lib/dpkg/info/fuse.postinst: 18: /var/lib/dpkg/info/fuse.postinst: lsmod: not found
MAKEDEV not installed, skipping device node creation.
Processing triggers for libc-bin (2.19-18+deb8u4) ...
 ---> c32d94999c94
Removing intermediate container 9339bd5fb67f
Step 3/5 : WORKDIR /go/src/github.com/chenchun/cgroupfs
 ---> da993fd2c5b6
Removing intermediate container 9a60c25babf6
Step 4/5 : COPY . /go/src/github.com/chenchun/cgroupfs
 ---> 55cb1a9efe5c
Removing intermediate container 217db680c9c6
Step 5/5 : RUN go build -o /tmp/cgroupfs cli/cli.go
 ---> Running in d80003ffe8c5
cgroupfs.go:10:2: cannot find package "bazil.org/fuse" in any of:
	/go/src/github.com/chenchun/cgroupfs/vendor/bazil.org/fuse (vendor tree)
	/usr/local/go/src/bazil.org/fuse (from $GOROOT)
	/go/src/bazil.org/fuse (from $GOPATH)
cgroupfs.go:11:2: cannot find package "bazil.org/fuse/fs" in any of:
	/go/src/github.com/chenchun/cgroupfs/vendor/bazil.org/fuse/fs (vendor tree)
	/usr/local/go/src/bazil.org/fuse/fs (from $GOROOT)
	/go/src/bazil.org/fuse/fs (from $GOPATH)
cli/cli.go:9:2: cannot find package "bazil.org/fuse/fs/fstestutil" in any of:
	/go/src/github.com/chenchun/cgroupfs/vendor/bazil.org/fuse/fs/fstestutil (vendor tree)
	/usr/local/go/src/bazil.org/fuse/fs/fstestutil (from $GOROOT)
	/go/src/bazil.org/fuse/fs/fstestutil (from $GOPATH)
fs/cpusetinfo.go:13:2: cannot find package "bazil.org/fuse/fuseutil" in any of:
	/go/src/github.com/chenchun/cgroupfs/vendor/bazil.org/fuse/fuseutil (vendor tree)
	/usr/local/go/src/bazil.org/fuse/fuseutil (from $GOROOT)
	/go/src/bazil.org/fuse/fuseutil (from $GOPATH)
fs/diskstats.go:12:2: cannot find package "github.com/Sirupsen/logrus" in any of:
	/go/src/github.com/chenchun/cgroupfs/vendor/github.com/Sirupsen/logrus (vendor tree)
	/usr/local/go/src/github.com/Sirupsen/logrus (from $GOROOT)
	/go/src/github.com/Sirupsen/logrus (from $GOPATH)
fs/dir.go:11:2: cannot find package "github.com/opencontainers/runc/libcontainer/cgroups" in any of:
	/go/src/github.com/chenchun/cgroupfs/vendor/github.com/opencontainers/runc/libcontainer/cgroups (vendor tree)
	/usr/local/go/src/github.com/opencontainers/runc/libcontainer/cgroups (from $GOROOT)
	/go/src/github.com/opencontainers/runc/libcontainer/cgroups (from $GOPATH)
fs/diskstats.go:14:2: cannot find package "github.com/opencontainers/runc/libcontainer/cgroups/fs" in any of:
	/go/src/github.com/chenchun/cgroupfs/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs (vendor tree)
	/usr/local/go/src/github.com/opencontainers/runc/libcontainer/cgroups/fs (from $GOROOT)
	/go/src/github.com/opencontainers/runc/libcontainer/cgroups/fs (from $GOPATH)
fs/cpusetinfo.go:14:2: cannot find package "golang.org/x/net/context" in any of:
	/go/src/github.com/chenchun/cgroupfs/vendor/golang.org/x/net/context (vendor tree)
	/usr/local/go/src/golang.org/x/net/context (from $GOROOT)
	/go/src/golang.org/x/net/context (from $GOPATH)
The command '/bin/sh -c go build -o /tmp/cgroupfs cli/cli.go' returned a non-zero code: 1
make: *** [docker-build] Error 1

cpuinfo显示问题

container_id=docker create -v /tmp/cgroupfs/meminfo:/proc/meminfo -v/tmp/cgroupfs/cpuinfo:/proc/cpuinfo --cpu-period 100000 --cpu-quota 200000 --memory 15m --memory-swap 15m ubuntu sleep 213133
meminfo显示容器分配内存正确,cpuinfo显示还是宿主机,如何显示正确分配的cpu信息

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.