Commit Graph

23 Commits (f8610342e42ef2ca85ac1b3f44dc3b4e16dbfd95)

Author SHA1 Message Date
Shirou WAKAYAMA 57f6aebc7e add Timeout to invoke command and use common.Invoke refs: #201 9 years ago
Shirou WAKAYAMA 97e1d05084 [docker]linux: add CgroupDockerStat (#189) 9 years ago
Shirou WAKAYAMA 613a8a90e1 fixed by golint. 9 years ago
Shirou WAKAYAMA 4bb84648bf JSON representation is renamed to fit Google JSON style, camelCase. 9 years ago
Shirou WAKAYAMA ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters 9 years ago
Masayoshi Sekimura 3a1fa5dc80 format go program with go 1.5.2 "go fmt" 9 years ago
Shirou WAKAYAMA 40bbba9636 docker[linux]: add more memory stats in cgroup. 9 years ago
cgeoffroy 40f6755c6b docker: fix static /sys paths by using env variables 9 years ago
Daniel Theophanes 0af895258e common: rename package common to internal/common. Add ENV helper funcs.
Package common wasn't used for public functions. Place it in an
internal directory to prevent other packages from using.

Remove the distributed references to "HOST_PROC" and "HOST_SYS"
consts and combine into a common function. This also helps so that
if a env var is defined with a trailing slash all will continue to
work as expected.

Fixes #100
10 years ago
Ruslan Islamgaliev 005b9b7f7d Fix imports 10 years ago
Ruslan Islamgaliev 91bb4ddc07 Fix docker on Centos 7 10 years ago
WAKAYAMA shirou abb4086531 host[freebsd]: change to use utmpx for 9.0 or later. 10 years ago
Shirou WAKAYAMA 1223e28905 docker[linux]: change docker error valiable and add cgroup error. 10 years ago
Cameron Sparr 7a2d225b30 Allow gopsutil docker to build on non-linux boxes by stubbing out non-linux libraries 10 years ago
Shirou WAKAYAMA feb4fc9706 docker: fix field name. 10 years ago
Shirou WAKAYAMA 4ead971d70 fix CPUTimes type change problem on other packages. 10 years ago
Jason Wilder 90c6c3ef3e Fix panic in CgroupCPU
If an invalid container ID is passed to CgroupCPU,
a panic can result.
10 years ago
Jason Wilder 812b04d363 Don't ignore err when getting CgroupMemDocker stats
Fixes panic: runtime error: index out of range

goroutine 10 [running]:
testing.func·006()
	/usr/local/go/src/testing/testing.go:441 +0x181
github.com/shirou/gopsutil/docker.CgroupMem(0x586b30, 0x6, 0x5a87d0, 0x1c, 0x0, 0x0, 0x0)
	/home/jwilder/go/src/github.com/shirou/gopsutil/docker/docker_linux.go:119 +0xf48
github.com/shirou/gopsutil/docker.CgroupMemDocker(0x586b30, 0x6, 0x0, 0x0, 0x0)
	/home/jwilder/go/src/github.com/shirou/gopsutil/docker/docker_linux.go:184 +0x57

If the ID passed to the CGroupMemDocker does not exist, you can get
a panic at runtime.  This can happen when a container exits before
calling the func.
10 years ago
Shirou WAKAYAMA 13cd195a7e change package name. 10 years ago
Shirou WAKAYAMA 16de570414 merge 039b9defab 10 years ago
Shirou WAKAYAMA a1c1d7b25f fix on Linux. 10 years ago
WAKAYAMA shirou d11680c773 fix bugs on FreeBSD. 10 years ago
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24 10 years ago