3

I am trying to collect some data using perf, but whenever I try perf, I get the "You may not have permission to collect stats.", error.

I have tried changing the /proc/sys/kernel/perf_event_paranoid value to -1; but each time it miraculously resets to "3".

I am using Ubuntu 18.04 LTS.

1 Answer 1

3

It turned out, for some reason the system just didn't want me to change the kernel.perf_event_paranoid, while in session.

So I ran

sudo sh -c 'echo kernel.perf_event_paranoid=1 > /etc/sysctl.d/local.conf'

and rebooted the system and now it works like a charm.

1
  • Thanks for this, I was running into the same problem. Oct 6, 2022 at 3:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .