Forum Discussion
Alok_3817
Nimbostratus
May 10, 2010Unit for the Stats pulled by using i Control
Hi,
I am pulling the Global Stats using iControl for 9.4
I get the low and hight values and I create the 64 bit values.... but i am confused as what is the Unit of measurement
Like STATISTIC_CLIENT_SIDE_BYTES_IN / STATISTIC_CLIENT_SIDE_BYTES_OUT
Thats showing 9.5 G Bytes ... now is it per minute, per second, what ... cause it cannot be per second... i am pulling this off a 1500 with 1 Gb/s link in 1 ARM mode.... Is there a way to find out ?
On an more un related note, is there a way to get absolute values from the graph data which is stored and can be pulled off the box... using iControl, the data i pull has some thing like 3.76767687e10
- Alok, the stats returned in iControl are the counter values. In general, we don't retain rate based statistics but rely on the calling application to take the counters and convert them based on the polling interval. Take (stat2-stat1)/(seconds between polls) to get the rate/sec value.
- Alok_3817
Nimbostratus
I understand ... will try and incorporate that, also, I used the iControl Script in perl for the TMM CPU usage The script is below
I have played around with the sleep values, but I am getting the output some times as 3 - 4 % (which is correct), but many a time the value is greater than 100%, some times even 300% , which is unbelievable ... is there some thing wrong I am doing ?$Stats = SOAP::Lite -> uri('urn:iControl:System/Statistics') -> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi"); $soapresponse = $Stats->get_all_tmm_statistics(); $TMMStatistics = $soapresponse->result; @TMMStatisticEntry = @{$TMMStatistics->{"statistics"}}; for $i (0 .. scalar(@TMMStatisticEntry)-1) { $tmm = @TMMStatisticEntry[$i]; @tmm_id[$i] = $tmm->{"tmm_id"}; @StatisticArray = @{$tmm->{"statistics"}}; foreach $stat (@StatisticArray) { $type = $stat->{"type"}; if ($type eq "STATISTIC_MEMORY_USED_BYTES") { $value = $stat->{"value"}; $low = $value->{"low"}; $high = $value->{"high"}; @usedmem[$i] = ($high<<32)|$low; } elsif ($type eq "STATISTIC_MEMORY_TOTAL_BYTES") { $value = $stat->{"value"}; $low = $value->{"low"}; $high = $value->{"high"}; @totmem[$i] = ($high<<32)|$low; } elsif ($type eq "STATISTIC_TM_TOTAL_CYCLES") { $value = $stat->{"value"}; $low = $value->{"low"}; $high = $value->{"high"}; @totalcycle_min[$i] = ($high<<32)|$low; } elsif ($type eq "STATISTIC_TM_IDLE_CYCLES") { $value = $stat->{"value"}; $low = $value->{"low"}; $high = $value->{"high"}; @idlecycle_min[$i] = ($high<<32)|$low; } elsif ($type eq "STATISTIC_TM_SLEEP_CYCLES") { $value = $stat->{"value"}; $low = $value->{"low"}; $high = $value->{"high"}; @sleepcycle_min[$i] = ($high<<32)|$low; } } } sleep 10; $soapresponse = $Stats->get_all_tmm_statistics(); $TMMStatistics = $soapresponse->result; @TMMStatisticEntry = @{$TMMStatistics->{"statistics"}}; for $i (0 .. scalar(@TMMStatisticEntry)-1) { $tmm = @TMMStatisticEntry[$i]; $tmm_id = $tmm->{"tmm_id"}; @StatisticArray = @{$tmm->{"statistics"}}; foreach $stat (@StatisticArray) { $type = $stat->{"type"}; if ($type eq "STATISTIC_TM_TOTAL_CYCLES") { $value = $stat->{"value"}; $low = $value->{"low"}; $high = $value->{"high"}; @totalcycle_max[$i] = ($high<<32)|$low; } elsif ($type eq "STATISTIC_TM_IDLE_CYCLES") { $value = $stat->{"value"}; $low = $value->{"low"}; $high = $value->{"high"}; @idlecycle_max[$i] = ($high<<32)|$low; } elsif ($type eq "STATISTIC_TM_SLEEP_CYCLES") { $value = $stat->{"value"}; $low = $value->{"low"}; $high = $value->{"high"}; @sleepcycle_max[$i] = ($high<<32)|$low; } } } for $i (0 .. scalar(@TMMStatisticEntry)-1) { print "\nTMM ID\t\t\t: @tmm_id[$i]"; print "\nUsed Memory\t\t: @usedmem[$i]"; print "\nTotal Memory\t\t: @totmem[$i]"; $deltaidle=("@idlecycle_max[$i]"-"@idlecycle_min[$i]"); $deltatotal=("@totalcycle_max[$i]"-"@totalcycle_min[$i]"); $deltasleep=("@sleepcycle_max[$i]"-"@sleepcycle_min[$i]"); print "\n\n*** $deltaidle \t $deltatotal \t $deltasleep ***\n"; $CPUPercent=((("$deltatotal"-("$deltaidle"+"$deltasleep"))/("$deltatotal"))*100); print "\nPercentage CPU\t\t: $CPUPercent %"; }
- Hamish
Cirrocumulus
Yes, your conversion from hi/low 32bit values to 64bit values isn't correct. Use - Alok_3817
Nimbostratus
Thanks, I will try it and let you guys know... - Hamish
Cirrocumulus
Posted By Hamish on 05/13/2010 02:19 PM!/usr/local/bin/perl -W my $OrigValue=1; for($i=0; $i<48; $i++) { my $finalValue=($OrigValue<<$i); print "$OrigValue << $i ==> $finalValue\n"; }
bash-3.00 ./shift_check 1 << 0 ==> 1 1 << 1 ==> 2 1 << 2 ==> 4 ..[deleted].. 1 << 29 ==> 536870912 1 << 30 ==> 1073741824 1 << 31 ==> 2147483648 1 << 32 ==> 1 1 << 33 ==> 2 1 << 34 ==> 4 1 << 35 ==> 8 1 << 36 ==> 16 1 << 37 ==> 32
bash-3.00 ./shift_check 1 << 0 ==> 1 1 << 1 ==> 2 1 << 2 ==> 4 ..[deleted].. 1 << 29 ==> 536870912 1 << 30 ==> 1073741824 1 << 31 ==> 2147483648 1 << 32 ==> 4294967296 1 << 33 ==> 8589934592 1 << 34 ==> 17179869184 1 << 35 ==> 34359738368 1 << 36 ==> 68719476736 1 << 37 ==> 137438953472
bash-3.00 /usr/bin/perl -V|grep "Compile-time options:" Compile-time options: USE_64_BIT_INT USE_LARGE_FILES bash-3.00 /usr/local/bin/perl -V|grep "Compile-time options:" Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO bash-3.00
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects