Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <007f01c37833$a42773a0$12760251@ximenes> From: "Cliff Hones" To: References: Subject: Re: System call which gets CPU utilized capacity Date: Thu, 11 Sep 2003 08:09:28 +0100 Organization: Aonix Europe MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Alex Vinokur wrote > "Igor Pechtchanski" 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 -- 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/