Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Oct 1997 14:58:22 +0200 (MET DST)
From:      Zoltan Sebestyen <sebesty@cs.elte.hu>
To:        Mike Smith <mike@smith.net.au>
Cc:        FreeBSD hackers mailinglist <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: cpu/memory monitoring 
Message-ID:  <Pine.LNX.3.95.971006144140.12923A-100000@neumann.cs.elte.hu>
In-Reply-To: <199710060857.SAA01151@word.smith.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 6 Oct 1997, Mike Smith wrote:

> >  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?
> 
> 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
> 
 Hi,

 The application I'm porting was written on Linux and has nothing to do
with NT's taskmanager except for its look. It displays the "user", "nice"
"system" cpuload and it get their actual state from /proc/stat and DOESN'T
transform them to any 'dumb' form. On FreeBSD you can get these pieces of
information from the kernel memory the the kvm API(A couple of functions,
their names start with 'kvm_')  Top is an excellent example on how to
get them, but its source code is a bit complex, that's why I asked for
a program with simpler code. I dealt with getloadavg() for a while, but
it gives not that kind of information I wanted. 


--------------------------------------------------------------------------------
Sebestyen Zoltan			It all seems so stupid,
					it makes me want to give up.
szoli@caesar.elte.hu			But why should I give up,
					when it all seems so stupid?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.971006144140.12923A-100000>