mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-04 02:35:07 +01:00 
			
		
		
		
	Don't use absolute path for 'ps'
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user