How to check your governor and I/O scheduler from the command line

The other day, when working through some issues with kernel governors and I/O schedulers, I realized that I was a bit rusty on where to find them from the command line. After some searching and tinkering, I thought I might save some internet searcher the long and winding road to find this out.

From the command line:

[CODE]
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative ondemand userspace powersave performance

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand

$ cat /sys/block/sda/queue/scheduler
noop [deadline] cfq
[/CODE]

It’s a pretty simple trick to just read what is written in the /sys directory. As you can see here, my laptop system is running the ondemand kernel governor with the deadline I/O scheduler. If you are using this for yourself, you can check any of the cpu’s and drives by inputing them instead of the cpu0 and sda which I used here. This works on just about anything running a Linux kernel, from computers to cell phones like Android.

Linux – keep it simple.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s