Created
March 18, 2020 14:14
-
-
Save sandvige/ff72b925a291c2b72f197272980f4201 to your computer and use it in GitHub Desktop.
Dump meeting info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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