[haiku-bugs] Re: [Haiku] #9019: add iotop utility

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Mon, 24 Sep 2012 09:22:46 -0000

#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 axeld):

 In any case, thanks for the patch!

 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.
 * 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.
 * How do you measure 100% I/O load?
 * In C++ there is no need to denote an empty argument list with 'void'.
 * Please use C++ style comments instead of C style comments.
 * 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.
 * The iotop application sports lots of small coding style violations,
 please consult https://www.haiku-os.org/development/coding-guidelines
 * 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;
 }}}

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/9019#comment:9>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: