From 1b47825dcbaf777bf44f3697e8085f083bd35241 Mon Sep 17 00:00:00 2001 From: Lomanic Date: Fri, 6 Apr 2018 10:11:58 +0200 Subject: [PATCH] [host] Fix docker uptime parsing (fix #507) --- host/host_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/host_linux.go b/host/host_linux.go index 098d086..0e09f15 100644 --- a/host/host_linux.go +++ b/host/host_linux.go @@ -146,7 +146,7 @@ func BootTimeWithContext(ctx context.Context) (uint64, error) { return 0, fmt.Errorf("wrong uptime format") } f := strings.Fields(lines[0]) - b, err := strconv.ParseInt(f[0], 10, 64) + b, err := strconv.ParseFloat(f[0], 64) if err != nil { return 0, err }