Scheduler - file /sys/block/*/queue/scheduler

This parser parses the content from scheduler files. It stores available values and also current selection for every device.

Sample content from schduler file:

noop deadline [cfq]

Examples

>>> type(scheduler_obj)
<class 'insights.parsers.scheduler.Scheduler'>
>>> scheduler_obj.data
{'sda': '[cfq]'}
>>> scheduler_obj.device
'sda'
>>> scheduler_obj.schedulers
['noop', 'deadline', 'cfq']
>>> scheduler_obj.active_scheduler
'cfq'
class insights.parsers.scheduler.Scheduler(context)[source]

Bases: Parser

This class provides parsing for content of /sys/block/*/queue/scheduler files.

device

Block device name

Type:

str

schedulers

A list of available schedulers

Type:

list

active_scheduler

An active scheduler

Type:

str

data

A dictionary with block device name as a key and an active scheduler as a value.

Type:

dict

parse_content(content)[source]

This method must be implemented by classes based on this class.