Skip to content

Commit

Permalink
Merge pull request #20 from pdvian/wip-fix-process-status
Browse files Browse the repository at this point in the history
process-status-report: Fix self-heal daemon CPU consumption reporting
  • Loading branch information
aravindavk authored Mar 12, 2018
2 parents 00408aa + e3e229c commit 45f2c20
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions glusterhealth/reports/process_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

good=80

pid=`gluster v status test | awk '/Self-heal/ {print $NF}'`
value=`ps -p $pid -o %cpu | grep -v CPU` | cut -d'.' -f1
pid=`gluster v status| grep localhost|awk '/Self-heal/ {print $NF}'|uniq`
value=`ps -p $pid -o %cpu | grep -v CPU | cut -d'.' -f1`
echo $value

if (( $(echo "$value $good" | awk '{print ($1 > $2)}') ))
then
echo "High CPU usage by Self-heal $value"
fi





0 comments on commit 45f2c20

Please sign in to comment.