File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ trap 'rm -rf "$FLAGS_DIR"' EXIT
3939deploy_args=(
4040 -M 8192
4141 -p 9222:9222/tls
42- -p 8080:8080/tls
4342 -e DISPLAY_NUM=1
4443 -e HEIGHT=768
4544 -e WIDTH=1024
Original file line number Diff line number Diff line change 2323# get instance stats in a loop until ctrl-c
2424trap ' echo "Stopping stats collection..."; exit 0' INT
2525
26+ echo -e " RSS\tCPU Time\tTX Bytes"
2627while true ; do
2728 metrics=$( curl -s -H " Authorization: Bearer $UKC_TOKEN " " $UKC_METRO /instances/$instance_id /metrics" )
2829 rss=$( echo " $metrics " | grep ' instance_rss_bytes{instance_uuid=' | cut -d' ' -f2)
2930 cpu_time=$( echo " $metrics " | grep ' instance_cpu_time_s{instance_uuid=' | cut -d' ' -f2)
3031 tx_bytes=$( echo " $metrics " | grep ' instance_tx_bytes{instance_uuid=' | cut -d' ' -f2)
31- echo " RSS: $rss "
32- echo " CPU Time: $cpu_time "
33- echo " TX Bytes: $tx_bytes "
32+ echo -e " $rss \t$cpu_time \t$tx_bytes "
3433 sleep 1
3534done
You can’t perform that action at this time.
0 commit comments