Print

Print


Hello Jean-Yves,

Jerome LAURET wrote:

>
>     Hello Jean-Yves,
>
> Jean-Yves Nief wrote:
> [...]
>
>>
>> Thanks for looking onto this code. I don't see the exact bug fix for 
>> the network results, could you point me to it.
>
>
>     Boy. A diff would show it although I am not sure
> I cna provide this for Pavel in the meantime. The main
> thing is that the calculation around $measure[] was just
> plain wrong, not retaining and rotating the value. There
> is a if ($DEBUG) around there ... Also, I remember that
> there was a pipe-like logic which would block for us
> and not give results on SL 3.0.2 ...

Jerome has already pointed out the problem but I would like to add more 
information.

if !defined(open(CMDFD, "netstat -c -i $monint |"));
I removed logic about pipe (line above) and getting the result each 
$monint by replacing while loop, which is sleeping $monint. Your logic 
caused to us some problems to get at least a result on SL 3.0.2. It was 
still waiting after the execution, sometimes it ran up after a long 
time, but it was very untrustworthy.

The second thing about getting right network result. You used the array 
@meassure during the counting $net_activity:

$net_activity = ($measure[1] - $measure[0]) * $mtu * 8 / $monint;

But this array wasn't initialize anywhere and therefore the result was 
still 0.

>
>> as for paging I/O, I gave it up as it is highly correlated with other 
>> metrics such as memory occupancy.
>> on top of that, retrieving the paging I/O is a bit tricky and I did 
>> not find any easy solution in the past for Solaris, plus it is hard 
>> to interpret (ie what is the max paging I/O activity one wants to 
>> accept). This is one other reason why I gave up with it :-).
>
>
>
>     The values themselves do not matter much. Correlated
> or not, the final formula is rather arbitrary (user's choice)
> and Andy made this flexiblke enough that you may or may not
> use it at the end.
>
>
>> in your modification, you are looking at the % of swap usage not the 
>> I/O rate. You are taking the information from /proc/meminfo which is 
>> working for Linux, but not for Solaris or Mac OS.
>
>
>     While I beleive we have a if -e /proc/meminfo
> ready to be epxanded for other OS as otherwise, pgio=0.
> So, an imoprovement to the initial script while not perfect.
> I hope you agree on the positive.
>
>> cheers,
>> JY
>
>
Cheers Pavel