This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: System call which gets CPU utilized capacity


"Cliff Hones" <cliff@aonix.co.uk> wrote in message 007f01c37833$a42773a0$12760251@ximenes">news:007f01c37833$a42773a0$12760251@ximenes...
> Alex Vinokur wrote
> > "Igor Pechtchanski" <pechtcha@cs.nyu.edu> wrote in message
> Pine.GSO.4.56.0309100918590.5235@slinky.cs.nyu.edu">news:Pine.GSO.4.56.0309100918590.5235@slinky.cs.nyu.edu...
> > > On Wed, 10 Sep 2003, Alex Vinokur wrote:
> > >
> > > > Is there in CYGWIN any system call which gets CPU utilized capacity at
> > > > the present moment?
> > >
> > [snip]
> > > I assume the call is the same as in any other Unix system, since "top"
> > > worked for me with almost no porting about a year ago.  You might want
> to
> > > take a look at the sources for the "procps" package.
> > > Igor
> > [snip]
> >
> > But "top" and "ps" are the UNIX (CYGWIN) command line utilities.
> > We can't use them in C-program unless with system().
> >  I mean platform-specific system call (as the popen() system call) which
> > can be directly used in C-program.
>
> Igor is saying that since 'top' can find the CPU capacity, you just need to
> look at the source of top (in procps) to find out how to do it.
>
> -- Cliff
>
>

Thanks.

http://www.cygwin.com/packages/procps/procps-010801-1-src
contains _list_ of procps' sources (including top.c and top.h) :
Sun Jan 14 10:40:14 2001          45360 procps-010801/top.c
Sun Jan 14 10:41:29 2001           7242 procps-010801/top.h

Where can one get the sources themselves ?
http://www.cygwin.com/packages/procps/procps-010801/top.c
and
http://www.cygwin.com/packages/procps/procps-010801/top.h
don't exist.

   =====================================
   Alex Vinokur
     mailto:alexvn@connect.to
     http://mathforum.org/library/view/10978.html
   =====================================






--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]