Skip to content

Commit

Permalink
include hostnames in ansible-like load gen output (#44755)
Browse files Browse the repository at this point in the history
  • Loading branch information
fspmarshall authored Jul 31, 2024
1 parent 3a9b760 commit 4fd411a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/loadtest/ansible-like/run_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ i=0
while [ $i -lt 10000 ] ; do
i_pretty="$( printf %04d ${i} )"
# instant
ssh ${ssh_opts} -tt "${1}" 'echo "OK ${SSH_SESSION_ID} ${SSH_TELEPORT_HOST_UUID} '"${i_pretty}"' A $( /busybox/date -u +"%Y-%m-%dT%H:%M:%S %s" )"; exit 0' || ( echo ERR A >&2 && sleep 1 )
ssh ${ssh_opts} -tt "${1}" 'echo "OK ${SSH_SESSION_ID} ${SSH_TELEPORT_HOST_UUID} '"${i_pretty}"' A $( /busybox/date -u +"%Y-%m-%dT%H:%M:%S %s" )"; exit 0' || ( echo ERR A "${1}" >&2 && sleep 1 )
# line every 5 seconds, 120 sec
ssh ${ssh_opts} -T "${1}" 'j=0; while [ $j -lt 24 ]; do echo "OK ${SSH_SESSION_ID} ${SSH_TELEPORT_HOST_UUID} '"${i_pretty}"' B $( printf %04d $j ) $( /busybox/date -u +"%Y-%m-%dT%H:%M:%S %s" )"; sleep 5; j=$(( j + 1 )); done; exit 0' || ( echo ERR B >&2 && sleep 1 )
ssh ${ssh_opts} -T "${1}" 'j=0; while [ $j -lt 24 ]; do echo "OK ${SSH_SESSION_ID} ${SSH_TELEPORT_HOST_UUID} '"${i_pretty}"' B $( printf %04d $j ) $( /busybox/date -u +"%Y-%m-%dT%H:%M:%S %s" )"; sleep 5; j=$(( j + 1 )); done; exit 0' || ( echo ERR B "${1}" >&2 && sleep 1 )
# data transfer and no wait
ssh ${ssh_opts} -T "${1}" '/busybox/dd if=/dev/zero bs=4096 count=256 2>/dev/null; echo "OK ${SSH_SESSION_ID} ${SSH_TELEPORT_HOST_UUID} '"${i_pretty}"' C $( /busybox/date -u +"%Y-%m-%dT%H:%M:%S %s" )"; exit 0' | tr -d '\000' || ( echo ERR C >&2 && sleep 1 )
ssh ${ssh_opts} -T "${1}" '/busybox/dd if=/dev/zero bs=4096 count=256 2>/dev/null; echo "OK ${SSH_SESSION_ID} ${SSH_TELEPORT_HOST_UUID} '"${i_pretty}"' C $( /busybox/date -u +"%Y-%m-%dT%H:%M:%S %s" )"; exit 0' | tr -d '\000' || ( echo ERR C "${1}" >&2 && sleep 1 )
# line every 5 seconds, 240 sec
ssh ${ssh_opts} -T "${1}" 'j=0; while [ $j -lt 48 ]; do echo "OK ${SSH_SESSION_ID} ${SSH_TELEPORT_HOST_UUID} '"${i_pretty}"' D $( printf %04d $j ) $( /busybox/date -u +"%Y-%m-%dT%H:%M:%S %s" )"; sleep 5; j=$(( j + 1 )); done; exit 0' || ( echo ERR D >&2 && sleep 1 )
ssh ${ssh_opts} -T "${1}" 'j=0; while [ $j -lt 48 ]; do echo "OK ${SSH_SESSION_ID} ${SSH_TELEPORT_HOST_UUID} '"${i_pretty}"' D $( printf %04d $j ) $( /busybox/date -u +"%Y-%m-%dT%H:%M:%S %s" )"; sleep 5; j=$(( j + 1 )); done; exit 0' || ( echo ERR D "${1}" >&2 && sleep 1 )

i=$(( i + 1 ))
done
Expand Down

0 comments on commit 4fd411a

Please sign in to comment.