0
I'm root, running Centos8 on bare mental and permissions on /proc/sys/kernel/perf_event_max_sample_rate are as follows
-rw-r--r--. 1 root root 0 Oct 3 14:00 perf_event_max_sample_rate
I want to change the sample rate by opening this file with vi, making the change and then writing it with either w or w!. When I do so it comes back with
perf_event_max_sample_rate" E667: Fsync failed
When I try to quit, it tells me
E37: No write since last change (add ! to override)
So I can't change the value with vi. However I can change the value with
echo 4000 > /proc/sys/kernel/perf_event_max_sample_rate
Is this simply because /proc is not a real file system and that all changes to things in /proc would have to be made using echo with a redirect, or maybe sed? Is this behavior documented somewhere?
you can also use
sysctl
, see sysctl(8) and SYSCTL.CONF(5) – yesno – 2019-10-03T19:04:03.613