Skip to content

Instantly share code, notes, and snippets.

@pgrandin
Created March 17, 2014 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgrandin/9607243 to your computer and use it in GitHub Desktop.
Save pgrandin/9607243 to your computer and use it in GitHub Desktop.
#!/bin/bash
PORT=2003
SERVER=172.16.128.252
source /etc/keystone/keystone.credentials
while true; do
START_TIME=$SECONDS
c=`cinder list --all-tenants`
ELAPSED_TIME=$(($SECONDS - $START_TIME))
tc=$(( ELAPSED_TIME / 1 ))
echo -n "$tc;"
echo "s04.keystone_api_cinder_response_time $tc `date +%s`" | nc.openbsd ${SERVER} ${PORT};
START_TIME=$SECONDS
n=`neutron net-list`
ELAPSED_TIME=$(($SECONDS - $START_TIME))
tn=$(( ELAPSED_TIME / 1 ))
echo -n "$tn;"
echo "s04.keystone_api_neutron_response_time $tn `date +%s`" | nc.openbsd ${SERVER} ${PORT};
START_TIME=$SECONDS
g=`glance image-list --all-tenants`
ELAPSED_TIME=$(($SECONDS - $START_TIME))
tg=$(( ELAPSED_TIME / 1 ))
echo -n "$tg;"
echo "s04.keystone_api_glance_response_time $tg `date +%s`" | nc.openbsd ${SERVER} ${PORT};
START_TIME=$SECONDS
no=`nova list --all-tenants`
ELAPSED_TIME=$(($SECONDS - $START_TIME))
tno=$(( ELAPSED_TIME / 1 ))
echo -n "$tno;"
echo "s04.keystone_api_nova_response_time $tno `date +%s`" | nc.openbsd ${SERVER} ${PORT};
echo ""
sleep 60;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment