Skip to content

Instantly share code, notes, and snippets.

@iameli
Created October 2, 2020 01:51
Show Gist options
  • Select an option

  • Save iameli/fd461537fe60145cf47ff2ccec7183e7 to your computer and use it in GitHub Desktop.

Select an option

Save iameli/fd461537fe60145cf47ff2ccec7183e7 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -o pipefail
set -o nounset
for pod in $(kubectl get pods -o name | grep orchestrator); do
echo $pod
kubectl port-forward $pod 7935 &
proc=$!
sleep 2
curl --silent http://localhost:7935/metrics | grep 'livepeer_current_sessions_total{' >> counts
kill $proc
wait
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment