#9019: add iotop utility -----------------------------------------------+--------------------------- Reporter: Prasad | Owner: nobody Type: enhancement | Status: new Priority: normal | Milestone: R1 Component: Applications/Command Line Tools | Version: Resolution: | R1/Development Blocked By: | Keywords: Has a Patch: 1 | Blocking: | Platform: All -----------------------------------------------+--------------------------- Comment (by Prasad): Replying to [comment:9 axeld]: > In any case, thanks for the patch! Thanks a lot for your comments. > > As pointed out already, there are a number of issues I'd like to point out: > * You must not enlarge the team_info structure -- this breaks binary compatibility. I'm afraid you'll have to find some other mechanism to pass on the data to userland. IMHO then, I will have to pass the complete io_accouting structure using the same mechanism as team_info. Would it be okay? > * As others pointed out already, the syscall read/write don't measure I/O at all. They just measure how many bytes are read/written to that interface. For example, an application writing lots of data to the Terminal doesn't need to do any I/O, but will give a high ranking in your application. Same for an application that reads from /dev/zero. The data doesn't really deliver any useful information as far as I can see. I see the point you and others are making, I will work on accounting for real numbers. However, I still think it is useful to keep the system call information, which could be useful for debugging. We might add yet another utility which can print this debugging information on the terminal. > * How do you measure 100% I/O load? 100% is all the accumulated IOs in specific time frame. > * In C++ there is no need to denote an empty argument list with 'void'. OK > * Please use C++ style comments instead of C style comments. I think, I referred to other C files like ps.c and top.c, I guess they are using the C style comment. I followed the code there for formating. > * In Team: io_acc is not a good name. Why not just use io_accounting again? You could also instead use a general stats structure. I will have a look. Thanks! > * The iotop application sports lots of small coding style violations, please consult https://www.haiku-os.org/development/coding-guidelines Yes, Thanks!!!!! > * In fill_team_info() you change, but this should not be part of the same change: > {{{ > - //info->uid = > - //info->gid = > + info->uid = team->effective_uid; > + info->gid = team->effective_gid; > }}} I had opened a BUG for this, however no one is looking into it (https://dev.haiku-os.org/ticket/8995) -- Ticket URL: <http://dev.haiku-os.org/ticket/9019#comment:11> Haiku <http://dev.haiku-os.org> Haiku - the operating system.