On Thursday 14 November 2002 00:15, you wrote:
> Howdy Martin,
>
> Any chance to give it a try yet?  Any problems?
> Any improvements?
>
> I'd like to see it get checked into the CVS if you
> don't see any major problems... it would probably
> provide more testers with suggestions.  We can always
> back it out if it causes problems.
>
> Please cc: the list if you think it is usable and
> better than what is presently in CVS for HPsUX.
>
> Thanks,
>
> jack
> [EMAIL PROTECTED]
>
Hi Jack,

 finally I found some time to look at your version of hpux.c Basically I like 
what I saw. More metrices and the code looks cleaner, at least it has a lot 
more error handling than my take.

 Some comments:

a) cpu_sys_func
----------------------

 The reason I combined all those funky CPU states under "sys" is that I found 
no other place to put them. Maybe we need some more CPU states in the 
standard sets of metrics. Interrupt and wait times come to my mind. At least 
on HP-UX, IRIX and possibly AIX these would make sense. I probably would 
still combine a few states. In short, I think my version makes sense :-)

b) proc_total_func
-----------------------

 We can throw away the stuff under "#ifdef MARTINSWAY". The total count from 
the loop in "proc_func" makes as much sense.

c) proc_run_func
----------------------

 Here I have the only disagreement with your code. You are simply returning 
the number of processes that are in the "R" state. Fair enough, but when you 
compare that to the run queue length the numbers seem to high. In my version 
I only counted processes that were:

- in state PS_RUN, AND
- not owned by the kernel, AND
- not owned by "init" while having a uid of 0

 I agree that look very magic, but the picture was much more like what we get 
from the Linux systems. In the minimum I would like to see a MARTINSWAY or 
SIMPLE define for it :-)

d) mem_cached_func
----------------------------

 Complete agreement that my algorithm needs cross checking. Without better 
knowledge, I just said:

 cache = physical-Mem - free_mem - reserved_mem

 I have to admit my ignorance of HP-UX memory managment here. I don't even 
know whether an equivalent of the cache/buffer of Linux exists. Any insider 
here? Moreover, now that you have computed the "shared" number, it probably 
needs to be subtracted from cache also.

All in all I think HP-UX will be in a pretty good shape in 2.5.2 :-) Let me 
add my code for proc_run_func again. I will then post it for review.

Cheers
Martin
-- 
----------------------------------
Martin Knoblauch
[EMAIL PROTECTED]
http://www.knobisoft.de

Reply via email to