Created
March 15, 2018 21:21
-
-
Save hsergei/51bb6c5a5f0612a6c26a758499054245 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL='http://localhost:8081/nexus/content/repositories/yum/repodata/repomd.xml' | |
while true; do | |
TS=`/bin/date "+%Y%m%d-%H%M%S"` | |
DISKUTIL0=`iostat -yxd 2 1 xvdf|egrep ^xvdf|awk '{print $14}'` | |
CRRUNNING='createrepo off' | |
if pgrep createrepo >/dev/null; then | |
CRRUNNING='createrepo ON ' | |
fi | |
CURLTIME=`curl -s -o /dev/null -w "%{time_total}" ${URL}` | |
DISKUTIL1=`iostat -yxd 2 1 xvdf|egrep ^xvdf|awk '{print $14}'` | |
echo "${TS} ${CRRUNNING}, disk util ${DISKUTIL0} ${DISKUTIL1} %, latency ${CURLTIME}" | |
done 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment