Alternative to iotop for non-root user without sudo privileges

19,248

Solution 1

To reference a few more tools.

htop

Command line tool, packaged in most distributions, is able to show the I/O without root privileges but only for your processes.

  • run htop(1), you'll find an interface similar to top(1)
  • hit F2 to enter the configuration
  • use to select "Columns"
  • use to select "Available Columns"
  • use / to select the I/O informations you want (ie: IO_READ_RATE, IO_WRITE_RATE, IO_RATE) and F5 to add them to the "Active Columns"
  • save with F10
  • use < / > to select the I/O column to affect the sort order

glances

Command line tool with a web mode, not widely packaged but easy to install (ie: pip install glances).


netdata

Web interface, can be run without root privileges, not yet packaged (require compilation).

Solution 2

The only thing that comes close is iostat from the sysstat suite which also works for regular users, or maybe atop -d (fails with a floating pointing exception here).

A very similar question was asked on ServerFault: In absence of iotop, which command is most appropriate for finding I/O-bound processes?

iotop doesn't work for regular users any more due to a security fix in the kernel: see e.g. Red Hat bug report: Netlink error: Operation not permitted

For the same reason, you probably cannot display other processes' I/O stats on that level as regular user.

Share:
19,248

Related videos on Youtube

Picabo
Author by

Picabo

Updated on September 18, 2022

Comments

  • Picabo
    Picabo over 1 year

    I'm looking for an alternative to iotop. Here's my situation:

    1. I want to find out if a program is accessing the hard drive a lot while running.
    2. iotop requires root/sudo privileges.
    3. My account is on someone else's system so I'm not allowed to have root or sudo privileges.

    Is there an alternative to iotop I could use?

    • Pankaj Goyal
      Pankaj Goyal over 9 years
      You could use a combination of top, specifically watching for 'wait' states, and vmstat.
  • ilija139
    ilija139 about 7 years
    I have been using htop for so long and didn't know about this feature. Thanks!
  • oHo
    oHo almost 7 years
    There are also iptraf and iptraf-ng, nice ncurses consol tools. But these projects seem to be abandoned. :(
  • bufh
    bufh almost 7 years
    iptraf* does only monitor network I/O
  • Radio Controlled
    Radio Controlled about 5 years
    When I do as suggested for htop, it only displays "no permission" in the respective columns. Seems like I still need sudo rights for viewing this information.