Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # find instances in instance pool
- for i in $(oci compute-management instance-pool list-instances --compartment-id ocid1.compartment.oc1..<compartment-id> --instance-pool-id ocid1.instancepool.oc1.uk-london-1.<instancepool-id> --query 'data[*].id' --raw-output |sed 's/\"//g;s/,//g'|egrep -v -e "\[" -e "\]")
- do
- # run stress-ng command on the instance
- oci instance-agent command create --compartment-id ocid1.compartment.oc1..<compartment-id> --timeout-in-seconds 3700 --target '{"instance-id": "'$i'"}' --content '{"output": {"output-type": "TEXT"},"source": {"source-type": "TEXT","text": "sudo stress-ng --cpu 0 --cpu-method all -t 10m"}}'
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement