[Home](https://kellyjonbrazil.github.io/jc/) # jc.parsers.proc\_interrupts jc - JSON Convert `/proc/interrupts` file parser Usage (cli): $ cat /proc/interrupts | jc --proc or $ jc /proc/interrupts or $ cat /proc/interrupts | jc --proc-interrupts Usage (module): import jc result = jc.parse('proc', proc_interrupts_file) or import jc result = jc.parse('proc_interrupts', proc_interrupts_file) Schema: [ { "irq": string, "cpu_num": integer, "interrupts": [ integer ], "type": string, "device": [ string ] } ] Examples: $ cat /proc/interrupts | jc --proc -p [ { "irq": "0", "cpu_num": 2, "interrupts": [ 18, 0 ], "type": "IO-APIC", "device": [ "2-edge", "timer" ] }, { "irq": "1", "cpu_num": 2, "interrupts": [ 0, 73 ], "type": "IO-APIC", "device": [ "1-edge", "i8042" ] }, ... ] $ proc_interrupts | jc --proc_interrupts -p -r [ { "irq": "0", "cpu_num": 2, "interrupts": [ "18", "0" ], "type": "IO-APIC", "device": [ "2-edge", "timer" ] }, { "irq": "1", "cpu_num": 2, "interrupts": [ "0", "73" ], "type": "IO-APIC", "device": [ "1-edge", "i8042" ] }, ... ] ### parse ```python def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict] ``` Main text parsing function Parameters: data: (string) text data to parse raw: (boolean) unprocessed output if True quiet: (boolean) suppress warning messages if True Returns: List of Dictionaries. Raw or processed structured data. ### Parser Information Compatibility: linux Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)