From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 10 11:28:22 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 B0BDF16A41F for ; Tue, 10 Jan 2006 11:28:22 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30001.mail.mud.yahoo.com (web30001.mail.mud.yahoo.com [68.142.200.64]) by mx1.FreeBSD.org (Postfix) with SMTP id 2B80A43D46 for ; Tue, 10 Jan 2006 11:28:22 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 75290 invoked by uid 60001); 10 Jan 2006 11:28:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bedoGCpHg0GyTQrUoF5wtoFsfhVmH57hhjbqqAYGVYcmxmkY2n6jq27UWPAA+UpOIZcwTkuYqEvkA1Myf/WxLH/FT/92wUfs4ejp+SyvXPBxkO3eP674IkmVPGWDnMqWznkHTTK+qtIVIzm97uT6dE4CecNX4RgoUOFCcEaM4I4= ; Message-ID: <20060110112821.75288.qmail@web30001.mail.mud.yahoo.com> Received: from [202.161.131.69] by web30001.mail.mud.yahoo.com via HTTP; Tue, 10 Jan 2006 03:28:21 PST Date: Tue, 10 Jan 2006 03:28:21 -0800 (PST) From: kamal kc To: freebsd In-Reply-To: <20060110090955.GF60380@cirb503493.alcatel.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: 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 11:28:22 -0000 --- Peter Jeremy wrote: > On Mon, 2006-Jan-09 23:59:10 -0800, kamal kc wrote: > >thanks i tried getloadavg() it worked. > > > >but when i tried to put it in the kernel the kernel > > failed to link. > > You didn't mention the kernel bit before. To access > the load average in the kernel, you just access > "averunnable" (see ). Note that you > cannot do floating point arithmetic in the kernel so > the load averages are stored as fixed point numbers. > thanks , it worked !!!! i used the ldavg[] and fscale of averunnable to get the system load. you people are great .. kamal __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com