From ca562069a89b3d636272551e1443aa453c752e92 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 16 Feb 2023 10:39:42 -0800 Subject: [PATCH 1/2] parsing: Support nvme for disk throughput Typical naming is nvmeXnY (e.g., "nvme0n1"). Update the regex to allow. --- pybootchartgui/parsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybootchartgui/parsing.py b/pybootchartgui/parsing.py index 2d8e14e..2f1aee4 100644 --- a/pybootchartgui/parsing.py +++ b/pybootchartgui/parsing.py @@ -451,7 +451,7 @@ def _parse_proc_disk_stat_log(file, numCpu): not sda1, sda2 etc. The format of relevant lines should be: {major minor name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq} """ - disk_regex_re = re.compile ('^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$') + disk_regex_re = re.compile ('^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*|nvme\d+n\d+)$') # this gets called an awful lot. def is_relevant_line(linetokens): From a56518d267d601083eed9582f2456d53fbc9c90b Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 16 Feb 2023 11:34:01 -0800 Subject: [PATCH 2/2] Switch to python3 shebang Python2 is dead, and /usr/bin/python is missing on many systems. Switch to the recommended method for getting python3: /usr/bin/env python3. Note that gui.py is still not converted to py3 due to gobject-introspection incompatibility. That conversion seems very nontrivial, and it's properly gated by "is python2." If someone really wants to use python2 still, they can "python3 ./pybootchartgui.py". --- pybootchartgui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybootchartgui.py b/pybootchartgui.py index 947ce10..1c4062b 100755 --- a/pybootchartgui.py +++ b/pybootchartgui.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # This file is part of pybootchartgui.