-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a simple shell script for simulating requests
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
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
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 |