问题是这样的: 启动了一个镜像,想在镜像里面使用 perf 火焰图诊断下性能瓶颈,但是遇到了没有权限的问题: 由于镜像 /proc/sys/kernel/perf_event_paranoid 是只读的,perf 不能收集系统状态 #sudo perf record -F 99 -p 7070 -g -- sleep 30 perf_event_open(..., PERF_FLAG_FD_CLOEXEC) failed with unexpected error 1 (Operation not permitted) perf_event_open(..., 0) failed unexpectedly with error 1 (Operation not permitted) Error: You may not have permission to collect stats. Consider tweaking /proc/sys/kernel/perf_event_paranoid: -1 - Not paranoid at all 0 - Disallow raw tracepoint access for unpriv 1 - Disallow cpu events for unpriv 2 - Disallow kernel profiling for unpriv
我 google 了一下需要加上--privileged 重启镜像才有权限,问题是我不知道镜像的启动命令.请教下 V2 的各位大佬们如何在不停掉镜像的情况下修改已启动镜像的目录权限?