CUDA Profiler output on command line?

I am trying out the Visual Profiler on CUDA 3.2. Is there any way to actually run the profiler from command line and store the data from counters in a file?

Basically, I wish to write a script which on running a particular program, will output only the counters which I want to see and output them in a file.

^bump!

i also have the same question.
I saw a presentation in gtc2010 that i think stated that it was possible but googling and reading the documentation didn’t help.

export CUDA_PROFILE=1

i’m sorry i didn’t fully understand what you are saying i should do.
I’m exporting the variable and then what?
Edit:never mind i found what you meant:
http://forums.nvidia.com/index.php?showtopic=37519

After installation, there should be a file /usr/local/cuda/doc/Compute_Profiler.txt which describes the various environment variables one can use to control the profiler (such as CUDA_PROFILE, CUDA_PROFILE_LOG, CUDA_PROFILE_CSV, CUDA_PROFILE_CONFIG). Unfortunately I am unable to verify this on my own system right now, but it is worth checking. I haven’t been able to locate an online copy of this file for either CUDA 3.0 or CUDA 4.0 RC, the closest I could find is the version of this file that shipped with CUDA 3.0 (but presumably not all that much has changed since then):

http://developer.download.nvidia.com/compute/cuda/3_0/toolkit/docs/visual_profiler_cuda/CUDA_Profiler_3.0.txt