diff -Nru iotop-0.6-24-g733f3f8/ChangeLog iotop-0.6-42-ga14256a/ChangeLog --- iotop-0.6-24-g733f3f8/ChangeLog 2018-04-27 14:49:29.000000000 +0200 +++ iotop-0.6-42-ga14256a/ChangeLog 1970-01-01 01:00:00.000000000 +0100 @@ -1,1016 +0,0 @@ -2017-06-16 James Cowgill - - * iotop/ioprio.py: Add ioprio_* syscall numbers for mips Fixes: https://bugs.debian.org/864886 - -2017-05-04 Paul Wise - - * iotop/data.py, iotop/ui.py: Support Python versions and platforms - with no time.monotonic() function Python 2 and Python 3 earlier than 3.3 do not have this function. Use the PyPI monotonic backport module if needed and available. Fall back on non-monotonic time if neither is available. - -2017-05-04 Paul Wise - - * iotop/data.py, iotop/ui.py: Use monotonic time to calculate - durations Prevents incorrect calculations when the system time is set - backwards. Reported-by: Andrei Costin Fixes: - https://bugs.launchpad.net/bugs/1685512 - -2017-02-26 Paul Wise - - * NEWS: Fix typo: alignement - -2016-08-04 Paul Wise - - * iotop.8, iotop/ui.py: Add a footer listing keyboard shortcuts This makes the program more friendly to new users. Implements: - https://bugs.launchpad.net/ubuntu/+source/iotop/+bug/1429645 - -2016-08-04 Paul Wise - - * iotop/ui.py: Check the column title is not empty before using it Fixes crash with terminals that don't fit all titles. Traceback (most recent call last): File "./iotop.py", line 12, in main() File "./iotop/ui.py", line 669, in main main_loop() File "./iotop/ui.py", line 659, in main_loop = lambda: run_iotop(options) File "./iotop/ui.py", line 554, in run_iotop return curses.wrapper(run_iotop_window, options) File "/usr/lib/python3.5/curses/__init__.py", line 94, in wrapper return func(stdscr, *args, **kwds) File "./iotop/ui.py", line 546, in run_iotop_window ui.run() File "./iotop/ui.py", line 176, in run self.process_list.duration) File "./iotop/ui.py", line 515, in refresh_display self.win.addstr(len_summary, pos, title, attr) _curses.error: - addwstr() returned ERR - -2016-08-04 Paul Wise - - * iotop/ui.py: Hide UI elements on smaller terminals This helps usability on smaller terminals. Hide the status bar first, then the summary and then the titles, - since that is the approximate order of usefulness. - -2016-08-04 Paul Wise - - * iotop/ui.py: Print the titles at specific locations Prevents a crash in a 3-line terminal: Traceback (most recent call last): File "./iotop.py", line 12, in main() File "./iotop/ui.py", line 652, in main main_loop() File "./iotop/ui.py", line 642, in main_loop = lambda: run_iotop(options) File "./iotop/ui.py", line 537, in run_iotop return curses.wrapper(run_iotop_window, options) File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper return func(stdscr, *args, **kwds) File "./iotop/ui.py", line 529, in run_iotop_window ui.run() File "./iotop/ui.py", line 176, in run self.process_list.duration) File "./iotop/ui.py", line 492, in refresh_display self.win.addstr(title, attr) _curses.error: addstr() returned - ERR - -2016-08-04 Paul Wise - - * iotop/ui.py: Correct the location of the status message It wasn't taking into account the titles line. It was placed one - line above the bottom of the screen. - -2016-08-04 Paul Wise - - * iotop/ui.py: Correct the alignment of the header It looks ugly without correct alignment. - -2016-07-28 Paul Wise - - * iotop.8: Strip obsolete comment from the manual page - -2016-07-28 Paul Wise - - * NEWS: Add the full fingerprint for the release signing key See-also: https://evil32.com/ - -2016-07-28 Paul Wise - - * iotop/data.py: Only split /proc/*/status lines on the : character. Apparently vserver kernels have some lines that don't appear to have - the tab character so iotop crashes. The tab character will be stripped by the next code line. Closes: https://bugs.gentoo.org/show_bug.cgi?id=458556 - -2016-07-28 Paul Wise - - * release.sh: Use long command-line options instead of short ones This makes scripts easier to read. - -2016-07-28 Paul Wise - - * .gitignore: Also ignore the dist/ directory, which is created by - `setup.py sdist` - -2016-07-28 Paul Wise - - * NEWS, iotop/netlink.py: Refer to Python using the correct - capitalisation Suggested-by: spellintian --picky - -2016-07-28 Paul Wise - - * release.sh: Use ./* instead of * for globs Prevents accidentally using filenames as options Suggested-by: shellcheck - -2016-07-28 Paul Wise - - * .install-rpm.sh, iotop/ioprio.py, iotop/ui.py: Switch URLs from - http to https http URLs are insecure and can be manipulated by attackers. Suggested-by: check-all-the-things - -2016-07-28 Paul Wise - - * .install-rpm.sh: Convert .install-rpm.sh from a Bash script to a - POSIX shell script It uses no bash-specific features so it shouldn't use bash. Suggested-by: checkbashisms - -2014-10-17 Christophe Vu-Brugier - - * setup.py: Fix build error with Python 3 caused by itervalues() in - setup.py The itervalues() method is not available in Python 3. As a - consequence, this patch replaces the call to itervalues() in - setup.py with a call to values() which works on both Python 2 and - Python 3. Signed-off-by: Christophe Vu-Brugier - Signed-off-by: Paul Wise - -2014-05-14 Paul Wise - - * iotop/ui.py: Fix two typos - -2014-04-20 Paul Wise - - * NEWS, THANKS, iotop.8, iotop/ui.py: Fix terminology, replace - 'actual' by 'current'. Closes: https://bugs.debian.org/739642 - -2013-06-07 Paul Wise - - * iotop/data.py, iotop/ui.py: Be specific about which exceptions are - being caught. http://docs.python.org/2/howto/doanddont.html#except - -2013-05-27 Guillaume Chazarain - - * iotop/data.py, iotop/genetlink.py, iotop/ioprio.py, - iotop/netlink.py, iotop/ui.py, iotop/vmstat.py, setup.py: Make pep8 - happy. - -2013-05-27 Guillaume Chazarain - - * NEWS: Document signature - -2013-05-27 Guillaume Chazarain - - * release.sh: GPG sign all released files - -2013-05-26 Guillaume Chazarain - - * NEWS, iotop/version.py: Version bump. - -2013-05-26 Guillaume Chazarain - - * iotop/ui.py: Clean exit also on SIGTERM otherwise the terminal is - unusable. - -2013-05-26 Guillaume Chazarain - - * iotop/ui.py: Python3 can print UTF-8 to curses, python2 can't so - let's handle both. - -2013-05-26 Guillaume Chazarain - - * iotop/ui.py: Cleanly exit on SIGINT otherwise python3 will leave - the terminal in an unusable state. - -2013-05-26 Guillaume Chazarain - - * .install-rpm.sh: No need to make the RPM install script move bin/ - to sbin/ now that setup.py installs to sbin/. - -2013-05-26 Guillaume Chazarain - - * setup.py: Make setup.py install the iotop script in sbin/ instead - of bin/. - -2013-05-26 Guillaume Chazarain - - * iotop/ui.py: In some setup closing the xterm window only has the - effect of deleting the pty. Then iotop would be busy looping - reading on stdin. Instead we should detect the terminal deletion and - exit. When this happens iotop receives (0, 25) as an event, which - is (stdin, select.POLLIN|select.POLLERR|select.POLLHUP). Also, represent an empty even list as [] instead of 0, this is just - cosmetic. - -2013-02-04 Paul Wise - - * iotop/data.py, iotop/ioprio.py, iotop/ui.py, iotop/vmstat.py: Fix - the FSF address embedded in a few files - -2013-02-04 Paul Wise - - * sbin/iotop: Fix python3 compatibility for iotop when installed - -2013-02-03 Guillaume Chazarain - - * README, iotop/data.py: Update python requirements - -2013-02-03 Guillaume Chazarain - - * NEWS: Also advertise the move to sbin/ as it's significant - -2013-02-03 Guillaume Chazarain - - * .install-rpm.sh: The RPM should also install to sbin. - -2013-02-03 Guillaume Chazarain - - * {bin => sbin}/iotop: Moved to sbin. - -2013-02-03 Guillaume Chazarain - - * .install-rpm.sh, MANIFEST.in: Finish man page renaming - -2013-02-03 Guillaume Chazarain - - * NEWS, iotop/version.py: Version bump - -2013-02-03 Guillaume Chazarain - - * NEWS, THANKS: Advertise the newly introduced differentiation - between total and actual I/O. - -2013-02-03 Guillaume Chazarain - - * iotop/ui.py: 80 cols - -2012-10-10 Igor Bazhitov - - * iotop.8, iotop/data.py, iotop/ui.py: Add 'Actual' bandwidth stats - to summary header 'Total' values in the summary header may look confusing to users. - They represent actual kernel <-> disk I/O bandwidth, while - individual values for processes/threads show process <-> kernel I/O - bandwidth. Rename 'Total' to 'Actual' and add old 'Total' status line that sums - up all individual process/thread bandwidths. Explain the difference - between 'Total' and 'Actual' in the manpage. - -2012-10-09 Igor Bazhitov - - * README: Update manpage name in README - -2012-12-05 Paul Wise - - * iotop/data.py: Fix crash when running under python3. This reverts cd6ffb5913664844290f44a7ea48533caf8c459e Traceback (most recent call last): File "./iotop.py", line 12, in main() File "./iotop/iotop/ui.py", line 597, in main main_loop() File "./iotop/iotop/ui.py", line 587, in main_loop = lambda: run_iotop(options) File "./iotop/iotop/ui.py", line 485, in run_iotop return curses.wrapper(run_iotop_window, options) File "/usr/lib/python3.2/curses/wrapper.py", line 43, in wrapper return func(stdscr, *args, **kwds) File "./iotop/iotop/ui.py", line 478, in run_iotop_window ui.run() File "./iotop/iotop/ui.py", line 153, in run total = self.process_list.refresh_processes() File "./iotop/iotop/data.py", line 459, in refresh_processes self.processes.items() if File "./iotop/iotop/data.py", line 460, in process.update_stats()]) File "./iotop/iotop/data.py", line 358, in update_stats for tid, thread in self.threads.items(): RuntimeError: - dictionary changed size during iteration [This is valid since 0fc4ab84c8cbba1fbe83dc71fb89100b87c54898 added the self.threads = dict(...)] - -2012-09-02 Paul Wise - - * iotop.1 => iotop.8, setup.py: Move iotop out of the path for users - -2012-09-03 Guillaume Chazarain - - * iotop/ui.py: Fix the setting of the I/O priority and advertise it - a litle more. - -2012-09-03 Guillaume Chazarain - - * iotop/ui.py: Here we print a string, not bytes. - -2012-09-03 Guillaume Chazarain - - * iotop/netlink.py: Remove stray print added during the python3 - conversion. - -2012-09-03 Guillaume Chazarain - - * iotop/data.py: Restore compatibility with python2 - -2012-09-03 Guillaume Chazarain - - * iotop/data.py: Put back code deleted in the python3 conversion - -2012-09-03 Guillaume Chazarain - - * iotop/data.py: Some missed python3 conversions - -2012-09-03 Guillaume Chazarain - - * iotop/data.py, iotop/ui.py: Cosmetic fixes - -2012-09-02 Paul Wise - - * iotop/data.py, iotop/genetlink.py, iotop/ioprio.py, - iotop/netlink.py, iotop/ui.py: Port to Python 3 Not entirely sure about all parts of this but it works in Python 2/3 - -2012-09-03 Guillaume Chazarain - - * THANKS, iotop/data.py: Show custom thread names. - -2012-05-13 Paul Wise - - * iotop/ui.py: Improve the message that is printed when Linux denies - access to taskstats. - -2012-03-08 Guillaume Chazarain - - * README: Consistent option names - -2012-01-22 Guillaume Chazarain - - * iotop/ui.py: Restore the default SIGPIPE handler so that sudo - ./iotop.py -b|head does what's expected. - -2012-01-22 Guillaume Chazarain - - * NEWS, iotop/ui.py: Adapt the display to the maximum pid width - -2012-01-18 Guillaume Chazarain - - * .gitignore: Ignore the build directory. - -2011-10-30 Guillaume Chazarain - - * .install-rpm.sh, setup.cfg: Actually install-rpm.sh is still - needed. - -2011-10-30 Guillaume Chazarain - - * NEWS, iotop/version.py: Version bump - -2011-10-15 Guillaume Chazarain - - * iotop/ui.py: Explain that iotop now requires root. - https://lkml.org/lkml/2011/10/1/170 - - http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1a51410abe7d0ee4b1d112780f46df87d3621043 - -2011-09-17 Thomas Guettler - - * iotop/ui.py: Right-justify the header so that numbers stop - "bouncing". - -2011-08-04 Guillaume Chazarain - - * iotop/ui.py: When printing the time, print it also in the summary - -2011-04-10 Guillaume Chazarain - - * iotop/data.py, iotop/genetlink.py, iotop/ioprio.py, - iotop/netlink.py, iotop/ui.py, iotop/vmstat.py: Address some - pyflakes and pychecker warnings - -2011-03-28 Guillaume Chazarain - - * NEWS, iotop/version.py: Version bump - -2011-03-14 Guillaume Chazarain - - * iotop/ui.py: Show stats since iotop started, not since 'a' was - pressed. This is to avoid losing valuable data when 'a' is - inadvertently pressed. - -2011-03-13 Guillaume Chazarain - - * iotop/ui.py: Force UTF-8 output even if the locale is not set to - UTF-8. At worst it will output garbage, which is better than - crashing in this case. - -2011-01-16 Guillaume Chazarain - - * THANKS, iotop/data.py, iotop/genetlink.py: Fix netlink message - parsing to accept alignement padding. https://lkml.org/lkml/2010/12/13/176 - https://lkml.org/lkml/2010/12/29/237 - -2010-12-15 Guillaume Chazarain - - * iotop/data.py: Removing dead code - -2010-12-14 Guillaume Chazarain - - * NEWS: Grammar - -2010-12-14 Guillaume Chazarain - - * NEWS, iotop/version.py: Version bump - -2010-12-14 Guillaume Chazarain - - * MANIFEST.in, install-rpm.sh, setup.cfg: Try to do without - install-rpm.sh - -2010-12-14 Guillaume Chazarain - - * iotop/ui.py: With addstr instead of insstr we get a harmless - exception when writing on the last column. Confirmed by http://ubuntuforums.org/showthread.php?t=457689 - addstr() raises an exception but the string is printed anyway - -2010-12-14 Guillaume Chazarain - - * iotop/ui.py: Back to addstr because of: - http://marc.info/?l=ncurses-bug&m=125233342917443&w=3 insstr (from ncursesw) UTF-8 issue => The cursor position was not - updated for wide characters by insstr() - -2010-09-06 Guillaume Chazarain - - * bin/iotop: Revert "Some distributions have a default distutils - prefix which is not in sys.path, so installed modules cannot be - imported." This reverts commit d0812c2024a1f8edb081a2996af12efacdf8c961. Actually I don't think this is needed for now. - -2010-09-06 Guillaume Chazarain - - * bin/iotop: Some distributions have a default distutils prefix - which is not in sys.path, so installed modules cannot be imported. - To address that, explicitely add the path where the module is - supposed to be installed to sys.path. - -2010-09-04 Guillaume Chazarain - - * THANKS, iotop/ioprio.py: Support for getting and setting IO - priority on armel and hppa architectures. - -2010-09-04 Guillaume Chazarain - - * THANKS, iotop/data.py: Instead of assuming the pid field is 4 - bytes long, take its length from the header. This is needed for - http://lkml.org/lkml/2010/2/12/167 [PATCH] delayacct: align to 8 - byte boundary on 64-bit systems - -2010-08-22 Paul Wise - - * iotop/ui.py: Fix traceback with an invalid locale. Closes: http://bugs.debian.org/593846 - -2010-06-27 Guillaume Chazarain - - * NEWS, iotop/version.py: Bump version - -2010-06-26 Guillaume Chazarain - - * MANIFEST.in: We no longer use setuptools. - -2010-06-26 Guillaume Chazarain - - * iotop.1: Document the competition - -2010-06-26 Guillaume Chazarain - - * iotop/data.py: Whitespace fixes - -2010-05-31 Paul Wise - - * README, iotop.1, iotop/data.py: Document the requirement for - CONFIG_VM_EVENT_COUNTERS and check for it on startup. Closes: http://bugs.debian.org/574346 - -2010-03-17 Paul Wise - - * iotop/data.py: Do not report requirements that are available. Closes: http://bugs.debian.org/574246 - -2010-06-26 Guillaume Chazarain - - * release.sh: Build the source distribution using ./setup.py sdist - -2010-06-26 Guillaume Chazarain - - * MANIFEST.in: Make sure to bundle all files in the source - distribution - -2010-06-26 Guillaume Chazarain - - * iotop.py, iotop/data.py, iotop/ioprio.py, iotop/ui.py, - iotop/vmstat.py: Added GPLv2+ headers - -2010-04-27 Guillaume Chazarain - - * iotop/genetlink.py, iotop/netlink.py: Johannes relicensed - pynl80211 to GPL version 2 or later. - -2010-04-26 Jiri Olsa - - * iotop/netlink.py: This broke on ppc64. Let's make U32Attr - consistent with u32(). - -2010-01-11 Guillaume Chazarain - - * iotop/version.py: Bump the version number - -2010-01-11 Guillaume Chazarain - - * release.sh, setup.cfg: Bring back the building of RPMs and - integration of the ChangeLog - -2010-01-11 Guillaume Chazarain - - * NEWS, install-rpm.sh, setup.cfg, setup.py: Stopped using - setuptools in favor of straight distutils - -2010-01-02 Guillaume Chazarain - - * iotop/ui.py: Negative sizes shouldn't ever happen, but let's - handle them gracefully anyway. - -2009-12-13 Guillaume Chazarain - - * : commit b76e492ce5dbdecb198109e1bbc77aad909a0a67 Author: - Guillaume Chazarain Date: Sun Dec 13 21:17:56 - 2009 +0100 - -2009-12-13 Guillaume Chazarain - - * README, iotop/data.py: Document the new python requirements - -2009-12-13 Jiri Olsa - - * NEWS, THANKS, iotop/data.py, iotop/netlink.py: Compatibility with - python2.4 using the ctypes module - -2009-12-13 Guillaume Chazarain - - * iotop/genetlink.py: 80 columns - -2009-12-13 Guillaume Chazarain - - * iotop/genetlink.py, iotop/netlink.py: Untabify - -2009-12-13 Guillaume Chazarain - - * iotop/data.py: Don't use all() as it was introduced in python-2.5 - -2009-11-05 Guillaume Chazarain - - * THANKS, iotop/data.py: Fix a crash were iotop could open - /proc/PID/status but not read it as the process disappeared by then. - -2009-09-26 Guillaume Chazarain - - * iotop/ui.py: Default to 0 instead of None - -2009-09-22 Guillaume Chazarain - - * iotop/data.py: commit d4cab23b1c8c2f91ae7b353087bc60e7659620ef - broke iotop -o - -2009-09-06 Guillaume Chazarain - - * : commit b8bf63094a8903004126c8293d1874ad0565e68a Author: Paul - Wise Date: Sun Sep 6 23:19:46 2009 +0200 - -2009-09-06 Guillaume Chazarain - - * iotop/data.py: ioprio.sort_key() expects keys starting with '?' to - be at least two character long. It was not the case when different - threads in the same process had different ionice values, so adjust - the ionice key in this case. Bug reported by: Paul Wise - -2009-09-06 Guillaume Chazarain - - * iotop/ui.py: Make it even more obvious that something is wrong - when CONFIG_TASK_DELAY_ACCT is missing - -2009-09-06 Guillaume Chazarain - - * iotop/data.py: Detect python-2.5 before importing incompatible - stuff - -2009-08-30 Guillaume Chazarain - - * iotop/data.py: Turns out returning a list is faster than - iterating. - -2009-08-30 Guillaume Chazarain - - * iotop/data.py: Some more minor optimizations - -2009-08-30 Guillaume Chazarain - - * iotop/data.py: Optimize Stats.__init__ so that Stats.accumulate - can be cleaned up - -2009-08-29 Guillaume Chazarain - - * iotop/data.py: Gracefully handle disappearing PIDs - -2009-08-29 Guillaume Chazarain - - * iotop/ui.py: Faster ui.human_size() - -2009-08-29 Guillaume Chazarain - - * iotop/data.py: Faster ProcessList.list_dir() - -2009-08-29 Guillaume Chazarain - - * iotop/ioprio.py: Optimization: call getpriority() instead of - reading /proc - -2009-08-29 Guillaume Chazarain - - * iotop/data.py: Finish the implementation of the UID cache... by - actually caching the UID - -2009-08-29 Guillaume Chazarain - - * iotop/data.py, iotop/ui.py: 80 columns - -2009-08-29 Guillaume Chazarain - - * iotop/data.py: Cache the taskstats request in the thread_info as - building it every time is a hotspot - -2009-08-29 Guillaume Chazarain - - * iotop/data.py: Optimize even further the hotspot by unrolling the - loop and keeping the __dict__ objects in local variables. - -2009-08-29 Guillaume Chazarain - - * iotop/data.py: Optimize even further Stats.accumulate as it's a - hotspot: don't create a new Stats object everytime on every - invocation, keep updating the same object. - -2009-08-23 Guillaume Chazarain - - * NEWS, iotop/data.py, iotop/ui.py: Added a heuristic to detect - kernels without CONFIG_TASK_DELAY_ACCT - -2009-08-02 Guillaume Chazarain - - * iotop/data.py: Use .__dict__ instead of [gs]etattr as it's - slightly faster. - -2009-08-02 Guillaume Chazarain - - * iotop/ui.py: Use insstr instead of addstr so that we can write in - the last column, but this means we have to be careful not to add - trailing garbage as it would appear on the next line. - -2009-08-02 Guillaume Chazarain - - * NEWS, iotop/ui.py: Split long command lines in the middle instead - of cutting them at the end. - -2009-08-02 Guillaume Chazarain - - * NEWS, iotop/version.py: Bump version. - -2009-06-10 Guillaume Chazarain - - * release.sh: Stop building RPMs after my move to Ubuntu - -2009-06-10 Guillaume Chazarain - - * NEWS, iotop/ui.py: Fixed column sorting with --accumulated - -2009-06-10 Guillaume Chazarain - - * NEWS, iotop/data.py, iotop/ui.py: Fixed interaction between - --accumulated and --only - -2009-06-10 Guillaume Chazarain - - * NEWS, iotop/version.py: Version bump and start documenting new - features - -2009-05-19 Guillaume Chazarain - - * THANKS, iotop/ioprio.py: Fixed ioprio_get syscall detection on - i386 userspace/x86_64 kernel - (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529429) - -2009-05-05 Guillaume Chazarain - - * MANIFEST.in, README, setup.cfg: Include a light README - -2009-05-05 Guillaume Chazarain - - * iotop.1: Escape even more minus signs in the iotop manual page - -2009-05-05 Paul Wise - - * iotop.1: Escape some more minus signs in the iotop manual page - -2009-05-04 Guillaume Chazarain - - * NEWS, THANKS, iotop.1, iotop/ui.py: Added --quiet - -2009-05-03 Guillaume Chazarain - - * NEWS, THANKS, iotop.1, iotop/ui.py: Added --time - -2009-05-02 Guillaume Chazarain - - * NEWS, iotop.1, iotop/data.py, iotop/ui.py: Added the -k, - --kilobytes option - -2009-05-02 Guillaume Chazarain - - * MANIFEST.in, setup.py: Upgrade setuptools from 0.6c6 to 0.6c9 - -2009-03-31 Guillaume Chazarain - - * MANIFEST.in, release.sh, setup.cfg: Include a ChangeLog in the - release - -2009-03-30 Guillaume Chazarain - - * iotop/data.py: Put kernel threads between square brackets - -2009-03-30 Guillaume Chazarain - - * iotop/ui.py: Properly sanitize the value in the error report - -2009-03-30 Guillaume Chazarain - - * NEWS, iotop.1, iotop/data.py, iotop/ui.py: - Added the --accumulated option to show the accumulated traffic - instead of the current bandwidth (dynamically toggled with 'a') - Resist to process dying during the taskstats retrieval - Adjusted column headers - -2009-03-29 Guillaume Chazarain - - * NEWS: Document some recent changes - -2009-03-29 Guillaume Chazarain - - * iotop/data.py, iotop/ui.py, iotop/vmstat.py: - Manage a two level tree of processes: o with --processes: - [tgids...] -> [tid...] o without: [tids...] -> [tid] => This handles - nicely the case where a thread dies during a sampling period and we - should drop its stats. - Don't cache the ioprio as it may change - Get the total I/O bandwidth from /proc/vmstat instead of summing - it, as we can count some of it twice (ntfs-3g, nfsd...) - -2009-03-29 Guillaume Chazarain - - * iotop/ui.py: Added --profile - -2009-03-29 Guillaume Chazarain - - * iotop/data.py: Don't crash when a thread just disappeared - -2009-03-29 Guillaume Chazarain - - * iotop/data.py, iotop/ui.py: Better UID detection: read it from - stat(/proc/PID) instead of /proc/PID/status and cache it only if not - running as root as the process may setuid(). Rewrite - check_if_valid() to is_monitored(). Also re-read /proc/PID/status - if needed when re-reading /proc/PID/cmdline. - -2009-01-31 Guillaume Chazarain - - * THANKS, iotop/ui.py: From: Ryan Lovett - When running in batch mode, iotop doesn't flush its output so if - you're writing to a file, you won't see anything (e.g. via 'tail - -f') until iotop terminates - -2008-12-29 Guillaume Chazarain - - * iotop/data.py: Add a meaningful __repr__() - -2008-12-29 Guillaume Chazarain - - * iotop/data.py: If a new pinfo() is successfully created but we - cannot get its taskstats, it will not have a .ioprio field, so it - must be garbage collected. So, initialize .mark to False so that - incompletely built objects are garbage collected. Traceback (most recent call last): File "./iotop.py", line 11, in main() File "/home/g/iotop/iotop/ui.py", line 271, in main curses.wrapper(run_iotop, options) File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper return func(stdscr, *args, **kwds) File "/home/g/iotop/iotop/ui.py", line 226, in run_iotop ui.run() File "/home/g/iotop/iotop/ui.py", line 97, in run self.process_list.duration) File "/home/g/iotop/iotop/ui.py", line 195, in refresh_display lines = self.get_data() File "/home/g/iotop/iotop/ui.py", line 183, in get_data return map(format, processes) File "/home/g/iotop/iotop/ui.py", line 167, in format line = '%5d %4s %-8s %11s %11s %7s %7s ' % (p.pid, p.ioprio, - AttributeError: 'pinfo' object has no attribute 'ioprio' - -2008-12-28 Guillaume Chazarain - - * iotop/data.py: The I/O priority can be dynamically changed, so we - must re-fetch it every time. - -2008-12-28 Guillaume Chazarain - - * iotop.1, iotop/ui.py: Added the 'p' key to dynamically toggle the - --processes option - -2008-12-25 Guillaume Chazarain - - * iotop/ui.py: The interactive control 'O' is the same as 'o'. - -2008-12-25 Guillaume Chazarain - - * iotop.1, iotop/data.py, iotop/ioprio.py, iotop/ui.py: Added - support for showing the I/O priority - -2008-12-23 Guillaume Chazarain - - * iotop/ui.py: More verbose error handling for this exception: - Traceback (most recent call last): File "./iotop.py", line 11, in main() File "/src/iotop/iotop/iotop/ui.py", line 249, in main curses.wrapper(run_iotop, options) File "/usr/lib64/python2.5/curses/wrapper.py", line 44, in wrapper return func(stdscr, *args, **kwds) File "/src/iotop/iotop/iotop/ui.py", line 205, in run_iotop ui.run() File "/src/iotop/iotop/iotop/ui.py", line 95, in run self.process_list.duration) File "/src/iotop/iotop/iotop/ui.py", line 198, in refresh_display self.win.addstr(i + 2, 0, lines[i].encode('utf-8')) - _curses.error: addstr() returned ERR - -2008-11-16 Guillaume Chazarain - - * iotop/ui.py: Also keep only 2 decimal digits when printing bytes - per second - -2008-09-07 Guillaume Chazarain - - * NEWS, iotop/version.py: Version bump and mention that -P is now - fully implemented - -2008-09-07 Guillaume Chazarain - - * iotop.1, iotop/ui.py: Clarify -p help text, and cosmetically add a - terminating '.'. - -2008-09-07 Guillaume Chazarain - - * iotop.1: iotop is a mix of top(1) and vmstat(1) - -2008-09-07 Guillaume Chazarain - - * iotop.1, iotop/data.py: Precisely document required kernel options - http://bugs.debian.org/497360 - -2008-09-06 Guillaume Chazarain - - * iotop/data.py: Reimplement -P without using the half implemented - TASKSTATS_CMD_ATTR_TGID - -2008-09-06 Guillaume Chazarain - - * iotop/data.py, iotop/ui.py: Cleanup: introduce a Stats class to - aggregate the useful output from taskstats insteaf of using a dict. - -2008-08-18 Guillaume Chazarain - - * iotop/data.py: It seems the Name: field can sometimes be empty. - http://bugs.debian.org/492568 - -2008-08-18 Guillaume Chazarain - - * iotop/data.py: Cosmetic - -2008-07-07 Guillaume Chazarain - - * NEWS, iotop/version.py: The new features list is not that long - -2008-06-24 Guillaume Chazarain - - * iotop/data.py: Also handle invalid UTF-8 - -2008-06-23 Guillaume Chazarain - - * iotop/ui.py: Unlike insstr, addstr is picky about lines wider than - the terminal. - -2008-06-23 Guillaume Chazarain - - * iotop/data.py, iotop/ui.py: Try harder at handling UTF-8 - -2008-06-18 Guillaume Chazarain - - * NEWS, THANKS, iotop/data.py, iotop/ui.py: UTF-8 strings are now - correctly handled. - -2008-06-18 Guillaume Chazarain - - * NEWS, iotop/version.py: Bump version - -2008-05-28 Guillaume Chazarain - - * iotop.1: Fix for - - http://lintian.debian.org/reports/tags/hyphen-used-as-minus-sign.html - -2008-05-23 Guillaume Chazarain - - * MANIFEST.in, install-rpm.sh, setup.cfg, setup.py: Package the man - page - -2008-05-22 Guillaume Chazarain - - * iotop/ui.py: Reordered the option like in the man page, as it's a - more sensible ordering - -2008-05-22 Guillaume Chazarain - - * THANKS, iotop.1: Added a man page - -2008-05-22 Guillaume Chazarain - - * iotop/ui.py: Safer color terminal handling - -2008-05-22 Guillaume Chazarain - - * iotop/ui.py: Stop flickering during refresh - -2008-05-22 Guillaume Chazarain - - * NEWS, iotop/data.py, iotop/ui.py: Added workaround for missing - ac_etime in TASKSTATS_CMD_ATTR_TGID - -2008-04-20 Guillaume Chazarain - - * NEWS: Typo - -2008-04-20 Guillaume Chazarain - - * iotop/ui.py: Document the 'o' key. - -2008-04-20 Guillaume Chazarain - - * iotop/ui.py: Consistency in the grammar - -2008-04-20 Guillaume Chazarain - - * iotop/ui.py: Filter processes to display before trimming them to - avoid removing processes that would be displayed after the trimming. - For example, sorting by PID could place I/O active processes at the - end, but we don't want to delete them as they would be shown anyway - is -o is used. - -2008-04-06 Guillaume Chazarain - - * NEWS, iotop/ui.py: Typing 'p' dynamically toggle the --only option - -2008-03-20 Guillaume Chazarain - - * bin/iotop: Detect unsuccessful attempts at running an uninstalled - iotop - -2008-03-14 Guillaume Chazarain - - * run-iotop => iotop.py: Let's use the obvious filename - -2008-03-10 Guillaume Chazarain - - * release.sh: Remove blank line - -2008-03-10 Guillaume Chazarain - - * release.sh: Added release script - -2008-03-09 Guillaume Chazarain - - * MANIFEST.in, bin/iotop, setup.cfg, setup.py: Added packaging - information - -2008-03-09 Guillaume Chazarain - - * iotop/ui.py, iotop/version.py: Extracted out version number - -2008-03-09 Guillaume Chazarain - - * COPYING: Added GPLv2 COPYING file - -2008-03-09 Guillaume Chazarain - - * THANKS: Added THANKS file - -2008-03-09 Guillaume Chazarain - - * .gitignore: Ignore byte compiled files - -2008-03-09 Guillaume Chazarain - - * NEWS: Added NEWS file - -2008-03-09 Guillaume Chazarain - - * iotop/__init__.py, iotop/data.py, genetlink.py => - iotop/genetlink.py, netlink.py => iotop/netlink.py, iotop.py => - iotop/ui.py, run-iotop: Code reorganization - -2008-03-05 Guillaume Chazarain - - * genetlink.py, iotop.py, netlink.py: Instead of copy/pasting - pynl80211 in iotop.py, keep it in separate files - -2008-03-05 Guillaume Chazarain - - * iotop.py: Update e-mail and copyright information - -2008-03-05 Guillaume Chazarain - - * iotop.py: Reading the cmdline of a dead process raises an - exception too. Reported by Roland Kletzing - -2008-03-02 Guillaume Chazarain - - * iotop.py: Skip the dirname only when the cmdline starts with an - absolute path - -2008-01-20 Guillaume Chazarain - - * iotop.py: Fix the typo with the right correction this time - -2008-01-20 Guillaume Chazarain - - * iotop.py: Simplify help generation - -2008-01-18 Guillaume Chazarain - - * iotop.py: Bump version - -2008-01-18 Guillaume Chazarain - - * iotop.py: Removed embedded history comments as it is now in git. - -2008-01-18 Guillaume Chazarain - - * iotop.py: Added --only as suggested by Iain Lea - -2008-01-18 Guillaume Chazarain - - * iotop.py: Fix typo, reported by Iain Lea - -2007-12-19 Guillaume Chazarain - - * iotop.py: Tolerate misconfigured terminals - -2007-09-30 Guillaume Chazarain - - * iotop.py: Fixed -b - -2007-08-26 Guillaume Chazarain - - * iotop.py: Document taskstats bug: - http://lkml.org/lkml/2007/8/2/185 - -2007-08-25 Guillaume Chazarain - - * iotop.py: Handle terminal resizing - -2007-08-25 Guillaume Chazarain - - * iotop.py: More accurate cutting of the command line - -2007-08-19 Guillaume Chazarain - - * iotop.py: handle empty process list - -2007-08-19 Guillaume Chazarain - - * iotop.py: Fix "-P -p NOT_A_TGID", optimize -p - -2007-08-13 Guillaume Chazarain - - * iotop.py: Handle short replies, and fix bandwidth calculation when - delay != 1s - -2007-07-23 Guillaume Chazarain - - * iotop.py: Added support for taskstats version > 4 in iotop.py - -2007-07-15 Guillaume Chazarain - - * Initial import of iotop - diff -Nru iotop-0.6-24-g733f3f8/debian/changelog iotop-0.6-42-ga14256a/debian/changelog --- iotop-0.6-24-g733f3f8/debian/changelog 2020-06-28 15:48:40.000000000 +0200 +++ iotop-0.6-42-ga14256a/debian/changelog 2022-08-04 09:39:29.000000000 +0200 @@ -1,3 +1,26 @@ +iotop (0.6-42-ga14256a-0.1) unstable; urgency=medium + + * Non-maintainer upload. + + [ Christian Ehrhardt ] + * New upstream release + [still from git as there was no new tag since 9 years] + - Among other fixes this new release includes various changes that + fix some long waiting bugs: + + 443737e Workaround crashes due to non-UTF-8 characters in + process command-lines (Closes: #737043) + + 0392b20 Ignore invalid lines in /proc/*/status files (Closes: #926207) + + ab35334 Detect the kernel.task_delayacct sysctl value + (Closes: #1004714)(LP: #1982727) + + [ Helmut Grohne ] + * Fix Build-Depends for cross. (Closes: #913375) + - Annotate python3 with :any. + - Replace python3:any with python3-all:any as pybuild insists. + - Add libpython3-all-dev as pybuild needs that as well. + + -- Christian Ehrhardt Thu, 04 Aug 2022 09:39:29 +0200 + iotop (0.6-24-g733f3f8-1.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru iotop-0.6-24-g733f3f8/debian/changelog.orig iotop-0.6-42-ga14256a/debian/changelog.orig --- iotop-0.6-24-g733f3f8/debian/changelog.orig 1970-01-01 01:00:00.000000000 +0100 +++ iotop-0.6-42-ga14256a/debian/changelog.orig 2022-08-04 09:39:29.000000000 +0200 @@ -0,0 +1,220 @@ +iotop (0.6-42-ga14256a-0ubuntu1) UNRELEASED; urgency=medium + + * New upstream release + + -- Christian Ehrhardt Thu, 04 Aug 2022 09:39:29 +0200 + +iotop (0.6-24-g733f3f8-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Install iotop as iotop-py and provide iotop via alternatives + + -- Boian Bonev Sun, 28 Jun 2020 16:48:40 +0300 + +iotop (0.6-24-g733f3f8-1) unstable; urgency=medium + + * New upstream snapshot + - Adds syscall numbers for mips (Closes: #864886) + - Fixes crash in Linux vserver (Closes: #844173) + - Fixes typo (Closes: #739642) + - Drop merged Python 3 patch + * Add distutils to build deps (Closes: #896792) + * Bump debhelper compat to 11 + * Add DEP-8 test using autodep8 output + * Add DEP-8 test running in batch mode + * Bump Standards-Version, no changes needed + + -- Paul Wise Fri, 27 Apr 2018 20:56:38 +0800 + +iotop (0.6-2) unstable; urgency=medium + + * Switch to Python 3 (Closes: #724026) + - Add upstream patch to fix setup.py + * Switch to debhelper compat level 9 + * Switch to the Pybuild helper + * Switch to debian/copyright format 1.0 + * Bump Standards-Version, no changes needed + * Add upstream metadata + * Download upstream OpenPGP sig using uscan + * Include upstream OpenPGP sig in source package + * Use GPL-2+ for debian/ for upstream compatibility + + -- Paul Wise Fri, 29 Jul 2016 18:25:22 +0800 + +iotop (0.6-1) unstable; urgency=low + + * New upstream release + - Doesn't crash with UTF-8 command-lines (Closes: #708252) (LP: #1179975) + + -- Paul Wise Fri, 07 Jun 2013 14:00:56 +0800 + +iotop (0.5-2) unstable; urgency=low + + * Upload to unstable now that wheezy is out + * Fix the FSF address in the copyright information + * Fix a Python 3 incompatibility issue + * Exit when a SIGTERM signal is received in interactive mode. (LP: #1156754) + + -- Paul Wise Mon, 06 May 2013 13:25:07 +0800 + +iotop (0.5-1) experimental; urgency=low + + * New upstream release + - Adapts the display to the maximum pid width (LP: #896989) + - Upstream partially moved iotop to sbin, drop some install munging + - Drops support for ctypes, update dependency information + * Work around debhelper not doing parallel builds by default + * Bump Standards-Version, no changes needed + * Wrap and sort various files + + -- Paul Wise Mon, 04 Feb 2013 08:10:22 +0800 + +iotop (0.4.4-4) unstable; urgency=low + + * Move iotop script to /usr/sbin, adjust manual page since Linux + wants root for access to the taskstats interfaces (Closes: #653519) + + -- Paul Wise Thu, 29 Dec 2011 10:50:35 +0800 + +iotop (0.4.4-3) unstable; urgency=low + + * Drop type-handling/linux dep and switch to arch linux-any until + linux-all is available; that will probably never happen since + it requires changes in so many places. + + -- Paul Wise Thu, 17 Nov 2011 08:05:21 +0800 + +iotop (0.4.4-2) unstable; urgency=low + + * Depend on linux (provided by type-handling) so that iotop is not + installable on non-Linux ports of Debian. + + -- Paul Wise Wed, 16 Nov 2011 19:21:09 +0800 + +iotop (0.4.4-1) unstable; urgency=low + + [ Paul Wise ] + * New upstream release + - Produces a helpful error instead of crashing when Linux + denies permission (Closes: #644616, LP: #879767) + * Bump Standards-Version, no changes needed + + [ Scott Kitterman ] + * Switch to dh_python2 (LP: #856478) + + -- Paul Wise Tue, 01 Nov 2011 16:10:09 +0800 + +iotop (0.4.3-1) unstable; urgency=low + + * New upstream release + - Drop all patches, included upstream + - Fixes crash with non-ASCII characters (Closes: #616481) + - Fixes startup with invalid locales (Closes: #593846) + - Adds support for ioprio on armel and hppa (Closes: #595426) + * Wrap deps and build-deps one per line + * Drop quilt stuff, not needed with dpkg-source v3 + * Bump Standards-Version, no changes needed + + -- Paul Wise Tue, 29 Mar 2011 09:16:38 +0800 + +iotop (0.4-2) unstable; urgency=low + + * Correct bug number in the changelog for previous version. + * Switch to dpkg-source format v3 + * Do not report requirements that are available (Closes: #574246) + * Check for CONFIG_VM_EVENT_COUNTERS, it is needed (Closes: #574346) + * Bump Standards-Version, no changes needed + + -- Paul Wise Mon, 31 May 2010 17:46:30 +0800 + +iotop (0.4-1) unstable; urgency=low + + * New upstream release + - Switched to distutils and removed setuptools egg (Closes: #564364) + - Works around weird math domain error (Closes: #563097) + - Works on Python 2.4 (with ctypes), adust packaging + * Make the watch file a little more flexible + + -- Paul Wise Tue, 12 Jan 2010 14:52:38 +0800 + +iotop (0.3.2-1) unstable; urgency=low + + * New upstream release + - Includes ionice functionality (Closes: #535969) + * Make the setuptools egg removal more flexible just in case + * Bump Standards-Version, no changes needed + + -- Paul Wise Thu, 24 Sep 2009 14:34:43 +0800 + +iotop (0.3.1-1) unstable; urgency=low + + * New upstream release + - Fixes syscall usage on biarch systems (Closes: #529429) + * Bump Standards-Version, no changes needed + + -- Paul Wise Sun, 28 Jun 2009 15:54:22 +0800 + +iotop (0.3-1) unstable; urgency=low + + * New upstream release + - displays IO scheduling class and priority (Closes: #521360) + - iotop -bo output can now be piped (LP: #337882) + - 01_fix_nfs_crash.patch was included, drop it + * Bump Standards-Version, no changes needed + + -- Paul Wise Mon, 04 May 2009 14:17:06 +0800 + +iotop (0.2.1-1) unstable; urgency=low + + * New upstream release (Closes: #511649) + * List needed kernel config options in description (Closes: #497360) + * Avoid use of first-person in description + * Build-dep on python-setuptools instead of using the egg + * Switch from cdbs to debhelper 7 + * Add a README.source pointing to the quilt one + + -- Paul Wise Tue, 24 Feb 2009 18:09:50 +0900 + +iotop (0.2-3) unstable; urgency=low + + * Prevent a crash when NFS mounts have disappeared (Closes: #492568) + + -- Paul Wise Mon, 01 Sep 2008 13:51:54 +0800 + +iotop (0.2-2) unstable; urgency=low + + * Fix dependencies (Closes: #489064) + * Bump Standards-Version (no changes needed) + + -- Paul Wise Thu, 03 Jul 2008 14:11:58 +0800 + +iotop (0.2-1) unstable; urgency=low + + * New upstream release + * Drop manual page and patch (included upstream) + * Update Homepage to new upstream web page + * Upstream has a tarball and setup.py + * Add a watch file to track new upstream versions + * Switch to python-support for installation + + -- Paul Wise Thu, 29 May 2008 17:31:58 +0800 + +iotop (0.1-3) unstable; urgency=low + + * Fix traceback with some kinds of terminals (Closes: #482018) + + -- Paul Wise Wed, 21 May 2008 16:41:50 +0800 + +iotop (0.1-2) unstable; urgency=low + + * Mention in the manual page which options need to be enabled + in the Linux kernel build configuration. (Closes: #479843) + + -- Paul Wise Wed, 07 May 2008 10:40:05 +0800 + +iotop (0.1-1) unstable; urgency=low + + * Initial release (Closes: #477681) + + -- Paul Wise Thu, 24 Apr 2008 21:51:35 +0800 + diff -Nru iotop-0.6-24-g733f3f8/debian/changelog.rej iotop-0.6-42-ga14256a/debian/changelog.rej --- iotop-0.6-24-g733f3f8/debian/changelog.rej 1970-01-01 01:00:00.000000000 +0100 +++ iotop-0.6-42-ga14256a/debian/changelog.rej 2022-08-04 09:39:29.000000000 +0200 @@ -0,0 +1,16 @@ +--- debian/changelog 2018-04-27 14:56:38.000000000 +0200 ++++ debian/changelog 2018-11-10 08:41:46.000000000 +0100 +@@ -1,3 +1,13 @@ ++iotop (0.6-24-g733f3f8-1.1) UNRELEASED; urgency=medium ++ ++ * Non-maintainer upload. ++ * Fix Build-Depends for cross. (Closes: #-1) ++ + Annotate python3 with :any. ++ + Replace python3:any with python3-all:any as pybuild insists. ++ + Add libpython3-all-dev as pybuild needs that as well. ++ ++ -- Helmut Grohne Sat, 10 Nov 2018 08:41:46 +0100 ++ + iotop (0.6-24-g733f3f8-1) unstable; urgency=medium + + * New upstream snapshot diff -Nru iotop-0.6-24-g733f3f8/debian/control iotop-0.6-42-ga14256a/debian/control --- iotop-0.6-24-g733f3f8/debian/control 2016-08-11 09:52:08.000000000 +0200 +++ iotop-0.6-42-ga14256a/debian/control 2022-08-04 09:39:29.000000000 +0200 @@ -5,7 +5,8 @@ Build-Depends: debhelper (>= 11~), dh-python, - python3, + python3-all:any, + libpython3-all-dev, python3-distutils, Standards-Version: 4.1.4 Homepage: http://guichaz.free.fr/iotop/ diff -Nru iotop-0.6-24-g733f3f8/.install-rpm.sh iotop-0.6-42-ga14256a/.install-rpm.sh --- iotop-0.6-24-g733f3f8/.install-rpm.sh 1970-01-01 01:00:00.000000000 +0100 +++ iotop-0.6-42-ga14256a/.install-rpm.sh 2022-03-08 00:21:27.000000000 +0100 @@ -0,0 +1,10 @@ +#!/bin/sh + +# https://bugs.python.org/issue644744 + +python3 setup.py install -O1 --root="$RPM_BUILD_ROOT" --record=INSTALLED_FILES +# 'brp-compress' gzips the man pages without distutils knowing... fix this +sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.gz@g' INSTALLED_FILES +# actually, it doesn't on all distributions so just compress unconditionally +# before brp-compress is run +find "$RPM_BUILD_ROOT" -type f -name iotop.8 -exec gzip '{}' \; diff -Nru iotop-0.6-24-g733f3f8/iotop/data.py iotop-0.6-42-ga14256a/iotop/data.py --- iotop-0.6-24-g733f3f8/iotop/data.py 2017-06-17 03:25:56.000000000 +0200 +++ iotop-0.6-42-ga14256a/iotop/data.py 2022-03-08 00:21:27.000000000 +0100 @@ -60,7 +60,7 @@ if not ioaccounting: print(' - I/O accounting support ' \ '(CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, ' \ - 'CONFIG_TASK_IO_ACCOUNTING)') + 'CONFIG_TASK_IO_ACCOUNTING, kernel.task_delayacct sysctl)') if not vm_event_counters: print(' - VM event counters (CONFIG_VM_EVENT_COUNTERS)') sys.exit(1) @@ -207,8 +207,14 @@ def parse_proc_pid_status(pid): result_dict = {} try: - for line in open('/proc/%d/status' % pid): - key, value = line.split(':', 1) + for line in open('/proc/%d/status' % pid, errors='replace'): + try: + key, value = line.split(':', 1) + except ValueError: + # Ignore lines that are not formatted correctly as + # some downstream kernels may have weird lines and + # the needed fields are probably formatted correctly. + continue result_dict[key] = value.strip() except IOError: pass # No such process @@ -471,3 +477,11 @@ def clear(self): self.processes = {} + + +def sysctl_task_delayacct(): + try: + with open('/proc/sys/kernel/task_delayacct') as f: + return bool(int(f.read().strip())) + except FileNotFoundError: + return None diff -Nru iotop-0.6-24-g733f3f8/iotop/_ioprio.c iotop-0.6-42-ga14256a/iotop/_ioprio.c --- iotop-0.6-24-g733f3f8/iotop/_ioprio.c 1970-01-01 01:00:00.000000000 +0100 +++ iotop-0.6-42-ga14256a/iotop/_ioprio.c 2022-03-08 00:21:27.000000000 +0100 @@ -0,0 +1,55 @@ +#include +#include + +#if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 3) +#define NO_METHODS NoMethods +static PyMethodDef NoMethods[] = { + {NULL, NULL, 0, NULL} +}; +#else +#define NO_METHODS NULL +#endif + +#if PY_MAJOR_VERSION >= 3 +PyDoc_STRVAR(doc, "SYS_ioprio_get and SYS_ioprio_set for syscalls"); +static struct PyModuleDef mod = { + PyModuleDef_HEAD_INIT, + "_ioprio", + doc, + -1, + NO_METHODS, + NULL, + NULL, + NULL, + NULL +}; + +#define INIT_FUNC PyInit__ioprio +#define INIT_MOD PyModule_Create(&mod) +#define INIT_ERR NULL +#define INIT_RET return m +#else +#define INIT_FUNC init_ioprio +#define INIT_MOD Py_InitModule("_ioprio", NO_METHODS) +#define INIT_ERR +#define INIT_RET +#endif // PY_MAJOR_VERSION >= 3 + +PyMODINIT_FUNC INIT_FUNC(void) +{ + PyObject *m = INIT_MOD; + + if (m == NULL) { + return INIT_ERR; + } + +#ifdef SYS_ioprio_get + PyModule_AddIntConstant(m, "SYS_ioprio_get", SYS_ioprio_get); +#endif + +#ifdef SYS_ioprio_set + PyModule_AddIntConstant(m, "SYS_ioprio_set", SYS_ioprio_set); +#endif + + INIT_RET; +} diff -Nru iotop-0.6-24-g733f3f8/iotop/ioprio.py iotop-0.6-42-ga14256a/iotop/ioprio.py --- iotop-0.6-24-g733f3f8/iotop/ioprio.py 2017-06-17 03:25:56.000000000 +0200 +++ iotop-0.6-42-ga14256a/iotop/ioprio.py 2022-03-08 00:21:27.000000000 +0100 @@ -21,8 +21,7 @@ import os import platform -# From https://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=blob; -# f=configure.ac;h=770eb45ae85d32757fc3cff1d70a7808a627f9f7;hb=HEAD#l354 +# From https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/configure.ac#n2289 # i386 bit userspace under an x86_64 kernel will have its uname() appear as # 'x86_64' but it will use the i386 syscall number, that's why we consider both # the architecture name and the word size. @@ -76,8 +75,13 @@ except TypeError: self.err = err -__NR_ioprio_get = find_ioprio_syscall_number(IOPRIO_GET_ARCH_SYSCALL) -__NR_ioprio_set = find_ioprio_syscall_number(IOPRIO_SET_ARCH_SYSCALL) +try: + from iotop import _ioprio + __NR_ioprio_get = _ioprio.SYS_ioprio_get + __NR_ioprio_set = _ioprio.SYS_ioprio_set +except (ImportError, AttributeError): + __NR_ioprio_get = find_ioprio_syscall_number(IOPRIO_GET_ARCH_SYSCALL) + __NR_ioprio_set = find_ioprio_syscall_number(IOPRIO_SET_ARCH_SYSCALL) try: ctypes_handle = ctypes.CDLL(None, use_errno=True) diff -Nru iotop-0.6-24-g733f3f8/iotop/ui.py iotop-0.6-42-ga14256a/iotop/ui.py --- iotop-0.6-24-g733f3f8/iotop/ui.py 2017-06-17 03:25:56.000000000 +0200 +++ iotop-0.6-42-ga14256a/iotop/ui.py 2022-03-08 00:21:27.000000000 +0100 @@ -43,7 +43,7 @@ from collections import OrderedDict -from iotop.data import find_uids, TaskStatsNetlink, ProcessList, Stats +from iotop.data import find_uids, TaskStatsNetlink, ProcessList, Stats, sysctl_task_delayacct from iotop.data import ThreadInfo from iotop.version import VERSION from iotop import ioprio @@ -224,6 +224,12 @@ new_sorting_key += delta new_sorting_key = max(0, new_sorting_key) new_sorting_key = min(len(IOTopUI.sorting_keys) - 1, new_sorting_key) + if not self.has_swapin_io: + if new_sorting_key in (5, 6): + if delta <= 0: + new_sorting_key = 4 + elif delta > 0: + new_sorting_key = 7 return new_sorting_key # I wonder if switching to urwid for the display would be better here @@ -421,14 +427,22 @@ def format(p): stats = format_stats(self.options, p, self.process_list.duration) io_delay, swapin_delay, read_bytes, write_bytes = stats - if Stats.has_blkio_delay_total: - delay_stats = '%7s %7s ' % (swapin_delay, io_delay) - else: - delay_stats = ' ?unavailable? ' - pid_format = '%%%dd' % MAX_PID_WIDTH - line = (pid_format + ' %4s %-8s %11s %11s %s') % ( - p.pid, p.get_ioprio(), p.get_user()[:8], read_bytes, - write_bytes, delay_stats) + format = '%%%dd' % MAX_PID_WIDTH + params = p.pid, + format += ' %4s' + params += p.get_ioprio(), + format += ' %-8s' + params += p.get_user()[:8], + format += ' %11s %11s' + params += read_bytes, write_bytes + if self.has_swapin_io: + format += ' %7s %7s' + params += swapin_delay, io_delay + elif self.options.batch: + format += ' %s ' + params += '?unavailable?', + format += ' ' + line = format % (params) cmdline = p.get_cmdline() if not self.options.batch: remaining_length = self.width - len(line) @@ -473,6 +487,15 @@ pid += 'TID' titles = [pid, ' PRIO', ' USER', ' DISK READ', ' DISK WRITE', ' SWAPIN', ' IO', ' COMMAND'] + self.has_swapin_io = Stats.has_blkio_delay_total + if self.has_swapin_io: + # Linux kernels without the sysctl return None and + # iotop just uses the heuristic for those versions. + # Linux kernels with the sysctl return True or False + # and iotop then uses the sysctl value instead. + if sysctl_task_delayacct() == False: + self.has_swapin_io = False + self.adjust_sorting_key(0) lines = self.get_data() if self.options.time: titles = [' TIME'] + titles @@ -491,10 +514,12 @@ else: self.win.erase() - if Stats.has_blkio_delay_total: + if self.has_swapin_io: status_msg = None else: - status_msg = ('CONFIG_TASK_DELAY_ACCT not enabled in kernel, ' + status_msg = ('CONFIG_TASK_DELAY_ACCT ' + 'and kernel.task_delayacct sysctl ' + 'not enabled in kernel, ' 'cannot determine SWAPIN and IO %') help_lines = [] @@ -561,6 +586,8 @@ pos = 0 remaining_cols = self.width for i in range(len(titles)): + if not self.has_swapin_io and i in (5, 6): + continue attr = curses.A_REVERSE title = titles[i] if i == self.sorting_key: @@ -618,6 +645,9 @@ return run_iotop_window(None, options) else: return curses.wrapper(run_iotop_window, options) + except curses.error as e: + print('iotop interface error:', e, file=sys.stderr) + sys.exit(1) except OSError as e: if e.errno == errno.EPERM: print(e, file=sys.stderr) @@ -630,6 +660,15 @@ Please do not file bugs on iotop about this.''', file=sys.stderr) sys.exit(1) + if e.errno == errno.ENOENT: + print(e, file=sys.stderr) + print(''' +The Linux kernel interfaces that iotop relies on for process I/O statistics +were not found. Please enable CONFIG_TASKSTATS in your Linux kernel build +configuration, use iotop outside a container and or share the host's +network namespace with the container. + +Please do not file bugs on iotop about this.''', file=sys.stderr) else: raise diff -Nru iotop-0.6-24-g733f3f8/iotop.8 iotop-0.6-42-ga14256a/iotop.8 --- iotop-0.6-24-g733f3f8/iotop.8 2017-06-17 03:25:56.000000000 +0200 +++ iotop-0.6-42-ga14256a/iotop.8 2022-03-08 00:21:27.000000000 +0100 @@ -1,4 +1,4 @@ -.TH IOTOP "8" "April 2009" +.TH IOTOP "8" "October 1, 2021" .SH NAME iotop \- simple top\-like I/O monitor .SH SYNOPSIS @@ -9,7 +9,8 @@ 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. +options need to be enabled in your Linux kernel build configuration and +since Linux kernel 5.14, the kernel.task_delayacct sysctl enabled. .PP iotop displays columns for the I/O bandwidth read and written by each process/thread during the sampling period. It also displays the percentage @@ -26,7 +27,7 @@ due to data caching and I/O operations reordering that take place inside Linux kernel. .PP Use the left and right arrows to change the sorting, r to reverse the -sorting order, o to toggle the \-\-only option, p to toggle the \-\-processes option, a to toggle the \-\-accumulated option, q to quit or i to change the priority of a thread or a process' thread(s). Any other key will force a refresh. +sorting order, o to toggle the \-\-only option, p to toggle the \-\-processes option, a to toggle the \-\-accumulated option, q to quit or i to change the priority of a thread or a process's thread(s). Any other key will force a refresh. .SH OPTIONS .TP \fB\-\-version\fR diff -Nru iotop-0.6-24-g733f3f8/iotop.py iotop-0.6-42-ga14256a/iotop.py --- iotop-0.6-24-g733f3f8/iotop.py 2017-06-17 03:25:56.000000000 +0200 +++ iotop-0.6-42-ga14256a/iotop.py 2022-03-08 00:21:27.000000000 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # iotop: Display I/O usage of processes in a top like UI # Copyright (c) 2007, 2008 Guillaume Chazarain # GPL version 2 or later diff -Nru iotop-0.6-24-g733f3f8/MANIFEST.in iotop-0.6-42-ga14256a/MANIFEST.in --- iotop-0.6-24-g733f3f8/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 +++ iotop-0.6-42-ga14256a/MANIFEST.in 2022-03-08 00:21:27.000000000 +0100 @@ -0,0 +1,8 @@ +include .gitignore +include COPYING +include ChangeLog +include NEWS +include README +include THANKS +include iotop.8 +include iotop.py diff -Nru iotop-0.6-24-g733f3f8/PKG-INFO iotop-0.6-42-ga14256a/PKG-INFO --- iotop-0.6-24-g733f3f8/PKG-INFO 2018-04-27 14:49:30.000000000 +0200 +++ iotop-0.6-42-ga14256a/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -Metadata-Version: 1.0 -Name: iotop -Version: 0.6 -Summary: Per process I/O bandwidth monitor -Home-page: http://guichaz.free.fr/iotop -Author: Guillaume Chazarain -Author-email: guichaz@gmail.com -License: GPL -Description: Iotop is a Python program with a top like UI used to - show of behalf of which process is the I/O going on. -Platform: UNKNOWN diff -Nru iotop-0.6-24-g733f3f8/README iotop-0.6-42-ga14256a/README --- iotop-0.6-24-g733f3f8/README 2017-06-17 03:25:56.000000000 +0200 +++ iotop-0.6-42-ga14256a/README 2022-03-08 00:21:27.000000000 +0100 @@ -1,7 +1,8 @@ Iotop is a Python program with a top like UI used to show of behalf of which process is the I/O going on. It requires Python >= 2.7 and a Linux kernel >= 2.6.20 with the CONFIG_TASK_DELAY_ACCT CONFIG_TASKSTATS, -CONFIG_TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS options on. +CONFIG_TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS build options on +and for Linux kernels since 5.14, the kernel.task_delayacct sysctl enabled. To run a local version of iotop: @@ -20,6 +21,19 @@ # ./setup.py install +For an alternative implementation of iotop that is written in C, uses +less resources and has more features, please take a look at this project: + +https://github.com/Tomas-M/iotop + +Packages of both implementations are available in several distributions: + +https://repology.org/project/iotop-python/versions +https://repology.org/project/iotop-c/versions + +To chat with the iotop community join #iotop on the libera.chat IRC network. +Please mention which implementation is in use when asking questions there. + -- Guillaume Chazarain -http://guichaz.free.fr/iotop +http://guichaz.free.fr/iotop/ diff -Nru iotop-0.6-24-g733f3f8/release.sh iotop-0.6-42-ga14256a/release.sh --- iotop-0.6-24-g733f3f8/release.sh 1970-01-01 01:00:00.000000000 +0100 +++ iotop-0.6-42-ga14256a/release.sh 2022-03-08 00:21:27.000000000 +0100 @@ -0,0 +1,21 @@ +#!/bin/bash + +set -x +set -e # Exit on error + +PACKAGE=$(basename "$PWD") +mkdir dist +TEMPDIR="$(mktemp -d)" +VERSION=$(python3 -c "from $PACKAGE.version import VERSION; print VERSION") +echo "$PACKAGE-$VERSION: $TEMPDIR" +mkdir "$TEMPDIR/$PACKAGE-$VERSION" +git archive HEAD | (cd "$TEMPDIR/$PACKAGE-$VERSION" && tar vx) +git2cl > "$TEMPDIR/$PACKAGE-$VERSION/ChangeLog" +DIR="$PWD" +cd "$TEMPDIR/$PACKAGE-$VERSION" +./setup.py sdist --formats gztar,bztar +mv "dist/$PACKAGE-$VERSION.tar."{gz,bz2} "$DIR/dist" +./setup.py bdist_rpm +mv "dist/$PACKAGE-$VERSION-1."{noarch,src}.rpm "$DIR/dist" +rm --force --recursive "$TEMPDIR" +(cd "$DIR/dist" && echo ./* | xargs -n1 gpg --armor --detach-sign) diff -Nru iotop-0.6-24-g733f3f8/sbin/iotop iotop-0.6-42-ga14256a/sbin/iotop --- iotop-0.6-24-g733f3f8/sbin/iotop 2017-06-17 03:25:56.000000000 +0200 +++ iotop-0.6-42-ga14256a/sbin/iotop 2022-03-08 00:21:27.000000000 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # iotop: Display I/O usage of processes in a top like UI # Copyright (c) 2007, 2008 Guillaume Chazarain , GPLv2 # See iotop --help for some help diff -Nru iotop-0.6-24-g733f3f8/setup.py iotop-0.6-42-ga14256a/setup.py --- iotop-0.6-24-g733f3f8/setup.py 2017-06-17 03:25:56.000000000 +0200 +++ iotop-0.6-42-ga14256a/setup.py 2022-03-08 00:21:27.000000000 +0100 @@ -1,9 +1,11 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -from distutils.core import setup +from distutils.core import setup, Extension from distutils.command import install as distutils_install from iotop.version import VERSION +_ioprio = Extension('iotop._ioprio', sources = ['iotop/_ioprio.c']) + # Dirty hack to make setup.py install the iotop script to sbin/ instead of bin/ # while still honoring the choice of installing into local/ or not. if hasattr(distutils_install, 'INSTALL_SCHEMES'): @@ -18,9 +20,10 @@ show of behalf of which process is the I/O going on.''', author='Guillaume Chazarain', author_email='guichaz@gmail.com', - url='http://guichaz.free.fr/iotop', + url='http://guichaz.free.fr/iotop/', scripts=['sbin/iotop'], data_files=[('share/man/man8', ['iotop.8'])], packages=['iotop'], + ext_modules = [_ioprio], license='GPL' ) diff -Nru iotop-0.6-24-g733f3f8/THANKS iotop-0.6-42-ga14256a/THANKS --- iotop-0.6-24-g733f3f8/THANKS 2017-06-17 03:25:56.000000000 +0200 +++ iotop-0.6-42-ga14256a/THANKS 2022-03-08 00:21:27.000000000 +0100 @@ -23,7 +23,7 @@ Piotr Engelking Reported that iotop's ioprio_get syscall detection was buggy on 32bit -userspace on a x86_64 kernel. +userspace on an x86_64 kernel. Gabriel Redner Reported a crash were iotop could open /proc/PID/status but not read it as the process disappeared by then.