From b37d9558732990f5ead1332341f04aad0cd1b4d0 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Tue, 20 Oct 2026 14:51:33 +0200 Subject: [PATCH] Fix name clash with perl's iotop --- Makefile | 4 ++-- iotop.8 | 36 ++++++++++++++++++------------------ src/configfile.c | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index e8a9ae3..8a59dbf 100644 --- a/Makefile +++ b/Makefile @@ -160,8 +160,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 1a128ad..8e5925a 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. @@ -142,14 +142,14 @@ 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 .TP \fB\-a\fR, \fB\-\-accumulated\fR -Show accumulated I/O instead of bandwidth. In this mode, \fBiotop\fR shows the -amount of I/O processes have done since the process or \fBiotop\fR started. +Show accumulated I/O instead of bandwidth. In this mode, \fBiotop-c\fR shows the +amount of I/O processes have done since the process or \fBiotop-c\fR started. Note that this option and \-\-accum\-bw are exclusive and they will turn each other off .TP @@ -158,8 +158,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 or \fBiotop\fR started. +\fBiotop-c\fR shows the amount of I/O per second for the whole period since the +process or \fBiotop-c\fR started. Note that this option and \-\-accumulated are exclusive and they will turn each other off .TP @@ -168,8 +168,8 @@ Show bandwidth (useful when changing config file with \fB\-\-write\fR) .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 @@ -358,17 +358,17 @@ exist. In case of error creating or accessing the config file, the error is silently ignored 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. .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 but HOME is set. .RE .RS -\fB.config/iotop/iotoprc\fR - if neither XDG_CONFIG_HOME nor HOME are set. +\fB.config/iotop-c/iotoprc\fR - if neither XDG_CONFIG_HOME nor HOME are set. .RE .TP \fBD\fR @@ -540,7 +540,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. .TP diff --git a/src/configfile.c b/src/configfile.c index c67cac1..28b55eb 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -21,7 +21,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