From a58c307fbf6fe5a6a7b28c31d01593998f88066d Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Thu, 22 Oct 2026 13:48:57 +0200 Subject: [PATCH] Fix name clash with perl's iotop --- Makefile | 4 ++-- iotop.8 | 38 +++++++++++++++++++------------------- src/configfile.c | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index ac9b134..b76bce2 100644 --- a/Makefile +++ b/Makefile @@ -185,8 +185,8 @@ install: $(TARGET) $(E) STRIP $(TARGET) $(Q)$(STRIP) $(TARGET) $(E) INSTALL $(TARGET) - $(Q)$(INSTALL) -D -m 0755 $(TARGET) $(BINDIR)/$(TARGET) - $(Q)$(INSTALL) -D -m 0644 iotop.8 $(PREFIX)/share/man/man8/iotop.8 + $(Q)$(INSTALL) -D -m 0755 $(TARGET) $(BINDIR)/$(TARGET)-c + $(Q)$(INSTALL) -D -m 0644 iotop.8 $(PREFIX)/share/man/man8/iotop-c.8 uninstall: $(E) UNINSTALL $(TARGET) diff --git a/iotop.8 b/iotop.8 index 0cf01d9..0138d69 100644 --- a/iotop.8 +++ b/iotop.8 @@ -1,28 +1,28 @@ -.TH IOTOP "8" "October 19, 2026" +.TH IOTOP-C "8" "October 19, 2026" .SH NAME -iotop \- simple top\-like I/O monitor +iotop-c \- simple top\-like I/O monitor .SH SYNOPSIS -.B iotop +.B iotop-c [\fIOPTIONS\fR] .SH DESCRIPTION -\fBiotop\fR watches I/O usage information available in the Linux kernel +\fBiotop-c\fR watches I/O usage information available in the Linux kernel (requires 2.6.20 or later) and displays a table of current I/O usage by processes or threads on the system. At least the CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING, CONFIG_TASKSTATS and CONFIG_VM_EVENT_COUNTERS options need to be enabled in your Linux kernel build configuration. .PP -Running \fBiotop\fR as non\-root user is possible by adding the NET_ADMIN +Running \fBiotop-c\fR as non\-root user is possible by adding the NET_ADMIN capability. This can be done by e.g.: .RS .B -$ sudo setcap 'cap_net_admin+eip' /iotop +$ sudo setcap 'cap_net_admin+eip' /iotop-c .RE Be warned that this will also allow other users to run it and get access to information that normally should not be available to them. .PP -\fBiotop\fR displays columns for the I/O bandwidth read and written by each +\fBiotop-c\fR displays columns for the I/O bandwidth read and written by each process/thread during the sampling period. It also displays the percentage of time the thread/process spent while swapping in and while waiting on I/O. For each process, its I/O priority (class/level) is shown. @@ -154,7 +154,7 @@ which case it is treated as numeric only. Values that do not resolve but appear to be numeric are used as numeric .TP \fB\-P\fR, \fB\-\-processes\fR -Only show processes. Normally \fBiotop\fR shows processes and all threads +Only show processes. Normally \fBiotop-c\fR shows processes and all threads .TP \fB\-\-threads\fR Show processes and all threads @@ -168,9 +168,9 @@ batch mode, which always lists the threads alone List the threads grouped below their process .TP \fB\-a\fR, \fB\-\-accumulated\fR -Show accumulated I/O instead of bandwidth. In this mode, \fBiotop\fR shows the +Show accumulated I/O instead of bandwidth. In this mode, \fBiotop-c\fR shows the amount of I/O processes have done since they started, or with -\fB\-\-no\-lifetime\fR since \fBiotop\fR first saw them. +\fB\-\-no\-lifetime\fR since \fBiotop-c\fR first saw them. Note that this option and \-\-accum\-bw are exclusive and they will turn each other off .TP @@ -179,8 +179,8 @@ Show bandwidth (useful when changing config file with \fB\-\-write\fR) .TP \fB\-A\fR, \fB\-\-accum-bw\fR Show accumulated I/O as bandwidth for the whole sampling period. In this mode, -\fBiotop\fR shows the amount of I/O per second for the whole period since the -process started, or with \fB\-\-no\-lifetime\fR since \fBiotop\fR first saw it. +\fBiotop-c\fR shows the amount of I/O per second for the whole period since the +process started, or with \fB\-\-no\-lifetime\fR since \fBiotop-c\fR first saw it. Note that this option and \-\-accumulated are exclusive and they will turn each other off .TP @@ -195,12 +195,12 @@ With \fB\-\-accum\-bw\fR the average is over the time since the process or thread started .TP \fB\-\-no\-lifetime\fR -Accumulate the I/O of each process or thread since \fBiotop\fR first saw it +Accumulate the I/O of each process or thread since \fBiotop-c\fR first saw it .TP \fB\-k\fR, \fB\-\-kilobytes\fR Use kilobytes instead of a human friendly unit. -This mode is useful when scripting the batch mode of \fBiotop\fR. Instead of -choosing the most appropriate unit \fBiotop\fR will display all sizes in +This mode is useful when scripting the batch mode of \fBiotop-c\fR. Instead of +choosing the most appropriate unit \fBiotop-c\fR will display all sizes in kilobytes .TP \fB\-\-no\-kilobytes\fR @@ -400,12 +400,12 @@ exist. In case of error creating or accessing the config file, a warning with the reason is shown and the configuration is not saved. .RS -\fB$XDG_CONFIG_HOME/iotop/iotoprc\fR - if environment variable XDG_CONFIG_HOME +\fB$XDG_CONFIG_HOME/iotop-c/iotoprc\fR - if environment variable XDG_CONFIG_HOME is set and not empty. .RE .RS -\fB$HOME/.config/iotop/iotoprc\fR - if environment variable XDG_CONFIG_HOME is +\fB$HOME/.config/iotop-c/iotoprc\fR - if environment variable XDG_CONFIG_HOME is not set or empty, but HOME is set and not empty. .RE @@ -460,7 +460,7 @@ Toggle grouping threads below their process Cycle showing accumulated/accum-bw/current values .TP \fBCtrl\-A\fR -Toggle accumulating since the processes started or since \fBiotop\fR first saw +Toggle accumulating since the processes started or since \fBiotop-c\fR first saw them .TP \fB?\fR @@ -589,7 +589,7 @@ character under the cursor. .SH ENVIRONMENT .TP \fBNO_COLOR\fR -As per the recommendation of \fBhttps://www.no\-color.org/\fR iotop honors the +As per the recommendation of \fBhttps://www.no\-color.org/\fR iotop-c honors the contents of the environment variable \fBNO_COLOR\fR and when it is set to a non empty string, all color output is suppressed. The config file keeps the colors only when they differ from what it gives, diff --git a/src/configfile.c b/src/configfile.c index 799fdd7..c854ff6 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -23,7 +23,7 @@ You should have received a copy of the GNU General Public License along with thi #include #define CONFIG_DIR1 "/.config" -#define CONFIG_DIR2 "/iotop" +#define CONFIG_DIR2 "/iotop-c" #define CONFIG_NAME "/iotoprc" #define MAX_OPT 50 -- 2.56.0