Refractored code to take netstat and test local server