From owner-freebsd-hackers Mon Oct 6 02:00:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA15615 for hackers-outgoing; Mon, 6 Oct 1997 02:00:36 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from word.smith.net.au (word.smith.net.au [202.0.75.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA15545 for ; Mon, 6 Oct 1997 02:00:07 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id SAA01151; Mon, 6 Oct 1997 18:27:11 +0930 (CST) Message-Id: <199710060857.SAA01151@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Zoltan Sebestyen cc: Mike Smith , FreeBSD hackers mailinglist Subject: Re: cpu/memory monitoring In-reply-to: Your message of "Mon, 06 Oct 1997 10:20:04 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 06 Oct 1997 18:27:11 +0930 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Hmm, the reason I asked for a simpler source than top's one is that I'm > porting an application that behaves like Win NT's taskmanager. It was For those of us that don't know what NT's taskmanager actually looks like, can you perhaps elaborate as to what your actual requirements are? > is its source code. That's why I asked for a simpler code which deals > only with the cpu/memory load monitoring part.(Anyone has written a > sample code like this?) If all you want is the CPU load average, the function getloadavg() should be all that you need. FreeBSD doesn't have such a thing as "free" memory, as unused memory is occupied by the buffer cache. You can look at the source for 'systat' for how to extract that sort of information. mike