Skip to content

Commit

Permalink
preempt-monitor: math fix
Browse files Browse the repository at this point in the history
  • Loading branch information
atheurer committed Sep 11, 2018
1 parent c096ce1 commit a39aa67
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions preempt-monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function check_kvm_cpu_switches() {
active_cpus="$active_cpus,$cpu"
if [ "${VCPU_SW[$vcpu]}abc" != "abc" ]; then
if [ $nr_sw -gt ${VCPU_SW[$vcpu]} ]; then
diff=$(( $nr_sw - ${VCPU_SW[$pmd]} ))
diff=$(echo "$nr_sw - ${VCPU_SW[$pmd]}" | bc)
echo "WARNING: number of switches increased by $diff for $vcpu on CPU ${TASK_CPU[$vcpu]}"
fi
fi
Expand Down Expand Up @@ -127,7 +127,8 @@ for i in `echo $iso_cpus_range | sed -e 's/,/ /g'`; do
iso_cpus_list="$iso_cpus_list,$i"
fi
done
echo "isoalted cpus: $iso_cpus_list" | sed -e 's/,//'
iso_cpus_list="$iso_cpus_list," # leave a trailing , here for easier grepping later
echo "isoalted cpus: $iso_cpus_list"
old_timestamp=`date +%s`
sleep $interval
while true; do
Expand Down

0 comments on commit a39aa67

Please sign in to comment.