I'm running perf stat on the command ./start-server.sh -f server-config.xml:

perf stat -e cache-misses ./start-server.sh -f server-config.xml

I'd like to save the perf results to a file e.g. by appending &>out.txt to the command, however if I write the output to a file then I capture both the perf output as well as the start-server output. Is there a way for me to execute this command such that only the perf output will be written to the output file?


From perf help stat on my Debian 7:

-o file, --output file
Print the output into the designated file.


perf stat -o out.txt -e cache-misses ./start-server.sh -f server-config.xml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.