Filefrag - Command /sbin/filefrag <specified file>

Parser for parsing the output of command /sbin/filefrag <specified file>.

class insights.parsers.filefrag.Filefrag(context)[source]

Bases: Parser, dict

Provides the extent counts of the specified file by parsing the output of command filefrag <specified file>.

Typical content looks like:

open: No such file or directory
/boot/grub2/grubenv: 1 extent found

Examples

>>> type(filefrag)
<class 'insights.parsers.filefrag.Filefrag'>
>>> filefrag['/boot/grub2/grubenv']
1
>>> filefrag.unparsed_lines
[]
Raises:

SkipComponent -- if the command output is empty or missing file

parse_content(content)[source]

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