Dump the platform nvdimm device topology and attributes in json¶
This module contains the following parsers:
NdctlListNi - command /usr/bin/ndctl list -Ni
¶
-
class
insights.parsers.ndctl_list.
NdctlListNi
(context, extra_bad_lines=None)[source]¶ Bases:
insights.core.JSONParser
,insights.core.CommandParser
Class for parsing the command of
/usr/bin/ndctl list -Ni
Sample output:
[ { "dev":"namespace1.0", "mode":"fsdax", "map":"mem", "size":811746721792, "uuid":"6a5d93a5-6044-461b-8d19-0409bd323a94", "sector_size":512, "align":2097152, "blockdev":"pmem1" }, { "dev":"namespace1.1", "mode":"raw", "size":0, "uuid":"00000000-0000-0000-0000-000000000000", "sector_size":512, "state":"disabled" }, { "dev":"namespace0.0", "mode":"raw", "size":0, "uuid":"00000000-0000-0000-0000-000000000000", "sector_size":512, "state":"disabled" } ]
Examples
>>> type(ndctl_list) <class 'insights.parsers.ndctl_list.NdctlListNi'> >>> 'pmem1' in ndctl_list.blockdev_list True >>> ndctl_list.get_blockdev('pmem1').get('mode') == 'fsdax' True
-
blockdev_list
¶ Return a list of the blockdev attribute of all the devices if it has the attribute
-