Skip to content

Instantly share code, notes, and snippets.

@plusreed
Created June 15, 2018 04:05
Show Gist options
  • Save plusreed/68e84fcb3a5650c6b2bc181858e6b2ac to your computer and use it in GitHub Desktop.
Save plusreed/68e84fcb3a5650c6b2bc181858e6b2ac to your computer and use it in GitHub Desktop.
Check how many connections you have to your MTProxy server.
#!/bin/bash
PORT=941
if [ "$EUID" -ne 0 ]
then echo "Please run me as root or with sudo"
exit
fi
netstat -anp | grep ":${!PORT}" | grep "ESTABLISHED" | echo "Current MTProxy connections: $(wc -l)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment