Skip to content

Commit

Permalink
Resolve compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyuan committed Feb 18, 2025
1 parent fd9f46c commit 70f1f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion probe/host/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (c *CPU) Name() string {

// Command returns the command to get the cpu usage
func (c *CPU) Command() string {
return `top -b -n 1 | grep Cpu | awk -F ":" '{print $2}'`
return `top -b -n 1 | grep [C]pu | awk -F ":" '{print $2}'`
}

// OutputLines returns the lines of command output
Expand Down

0 comments on commit 70f1f54

Please sign in to comment.