Perfstat is a tool you run from a management host, not on the filer directly. You need to enable RSH access from your filer to your management server (including the username of whoever you will be running it as). You can do this via the filerview or following this guide https://now.netapp.com/Knowledgebase/solutionarea.asp?id=kb7872
We have Operations Manager and use that for monitoring and reporting. I only run up perfstat to look at issues directly. From a bench mark point of veiw I run 3 samples of 5 minutes unless I need more. I have kept perfstat data as it is always good to go back and review it, but our systems a quick dynamic as Chris will agree.
You will find if you try and run cli commands on your filer some will fail due to perfstat, aready running on the box.
You might not necessarily need to run it as a scheduled task. The perfstat command you have will run 46 iterations at 30 minute intervals, so this will just run on it's own as it is. Unless you want this run regularly? A word of warning, you will end up with some very large files very quickly if you leave this as a scheduled task.
Have you looked at Operations Manager to give you some historic performance statistics over time?
Also checkout the stats command. It is a very good way of getting quite detailed stats on a specific area in real time without too much hassle. The trouble with perfstat is that it will pull out information of every area of the system. Using the stats command you can tell it to just pull out specific CIFS information for you, and you can still get it to dump to a file. The extra advantage, is that stats is run directly on the filer, so you don't need a management host setup.
As part of that setup, I created a user on the filer that was the same as my Windows username and password. In the script, I don't have to specify a password and the task is set with my Windows username and password for execution while I'm not logged in.
Then, I created a batch file "perfstat-collect.bat", put the batch file in the same directory with perfstat.exe (Which was in the OpenSSH bin directory) and created a scheduled task in Windows. Be sure to specify the Start-in directory of the batch file in the scheduled task.
This is the contents of the batch file. "perfstat.exe -f <IP of filer> -S kf:/cygdrive/c/users/<username>/.ssh/id_rsa -l <username> -g -t 15 -i 16 -I > <outputfilename>"