On 2/1/07, Mark Jayson Alvarez <[EMAIL PROTECTED]> wrote:
Hi,


My goal is to find out how much CPU a program consumes  when I execute it.
In the manual, it says I  can toggle from "raw cpu" mode to "weighted cpu".
However, I can't still understand the difference between the two and how it
has something to
do with my goal. Suppose my computer has a 1.6Ghz pentium 4 processor.
I want to know how much is already in use or what percent. I also want to
know how much it has increased
when I run a particular program so that I can decide if this I can install
this program without affecting other
existing critical programs.

this link should be helpful regarding the cpu utilization:
http://students.cs.unipi.gr/pub/docs/sysadmin-1992-1998/html/v07/i05/a7.htm

from the article:
"On AIX 4 systems, CPU% is computed by dividing the time the process
uses the CPU by the elapsed time of the process. For example, if a
process was started 60 minutes ago, and has so far used 60 seconds of
the CPU, then its CPU% is 1 2/3%. This is sometimes called the
"weighted CPU%"."

which i believe gives a rough idea of how a weighted cpu average is
calculated.  hopefully someone more familiar with bsd internals can
comment on how we arrive at this value.


The same goes with memory usage.. "Free doesn't
mean that that are all my
memory left that is useable right?
The "Description of Memory" section just says:
Active: number of pages active
Inactive: number of pages inactive

and so on and so forth without telling what the heck does it mean when a
page is inactive and just what does pages
means..

Buf, Free, Wired, Cache... don't know what are these either.. Perhaps I
should consult wiki or google for this.


yea that might be a good place to start.  these are fairly common
terms used when talking about the state of memory in operating
systems.  another excellent source is this book:
http://www.amazon.com/Design-Implementation-FreeBSD-Operating-System/dp/0201702452

it's an excellent reference for any OS in my opinion, but is obviously
very pertinent to FreeBSD.

this URL may also be a decent place to start:
http://en.wikipedia.org/wiki/Memory_management

HTH
-pete

--
~~o0OO0o~~
Pete Wright
www.nycbug.org
NYC's *BSD User Group
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to