delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/11/11:37:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: "Alex Vinokur" <alexvn AT connect DOT to>
Subject: Re: System call which gets CPU utilized capacity
Date: Thu, 11 Sep 2003 18:37:14 +0300
Lines: 52
Message-ID: <bjq4rm$5b2$1@sea.gmane.org>
References: <bjmn9c$2f3$1 AT sea DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 56 DOT 0309100918590 DOT 5235 AT slinky DOT cs DOT nyu DOT edu> <bjorb9$s4m$1 AT sea DOT gmane DOT org> <007f01c37833$a42773a0$12760251 AT ximenes>
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

"Cliff Hones" <cliff AT aonix DOT co DOT uk> wrote in message news:007f01c37833$a42773a0$12760251 AT ximenes...
> Alex Vinokur wrote
> > "Igor Pechtchanski" <pechtcha AT cs DOT nyu DOT edu> wrote in message
> news:Pine DOT GSO DOT 4 DOT 56 DOT 0309100918590 DOT 5235 AT slinky DOT cs DOT nyu DOT 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 AT connect DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019