agent script that collects the server stats