Create check.sh

This script will generate file with number of connections for the particular service

This script can be called as inifinite loop via the shell
Or can be set as crontab task to be called every minute.