Skip to content

Commit

Permalink
Add a simple shell script for simulating requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaeon committed Aug 22, 2013
1 parent 565f23b commit e03af6f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/request-simulator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# Max number of concurent requests
MAX_REQUESTS=16

# Total number of requests to be made
TOTAL_REQUESTS=1000

let i=0
while [[ ${i} -lt ${TOTAL_REQUESTS} ]]; do
running=$( ps -ef | grep vm-pollerd-client | grep -v grep | wc -l )

# Fire up another request if needed
if [[ ${running} -lt ${MAX_REQUESTS} ]]; then
echo "Firing up another request ..."
./vm-pollerd-client -D -n esx1-evn1_local0 -p summary.capacity -u ds:///vmfs/volumes/4c68dc48-0db9ca38-f0e0-78e7d1e5782e/ -c poll -V vc1-sof2 &
fi
done

0 comments on commit e03af6f

Please sign in to comment.