run command periodically and calculate rate and check from network