From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jV0x23Xmdz32Mx for ; Wed, 18 Nov 2026 12:17:58 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jV0wy6lt2z2xV5 for ; Wed, 18 Nov 2026 12:17:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4jV0wy21y3z1YB; Wed, 18 Nov 2026 12:17:54 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1795004274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PYTNEGwD7sjiLQVk1s7BMN8EZrmrOcLgsMnYmKwQFos=; b=4S/1SGfyveurcrbr4kfTWbmJWnDx1O8syF9GTBGDNDCFMguwlUyPIGw7P0M931jfQK3nGd UqAH4AL1hhehjTBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1795004274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PYTNEGwD7sjiLQVk1s7BMN8EZrmrOcLgsMnYmKwQFos=; b=Fc8QWdV+glCmtn7l9a4Q7bnZfHAENuXJULjsK8yI1Tvk7L/EA7aAoRMZobaEdrdr7O6POa CeqktUFVIjOiYjV75KkJaFbjafc3F3S7efYD1pUaO5YA1oKWRI5u5AXBH/GTQwoWSiWf+z w2RtxIlwhgsuLVCU11jRLnREIC1Ovgsg7+EyxsoZHibgf15Q0ktvFfMa2t5jSesLL624wV lvIHlpP0e6tQLZdj56FchqNukrYSGju32kthZsMUB1qtaHFQwl2FTRyVqqF50gSKL4TTlP q8Ju6TVL3vJ2EQ3Czel1DcsUIBbRvOa+Z3BYVHxgj6wsIOyO906bKKv+UOnEYw== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH] iotop: Update to version 1.33 Date: Wed, 18 Nov 2026 13:17:49 +0100 Message-ID: <20261118121750.3092363-2-adolf.belka@ipfire.org> In-Reply-To: <20261118121750.3092363-1-adolf.belka@ipfire.org> References: <20261118121750.3092363-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit - Update from version 1.30 to 1.33 - No change in rootfile - Changelog 1.33 Changed behavior Accumulated values count from the start of each task. In -a and -A modes, iotop now shows the I/O that a task did since it started, as counted by the kernel, instead of only the I/O since iotop first saw it. A process that did its I/O before iotop was started is no longer shown as idle. With -A the average is over the age of the task. The total of a process includes its threads that iotop saw, but not the threads that exited before. --no-lifetime brings back the previous behavior, Ctrl-A toggles it and the setting is saved in the config file. (#84) The IO and SWAPIN of a process are the longest that one of its threads waited in the cycle. They used to follow only the thread with the most delay since it started, so a process whose worker thread waited all the time could show 0 and sort as idle. The interactive view refreshes when the delay is over. It used to wait in steps of 200 ms, so -d 0.5 refreshed every 0.6 s and any delay below 0.2 s became 0.2 s. A delay of 0 now refreshes as fast as the data can be read. After an exec a process starts over as the new program that it shows, with a new graph and new totals since first seen. Batch mode with -p reads only the process of the given task, with all its threads, instead of every task of the system. With many tasks a cycle took seconds before; now it takes almost nothing. The Total DISK READ and Total DISK WRITE then cover only that process. The config file is replaced only when the new one is complete. -W and W write a temporary file next to it and rename it over the old one, so a crash or a failed write no longer leaves the config empty or cut. A symlinked config keeps its link, and the file keeps its mode and owner, also when root saves the config of a user. When that is not possible, e.g. in a directory that is not writable, the config is written in place as before. On a full disk the save now fails and keeps the old config. New features --flat lists the threads alone in the interactive view, sorted by their own values, instead of grouping them below their process. Ctrl-F toggles it, --no-flat turns it off and the setting is saved in the config file. It has no effect when only processes are shown. (#87) --no-inverse turns off --inverse, e.g. after it was saved in the config file. --debug-write works like -W, but writes the config with the preceding options to standard output instead of saving it, and exits. It is meant for debugging and testing. (Masatake YAMATO) make check runs a test of the option parsing (Masatake YAMATO), without the config file of the user. make scan runs the clang static analyzer (scan-build-23, or the one set in SCANBUILD) on a clean build. make pv also shows the compiler and the analyzer. Fixes With -c, a task whose command line has megabytes no longer crashes iotop. The shown command was built on the stack, so any user could crash an iotop that runs as root. The short options from -5 onwards set the wrong flags in 1.32, after the VFS columns were added. (Masatake YAMATO, #101) In -a and -A modes: The default sort by the GRAPH column follows the totals that the columns show, so a task that did a lot of I/O and went idle no longer sinks among the idle ones. (#92) o keeps the tasks with non-zero totals, like batch mode does, instead of hiding everything that is idle at the moment. (#84) In the interactive thread view, processes are sorted by the values of the whole process, so a process whose I/O is done by worker threads is no longer sorted as idle. (#87) Process totals: The I/O of a process is no longer lost for a cycle when one of its threads exits. A thread that calls exec no longer makes its I/O count twice in its process. With -P, batch mode filtered by -p or -u now counts all the threads of a process. A process filtered by -p used to show none of the I/O of its threads. An exited process no longer keeps the values of its last cycle for sorting, so it no longer stays above the live ones while it shows 0, and -P -o no longer keeps showing it. Tasks are matched between cycles by their start on the monotonic clock. After a suspend and resume or a step of the wall clock, no task was matched: the graphs and the totals started over and all the command lines were read again. A new task that gets the TID of an exited one no longer takes over the history and the accumulated values of the old task. A counter that goes down is no longer taken as a huge growth. A task whose taskstats query can not be sent, e.g. under memory pressure, is shown with Error. It was shown as TID 0, and the real task was missing for that cycle. Where time_t has 32 bits, e.g. on i386, iotop no longer goes wrong after 24.8 days of uptime. The length of a cycle came out wrong, all tasks looked new for one cycle, and from 49.7 days on the interactive view stopped refreshing. On 64-bit CPUs that trap on an unaligned access, e.g. sparc64, reading the taskstats replies could trap. The full command line no longer ends with a space, which also showed in batch mode and kept a search ending with $ from matching. The interactive view: It computes the values of a cycle as soon as the data is read, not when it is drawn. Holding down a key that does not redraw could skip that step for a cycle. The accumulated bandwidth then showed gigabytes per second for the rest of the run, the graphs started over and exited tasks were lost. The last row of the list can be scrolled to, paging no longer skips a row and the scrollbar reaches the bottom. With about a million tasks on a tall terminal, the scrollbar was drawn in the wrong place or not at all. The search cursor stays at the end of the text when the text scrolls over double width characters. It was one column to the right. On a narrow terminal the COMMAND column no longer shows garbage. The header graphs no longer move while the data is frozen. The sort by COMMAND follows the shown command, also with the thread names that -c adds. D keeps IOTOP_NO_RENICE, NO_COLOR and the count of -n. After D, i could change I/O priorities that IOTOP_NO_RENICE locks, and iotop no longer stopped after -n refreshes. The I/O priority of a typed TID is changed only when the prompt shows that task. An invalid TID applied realtime 0, and TID 0 changed the priority of iotop itself. Tasks with SCHED_DEADLINE and no I/O priority of their own show the realtime class, as the kernel uses it. They were shown as best effort. An invalid option in the config file names the config file. iotop still stops, so that it does not run with only a part of the config. A signal no longer cleans up inside its handler, which could break the heap or leave the terminal in raw mode. iotop now exits from its loops, also during the delay of batch mode. -W and W no longer save --no-color when only NO_COLOR turns the colors off, and --color under NO_COLOR is saved. The search filter loads back from the config file as it was saved: spaces at its end are kept. A filter with a line break, only possible from the command line, is not saved; it was saved as two lines and iotop did not start again until the config was edited. The batch header is aligned with its columns from USER onwards, and the TID column is as wide as the largest TID, e.g. 7 digits with the pid_max that systemd sets. With -k, or with a threshold of 10, values of 5 digits and more no longer push the rest of the row and the header out of their columns. They show fewer decimals instead. When the config file can not be saved because there is no home or XDG directory, or the path is too long, the reason is shown. Builds with a compiler that has -flto but not -flto=auto use LTO. With glibc older than 2.17, -lrt comes after the objects on the link line, so a linker with --as-needed no longer drops it. Bigger taskstats replies of future kernels fit. Before, a few more fields would have made all tasks show no I/O. Memory leaks on exit are fixed in the interactive view and with --filter in batch mode. (Masatake YAMATO, #102) The help, the man page and the README match the code again. The man page now says that USER is the real user of a task, so a set-user-ID program shows the user that started it, and that batch mode keeps its columns fixed: only the VFS columns follow the options that hide or show them. It no longer says that the start of a task needs taskstats version 12, that exited tasks stay 3 seconds when the GRAPH column is hidden (they stay two refresh cycles), or that the values of the threads are always summed in their process (only with -P). Internals iotop keeps all the I/O data as integers: byte counts, delays in nanoseconds and times in milliseconds. The graph history sums no longer drift, and floating point is used only to format the values for the display. Sorting by accumulated values computes the value of each task once instead of in every comparison, which matters with many tasks and on CPUs without a floating point unit. The threads of a process whose main thread exited reuse their command line between cycles, like the other tasks, instead of reading it in every cycle. Each task uses 80 bytes less memory, and the graph history of a task is freed once it has been idle for the whole graph. With many long running tasks that did I/O once, the histories used to grow to gigabytes. What's Changed Fix memory leaks on exit in interactive mode by @masatake in #102 Fix option offset mismatch in str_opt and add a basic test by @masatake in #101 1.32 New features VFS READ and VFS WRITE columns show the bytes that each task reads and writes through the VFS layer, including I/O served from the page cache. They are hidden by default. Toggle them with v in interactive mode, or use --show-vfs/--hide-vfs and the per-column --show-vfs-read, --hide-vfs-read, --show-vfs-write and --hide-vfs-write. The setting is saved in the config file. (Masatake YAMATO) --uid2name=MODE sets how the USER column turns UIDs into user names: always calls getpwuid(3) for every task; none shows the numeric UID; cyclic caches the names for one refresh cycle; static, the default, caches them until Ctrl-L. UIDs without a name are cached too, and the mode is saved in the config file. (Masatake YAMATO) --delay accepts fractional seconds, e.g. -d 0.5, always with . whatever the locale. --time works as documented. --timestamp is accepted as a synonym, and with --time every batch line is prefixed with the time. The interactive view shows the current units (IEC 1024 or SI 1000) in the top-right corner. < and > scroll the help window when it does not fit on the screen. Performance Large systems with hundreds of thousands of tasks were the main target of this release. Each refresh now does much less work, and iotop uses less memory: I/O priority, scheduling data and task names come from taskstats, saving several syscalls per task. The command line of a process is read once per process, and is reused from the previous cycle while the process is unchanged. It is reread every 30 cycles, or on Ctrl-L. Kernel threads are no longer checked for a command line. Exited tasks move to the next cycle instead of being copied. Their threads are merged back into the process in one pass. The lists are sorted once after reading /proc and walked together when computing the differences. The curses view counts and sorts again only when the data or the view settings change. Only the tasks that are shown are sorted. History is kept in ring buffers with precomputed sums, and is allocated only for tasks that ever had nonzero values. User names are shared between tasks instead of being copied for each one. Task arrays grow geometrically, and the command line buffers are shrunk to their size. Fixes The I/O priority no longer shows the Linux 6.5+ priority hints as part of the level. Taskstats replies are matched to their requests, so a late reply can no longer shift the data of the following tasks. The netlink error code is no longer read from an incomplete reply. The command name is taken from argv[0] only when the process has not rewritten its command line into one string (e.g. sshd: user@pts/0). Graphs: Process graphs are scaled by the aggregated history. The graph maximum is taken from the visible rows only. Fixed an out-of-bounds access in reversed Unicode graphs. The first curses snapshot gets proper timestamps, so the first accumulated bandwidth values are right. -n counts data refreshes in the curses view instead of loop iterations, and the last iteration is shown for a full delay. Scrolling with PgUp/PgDn and the arrows starts from where the view is after the list has shrunk. A use after free is fixed: the ionice selection pointed into a freed cycle. A leak of the combining character buffer in the search input is fixed. Config file: Trailing whitespace, including the CR of CRLF line ends, is trimmed. The directories are created only when saving. An empty XDG_CONFIG_HOME is treated as unset, and the config is not placed in / when there is no home. Truncated paths are not opened. A failed save is reported, both with -W and with the W key. Numeric option values (-n, -p, -u +UID, --threshold) are now validated. Invalid or out-of-range values are an error instead of being silently read as 0. Empty values for --help-type and -g are rejected. getopt is fully reset before the command line is parsed after the config file. In batch mode, a kernel whose taskstats version is too old now triggers a warning. The code builds cleanly with many more compiler warnings enabled. Fixes for the clang static analyzer and NULL/PATH_MAX safety checks are included. Documentation fixes in the README and the man page. What's Changed Add --user-decode option with pwuid, none, and cache methods by @masatake in #98 Add VFS READ and VFS WRITE columns to monitor logical I/O at syscall layer by @masatake in #100 1.31 Optimizations and Bugfixes less operations to read processes' info improved test if /proc is mounted improved test if PID is a process What's Changed add alpine linux installation instructions by @Roshless in #88 Add autopkgtests by @renanrodrigo in #95 Signed-off-by: Adolf Belka --- lfs/iotop | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lfs/iotop b/lfs/iotop index 7fc61470f..4c04cf454 100644 --- a/lfs/iotop +++ b/lfs/iotop @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2025 IPFire Team # +# Copyright (C) 2007-2026 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -26,7 +26,7 @@ include Config SUMMARY = Top Like UI to Show Per-Process I/O Going on -VER = 1.30 +VER = 1.33 # https://github.com/Tomas-M/iotop/releases THISAPP = iotop-$(VER) @@ -35,7 +35,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = iotop -PAK_VER = 7 +PAK_VER = 8 DEPS = @@ -49,7 +49,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_BLAKE2 = 37e7bb77b06922d495a192e3e6b093162a88ecff4a27d135d9918c8df37aa152d2038a878988f976092053940717f9b89c91e47e63be67dc1c6e9f844ea8a639 +$(DL_FILE)_BLAKE2 = 51f07d24ba151a72ea26dba01f5cb3c980a1c6eb8f3eb1970a0576266e01ec42f2fee8e6636cbf2283801d9d2bd579d223fa5428151fc8ab632336a79f012eac install : $(TARGET) -- 2.56.1