Skip to content

Commit

Permalink
Merge pull request stfc#46 from Jo-stfc/patch-3
Browse files Browse the repository at this point in the history
healthcheck on close_wait states
  • Loading branch information
jnc74743 authored Nov 16, 2023
2 parents 02ae706 + 837c29f commit e8b4335
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions xrootd/xrootd-healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ else
exit 1
fi
fi



netstatus=`ss | awk '{print $2}' | sort | uniq -c | sort -n | grep 'CLOSE' | awk '{print $1}'`
if [[ -z "${netstatus}" ]]; then
echo "net ok"
else
if [[ $netstatus > 500 ]]; then
exit 1
fi
fi
exit 0

0 comments on commit e8b4335

Please sign in to comment.