Skip to content

Commit

Permalink
process-status-report: Fix self-heal daemon CPU consumption reporting
Browse files Browse the repository at this point in the history
We seems to be using dummy volume test in shell script and also
there will be multiple volumes on gluster node. There will be
single self-heal daemon running on node, so need to check
CPU consumption of localhost self-heal daemon.

Signed-off-by: Prashant D <pdhange@redhat.com>
  • Loading branch information
Prashant D committed Oct 16, 2017
1 parent cae4954 commit e3e229c
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 e3e229c

Please sign in to comment.