[host] linux: use uptime even if docker guest.

pull/496/head
shirou 7 years ago
parent 5776ff9c7c
commit 28f7cb0d63

@ -113,6 +113,9 @@ func BootTimeWithContext(ctx context.Context) (uint64, error) {
if system == "lxc" && role == "guest" {
// if lxc, /proc/uptime is used.
statFile = "uptime"
} else if system == "docker" && role == "guest" {
// also docker, guest
statFile = "uptime"
}
filename := common.HostProc(statFile)

Loading…
Cancel
Save