sudo apt install linux-tools-common sudo linux-tools-generic linux-tools-`uname -r`
perv -vperf version 5.4.94
sudo sh -c 'echo 1 >/proc/sys/kernel/perf_event_paranoid'sudo sysctl -w kernel.perf_event_paranoid=1
WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,check /proc/sys/kernel/kptr_restrict and /proc/sys/kernel/perf_event_paranoid.Samples in kernel functions may not be resolved if a suitable vmlinuxfile is not found in the buildid cache or in the vmlinux path.Samples in kernel modules won't be resolved at all.If some relocation was applied (e.g. kexec) symbols may be misresolvedeven with a suitable vmlinux or kallsyms file.Couldn't record kernel reference relocation symbolSymbol resolution may be skewed if relocation was used (e.g. kexec).Check /proc/kallsyms permission or run as root.QHostAddress("127.0.0.1")[ perf record: Woken up 27 times to write data ][ perf record: Captured and wrote 0,000 MB - ]
Perf 5.4.94Linux 5.4.0-67
perf_event_open(..., PERF_FLAG_FD_CLOEXEC) failed with unexpected error 13 (Отказано в доступе)perf_event_open(..., 0) failed unexpectedly with error 13 (Отказано в доступе)Error:You may not have permission to collect stats.Consider tweaking /proc/sys/kernel/perf_event_paranoid,which controls use of the performance events system byunprivileged users (without CAP_SYS_ADMIN).The current value is 3: -1: Allow use of (almost) all events by all users Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK>= 0: Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN Disallow raw tracepoint access by users without CAP_SYS_ADMIN>= 1: Disallow CPU event access by users without CAP_SYS_ADMIN>= 2: Disallow kernel profiling by users without CAP_SYS_ADMINTo make this setting permanent, edit /etc/sysctl.conf too, e.g.: kernel.perf_event_paranoid = -1
sudo sh -c 'echo 1 >/proc/sys/kernel/perf_event_paranoid'