Pmrep - command pmrep -t 1s -T 1s <metrics> -o csv
¶
Parse the content of the pmrep -t 1s -T 1s network.interface.out.packets network.interface.collisions swap.pagesout mssql.memory_manager.stolen_server_memory mssql.memory_manager.total_server_memory -o csv
command.
Sample pmrep -t 1s -T 1s network.interface.out.packets network.interface.collisions swap.pagesout -o csv
command output:
Time,"network.interface.out.packets-lo","network.interface.out.packets-eth0","network.interface.collisions-lo","network.interface.collisions-eth0","swap.pagesout"
2021-04-26 05:42:24,,,,,
2021-04-26 05:42:25,1.000,2.000,3.000,4.000,5.000
Examples
>>> type(pmrep_doc_obj)
<class 'insights.parsers.pmrep.PMREPMetrics'>
>>> pmrep_doc_obj = sorted(pmrep_doc_obj, key=lambda x: x['name'])
>>> pmrep_doc_obj[3]
{'name': 'network.interface.collisions-eth0', 'value': '4.000'}
>>> pmrep_doc_obj[6]
{'name': 'network.interface.out.packets-lo', 'value': '1.000'}
>>> pmrep_doc_obj[7]
{'name': 'swap.pagesout', 'value': '5.000'}
-
class
insights.parsers.pmrep.
PMREPMetrics
(context, extra_bad_lines=None)[source]¶ Bases:
insights.core.CommandParser
,list
Parses output of
pmrep -t 1s -T 1s <metrics> -o csv
command.-
search
(**kwargs)[source]¶ Get the rows by searching the table with kwargs. This uses the
insights.parsers.keyword_search()
function for searching; see its documentation for usage details. If no search parameters are given, no rows are returned.Returns: A list of dictionaries of rows that match the given search criteria. Return type: list Examples
>>> sorted(pmrep_doc_obj_search.search(name__endswith='lo'), key=lambda x: x['name']) [{'name': 'network.interface.collisions-lo', 'value': '3.000'}, {'name': 'network.interface.out.packets-lo', 'value': '1.000'}] >>> sorted(pmrep_doc_obj_search.search(name__endswith='swap.pagesout'), key=lambda x: x['name']) [{'name': 'swap.pagesout', 'value': '5.000'}]
-