VDOStatus - command /usr/bin/vdo status

Module for parsing the output of command vdo status. The bulk of the content is split on the colon and keys are kept as is.

class insights.parsers.vdo_status.VDOStatus(context, extra_bad_lines=None)[source]

Bases: CommandParser, YAMLParser

Class for parsing vdo status command output.

Typical output of command vdo status looks like:

VDO status:
  Date: '2019-07-27 04:40:40-04:00'
  Node: rdma-qe-04.lab.bos.redhat.com
Kernel module:
  Loaded: true
  Name: kvdo
  Version information:
    kvdo version: 6.1.0.153
Configuration:
  File: /etc/vdoconf.yml
  Last modified: '2019-07-26 05:07:48'
VDOs:
  vdo1:
    Acknowledgement threads: 1
    Activate: enabled
    Device mapper status: 0 8370216 vdo /dev/sda5 albserver online cpu=2,bio=4,ack=1,bioRotationInterval=64
    Physical size: 7G
    Slab size: 2G
    Storage device: /dev/sda5
    VDO statistics:
      /dev/mapper/vdo1:
        overhead blocks used: 787140
        physical blocks: 1835008
        data blocks used: 0
  vdo2:
    Acknowledgement threads: 1
    Activate: enabled
    Device mapper status: 0 8370212 vdo /dev/sda6 albserver online cpu=2,bio=4,ack=1,bioRotationInterval=64
    VDO statistics:
      /dev/mapper/vdo1:
        1K-blocks: 7340032

Examples

>>> type(vdo)
<class 'insights.parsers.vdo_status.VDOStatus'>
>>> vdo['Kernel module']['Name']
'kvdo'
>>> vdo['Configuration']['File']
'/etc/vdoconf.yml'
>>> vdo['VDOs']['vdo1']['Activate']
'enabled'
>>> vdo['VDOs']['vdo1']['VDO statistics']['/dev/mapper/vdo1']['1K-blocks']
7340032
>>> dict(vdo['VDO status'])
{'Date': '2019-07-24 20:48:16-04:00', 'Node': 'dell-m620-10.rhts.gsslab.pek2.redhat.com'}
>>> vdo['VDOs']['vdo2']['Acknowledgement threads']
1
>>> vdo.get_slab_size_of_vol('vdo1')
'2G'
>>> vdo.volumns
['vdo1', 'vdo2']
>>> vdo.get_physical_blocks_of_vol('vdo1')
1835008
>>> vdo.get_physical_used_of_vol('vdo1')
0
>>> vdo.get_physical_free_of_vol('vdo1')
1047868
>>> vdo.get_logical_used_of_vol('vdo1')
0
>>> vdo.get_overhead_used_of_vol('vdo1')
787140
Raises:

ParseException -- When input content is not available to parse

data

the result parsed of ‘vdo status’

Type:

dict

get_logical_blocks_of_vol(vol)[source]

The logical blocks of a specified volumne

Parameters:

vol (str) -- The vdo volumne name specified

Returns:

Returns size of logical blocks

Return type:

int

get_logical_free_of_vol(vol)[source]

The logical free blocks of a specified volumne

Parameters:

vol (str) -- The vdo volumne name specified

Returns:

Returns size of logical free

Return type:

int

get_logical_used_of_vol(vol)[source]

The logical used blocks of a specified volumne

Parameters:

vol (str) -- The vdo volumne name specified

Returns:

Returns size of logical blocks used

Return type:

int

get_overhead_used_of_vol(vol)[source]

The overhead used blocks of a specified volumne

Parameters:

vol (str) -- The vdo volumne name specified

Returns:

Returns size of overhead blocks used

Return type:

int

get_physical_blocks_of_vol(vol)[source]

The physical blocks of a specified volumne

Parameters:

vol (str) -- The vdo volumne name specified

Returns:

physical blocks size

Return type:

int

get_physical_free_of_vol(vol)[source]

The physical free blocks of a specified volumne

Parameters:

vol (str) -- The vdo volumne name specified

Returns:

Returns size of physical free

Return type:

int

get_physical_used_of_vol(vol)[source]

The physical used blocks of a specified volumn

Parameters:

vol (str) -- The vdo volumne name specified

Returns:

Returns size of physical blocks used

Return type:

int

get_slab_size_of_vol(vol)[source]

The slab size of a specified volumne

Parameters:

vol (str) -- The vdo volumne name specified

Returns:

Slab size of specified vdo volumne

Return type:

str

property volumns

List of the volumns in vdo status

Type:

list