From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 11:22:34 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3550116A46B for ; Tue, 29 May 2007 11:22:34 +0000 (UTC) (envelope-from suresh.kumar.j@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by mx1.freebsd.org (Postfix) with ESMTP id EAFB113C487 for ; Tue, 29 May 2007 11:22:33 +0000 (UTC) (envelope-from suresh.kumar.j@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so571343anc for ; Tue, 29 May 2007 04:22:33 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Se7y0Wu3WX7Gf92sDFy18d76uu6ojQo4UWzrbQaMKYCzqPKenQcWdfCcqdRU1KWZV/Pypm4ZMNmKiahwvXMAs7dqhmwBfMj/QvOBo7QrHT/kmeUcIbCuBzgHFuOL7lrjrkS+K7XYkrLCrhvyGX9MvsPOrn0SUtwRk4Wq5cbyxFQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=kulBWuZXYTFg6aNsKljndF76CkwsFG1ikSKdVM4q/FXSJYR7GIlCd+elLUZkjaIJgGpOS9DPRTnW7mE8/SpTs68QMoQN2TjCMAEIEjNqqDHfU6EUrimZrS6VBryEIiraesie8bRSZQiLOhqW5VKL47m1kh4J1aSz2trB1MZYqCQ= Received: by 10.114.145.1 with SMTP id s1mr3343415wad.1180436068006; Tue, 29 May 2007 03:54:28 -0700 (PDT) Received: by 10.115.46.11 with HTTP; Tue, 29 May 2007 03:54:27 -0700 (PDT) Message-ID: <88b2f6dd0705290354l261e5995ta2af8cc2157d0f89@mail.gmail.com> Date: Tue, 29 May 2007 16:24:27 +0530 From: "Suresh Kumar J" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Using get_system_info() - Obtaining the CPU states... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2007 11:22:34 -0000 Hi there, I have an application running on FreeBSD which needs to display the CPU states as like the "top" command shows in the 3rd line as below: --------------------------------------------------------- CPU states: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle --------------------------------------------------------- I learnt that the "top" command uses the get_system_info() function for printing the CPU state detail. But I could not locate the source code of this function. Could anybody help me in locating the header/source file in which the get_system_info() function is located?. Any other ideas are also welcome. Note: I do not want to display the CPU load average... -- Thanks, Suresh Kumar J