I have to find time taken:
I don't know how to find this interval time as I need to check state of VM.
You can try the following one-liner to obtain the time taken by an instance to change it's state from pending to running,
INS=$( euca-run-instances -k sshlogin -t m1.xlarge emi-F51D3A55 \
| grep INSTA | cut -f 2 ); time while(true); \
do if \[ $( euca-describe-instances $INS | grep INSTANCE \
| cut -f 6 ) = "pending" \]; \
then euca-describe-instances $INS; else break; fi; done
This should be reusable for other two as well.
By changing the rc.local file, we can make the VM perform some actions just when it becomes running . You could possibly save the time instant at which it becomes running in a file inside the VM itself. By this you won't have to keep polling the state of the VM. Once the VM is up, you will have the time instant at which is became running .
Hope this helps you out.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.