the perfstat outputs will be collected in dstpath directory. In this case, the same diretory where perfstat binary is.
start screen, run the script and <ctrl>a+d to detach from the session.
For the rolling perfstat with a graceful stop of the loop. All you need to do is touch a file called stop in the same directory as the script. So the current perfstat will finish gracefully and the loop stops.
Similarly for running a single perfstat with the above parameters, touch a file named stop and it will perform 5 iterations with 5 minute sample as stated above.