Skip to content

Instantly share code, notes, and snippets.

@sandvige
Created March 18, 2020 14:14
Show Gist options
  • Save sandvige/ff72b925a291c2b72f197272980f4201 to your computer and use it in GitHub Desktop.
Save sandvige/ff72b925a291c2b72f197272980f4201 to your computer and use it in GitHub Desktop.
Dump meeting info
#!/bin/bash
# Dump fresh statistics
kill -10 $(pidof meeting)
# Pick policies
POLICIES=$(cat /tmp/meeting_statistics | grep policies | cut -d " " -f 2)
# Pick bandwidth
BW=$(cat /tmp/meeting_statistics | grep traffic | grep -v pretty | cut -d " " -f 2)
# Pick connection amount
CONN=$(cat /tmp/meeting_statistics | grep connections | cut -d " " -f 2)
# Dump bw on stdOut
echo $BW
# Dump connections count on stdErr
(>&2 echo $CONN)
## Write policies amount on ExitCode because ExitCode is 255 max
exit $POLICIES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment