add memory monitoring script