Re: "busy" load counters

From: Albert Cahalan (albert_at_users.sf.net)
Date: 09/13/03

  • Next message: Pavel Machek: "Re: [ACPI] Re: [2.6.0-test5-mm1] Suspend to RAM problems"
    To: dada1 <dada1@cosmosbay.com>
    Date:	13 Sep 2003 11:39:46 -0400
    
    

    On Sat, 2003-09-13 at 04:36, dada1 wrote:
    > From: "Albert Cahalan" <albert@users.sourceforge.net>
    > > The feature is available, but you'll need to upgrade
    > > to procps-3.1.12 and linux-2.6.0-test4 at least.
    > >
    > > http://www.kernel.org/pub/linux/kernel/v2.6/
    > > http://procps.sf.net/
    > >
    >
    > With procps-3.1.12 and linux-2.6.0-test5, top and ps reports 0.00 time for
    > multi-threaded programs.
    >
    > It seems only the 'main' thread is now visible in /proc, and its cpu time
    > dont include the cpu time of other threads...

    This is correct. For now, the kernel does not report the
    existance of new-style threads. I intend to deal with this
    problem during the coming week.

    I could use a bit of help with research. If you have access
    to a non-Linux system, please let me know how the native ps
    and top programs handle threads. I do know that many non-Linux
    implementations will group threads together in ps output.

    Ways to display all threads include:

    ps -m (Tru64, AIX)
    ps m (Tru64, AIX)
    ps -T (IRIX)
    ps -L (Solaris, UnixWare)
    ps H (FreeBSD)
    ps k (OpenBSD)
    ps s (NetBSD)

    Examples:
    AIX: ps -eo pid,thcount,tid,comm
    Solaris: ps -eLf
    Tru64: ps -emO THREAD

    Please use procps-feedback@lists.sf.net for this data.
    Here's a program you can use for testing; you may need
    to compile it as "cc foo.c -lpthread".

    ////////////////////////////////////////////
    #include <unistd.h>
    #include <pthread.h>
    void *hanger(void *vp){
      (void)vp;
      for(;;) pause();
    }
    int main(int argc, char *argv[]){
      pthread_t thread;
      (void)argc;
      (void)argv;
      pthread_create(&thread, NULL, hanger, NULL);
      hanger(NULL);
      return 0; // keep gcc happy
    }
    /////////////////////////////////////////////

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Pavel Machek: "Re: [ACPI] Re: [2.6.0-test5-mm1] Suspend to RAM problems"

    Relevant Pages

    • Re: aix comparison
      ... > couldnt understand how AIX is better than Solaris (as per an AIX ... done with SMIT can also be done from the command-line. ... capabilities on the newer hardware (sort of like the Sun Fire domain ...
      (comp.unix.solaris)
    • Auditing Facilities on Solaris & AIX
      ... Auditing Facilities on AIX and Solaris ... Most commercial UNIX Operating Systems provides C2 Security Level Auditing. ... Ø Event selection ...
      (comp.unix.solaris)
    • Re: aix comparison
      ... >>couldnt understand how AIX is better than Solaris (as per an AIX ... > done with SMIT can also be done from the command-line. ... >>(may be it will but whats the advantage for sun other than adding one ...
      (comp.unix.solaris)
    • Re: Solaris vs AIX
      ... I wonder why it is running everywhere including AIX and mainframe. ... That's why Solaris give you more options. ... Especially these days and in a business environment, people cost more than the hardware. ... support for mixed processors. ...
      (comp.unix.solaris)
    • Re: 2 Questions
      ... as I am also an old Tru64 admin. ... AIX does not rebuild kernels like Tru64. ... Some times, its useful to rebuild the kernel, at Tru64 Unix I will ...
      (AIX-L)

    Loading