mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-25 23:19:06 +01:00
Don't use absolute path for 'ps'
This commit is contained in:
parent
cda6ebf884
commit
36f34e13c7
@ -21,7 +21,7 @@ func (m *TopProcsCollector) Init() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *TopProcsCollector) Read(interval time.Duration) {
|
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()
|
command.Wait()
|
||||||
stdout, err := command.Output()
|
stdout, err := command.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user