From 36f34e13c77c428b9b982896b23f094643bbe6b9 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Tue, 18 May 2021 15:14:37 +0200 Subject: [PATCH] Don't use absolute path for 'ps' --- collectors/topprocsMetric.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collectors/topprocsMetric.go b/collectors/topprocsMetric.go index 32a8bda..28f62ba 100644 --- a/collectors/topprocsMetric.go +++ b/collectors/topprocsMetric.go @@ -21,7 +21,7 @@ func (m *TopProcsCollector) Init() error { } func (m *TopProcsCollector) Read(interval time.Duration) { - command := exec.Command("/usr/bin/ps", "-Ao", "comm", "--sort=-pcpu") + command := exec.Command("ps", "-Ao", "comm", "--sort=-pcpu") command.Wait() stdout, err := command.Output() if err != nil {