From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 03:14:54 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83F0416A41F for ; Tue, 10 Jan 2006 03:14:54 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30004.mail.mud.yahoo.com (web30004.mail.mud.yahoo.com [68.142.200.67]) by mx1.FreeBSD.org (Postfix) with SMTP id E991A43D45 for ; Tue, 10 Jan 2006 03:14:53 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 89252 invoked by uid 60001); 10 Jan 2006 03:14:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ROgpVrtlQ7QkJ/H/XHLIqpye5T8X4Qp3N+OT0Ke7FZfJ5a6CdRPjRHCK8yamAL0qBv3P6IhtInuYH0uEmPVZ56/106CY8IOVp5479+Gmm6LV7yie4as+fw2pyogTahpmdDaU5DF9DgHRdAV3oGo4yydglFPmR8Dc2wh/VTue+eM= ; Message-ID: <20060110031453.89250.qmail@web30004.mail.mud.yahoo.com> Received: from [202.79.60.148] by web30004.mail.mud.yahoo.com via HTTP; Mon, 09 Jan 2006 19:14:53 PST Date: Mon, 9 Jan 2006 19:14:53 -0800 (PST) From: kamal kc To: freebsd MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: using get_system_info() - obtaining system load averages 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, 10 Jan 2006 03:14:54 -0000 dear everybody, i want to use the routine get_system_info() to get the load averages of the cpu. i found it that top uses it. but i do not know which object files do i need to link it to my program. also the struct system_info is defined in the machine.h of the /usr/src/contrib/top. do i need to include it or is there another header defining it. actually i want to know the load averages when my program runs in the kernel mode. is there other methods of obtaining the sytem load averages ??? thanks, kamal __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com