0

Is there any way to get the "perf stat -d sleep 1000" command to update me about the events value every 1/2/3 second(s) during a long time? I tried it on PAPI and I made it but the problem is that I'm limited to 4/5 events max on an eventset... so I cant get that much info that I need. The problem about "perf stat" is that I dont want to get a final report for a X time but I want to see the evolution of the value events like how LLC-misses changes when I run a benchmark software etc..

any idea?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847

2 Answers2

1

You might be able to use the --interval-print flag if you have a new enough version of perf:

-I msecs, --interval-print msecs
       Print count deltas every N milliseconds (minimum: 100ms) example:
       perf stat -I 1000 -e cycles -a sleep 5
Gabriel Southern
  • 9,602
  • 12
  • 56
  • 95
0

You can use -I specific perf option to print the results every 1,2,3,etc seconds.

perf stat -a -r 1 -e power/energy-pkg/ -I 1000

This command prints system-wide statistics of the energy-pkg plane every 1 second. You can find more examples in the following link: http://www.brendangregg.com/perf.html