Don't use absolute path for 'ps'

This commit is contained in:
Thomas Roehl 2021-05-18 15:14:37 +02:00
parent cda6ebf884
commit 36f34e13c7

View File

@ -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 {