« Back to sysctl kernel.*

kernel.sched_schedstats

This article has last been updated at .

The sysctl key kernel.sched_schedstats is used to enable statistics of the Linux scheduler. When enabled, more detailed information will be stored within the /proc directory and specifically in the sched file. To see the information look at the path /proc/PID/sched. See also the explanation of values in /proc/PID/sched for more details.

Values

ValueDescription
0statistics disabled
1statistics enabled

Show current value

The value of the kernel.sched_schedstats can be retrieved using the sysctl command.

sysctl kernel.sched_schedstats

or using the proc file system:

sysctl /proc/sys/kernel/sched_schedstats

Configure new value

To apply a new value, use the option --write, followed by the key and value.

sysctl --write kernel.sched_schedstats=NEWVALUE

To ensure that these changes are also applied during the next boot, add them to a configuration file, typically something like /etc/sysctl.d/99-custom.conf.

Feedback

Small picture of Michael Boelen

This article has been written by our Linux security expert Michael Boelen. With focus on creating high-quality articles and relevant examples, he wants to improve the field of Linux security. No more web full of copy-pasted blog posts.

Discovered outdated information or have a question? Share your thoughts. Thanks for your contribution!

Mastodon icon

Related articles

Like to learn more? Here is a list of articles within the same category or having similar tags.