diff options
-rw-r--r-- | desktop/wmmon/nvme.diff | 12 | ||||
-rw-r--r-- | desktop/wmmon/wmmon.SlackBuild | 10 |
2 files changed, 21 insertions, 1 deletions
diff --git a/desktop/wmmon/nvme.diff b/desktop/wmmon/nvme.diff new file mode 100644 index 000000000000..69f156a0755f --- /dev/null +++ b/desktop/wmmon/nvme.diff @@ -0,0 +1,12 @@ +diff -Naur wmmon-1.4/wmmon.c wmmon-1.4.patched/wmmon.c +--- wmmon-1.4/wmmon.c 2018-04-10 18:22:59.000000000 -0400 ++++ wmmon-1.4.patched/wmmon.c 2023-02-14 00:38:41.868867398 -0500 +@@ -800,7 +800,7 @@ + * limited buffer. Or just divide by 2 (inefficient). Shouldn't + * matter for graphing (we care about proportions, not numbers). */ + while ((getline(&line, &line_size, fp_diskstats)) > 0) { +- if (strstr(line, "sd") || strstr(line, "sr")) { ++ if (strstr(line, "sd") || strstr(line, "sr") || strstr(line, "nvme")) { + p = strtok(line, tokens); + /* skip 3 tokens, then use fields from + `* linux/Documentation/iostats.txt */ diff --git a/desktop/wmmon/wmmon.SlackBuild b/desktop/wmmon/wmmon.SlackBuild index bc860934b390..b02b781bab81 100644 --- a/desktop/wmmon/wmmon.SlackBuild +++ b/desktop/wmmon/wmmon.SlackBuild @@ -6,6 +6,9 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20230214 bkw: BUILD=2 +# - add patch to detect I/O on NVME devices (in -i mode). + # 20191211 bkw: Update for v1.4. Script can no longer build the old version. # - add libdockapp dep # - get rid of patches (no longer needed) @@ -25,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=wmmon VERSION=${VERSION:-1.4} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -66,6 +69,11 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +# I/O monitoring works by checking /proc/diskstats. Each line is +# a device name, and nvme devices weren't invented yet when the +# code was originally written... +patch -p1 < $CWD/nvme.diff + # Man page taken from Debian, slightly corrected, and -c option added. cat $CWD/$PRGNAM.1 > $PRGNAM.1 |