Skip to content

Commit f4a82e0

Browse files
Merge pull request #363 from alexandre-abrioux/patch-1
fix(scripts/cpu_info): ignore I/O wait time
2 parents 47d190a + ddecbcc commit f4a82e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/cpu_info.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ get_percent()
99
{
1010
case $(uname -s) in
1111
Linux)
12-
percent=$(LC_NUMERIC=en_US.UTF-8 top -bn2 -d 0.01 | grep "[C]pu(s)" | tail -1 | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1"%"}')
12+
percent=$(LC_NUMERIC=en_US.UTF-8 top -bn2 -d 0.01 | grep "[C]pu(s)" | tail -1 | sed "s/.*, *\([0-9.]*\)%* id, *\([0-9.]*\)%* wa.*/\1 \2/" | awk '{print 100 - $1 - $2"%"}')
1313
normalize_percent_len $percent
1414
;;
1515

0 commit comments

Comments
 (0)