Turn on suggestions
![]() Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
|
09-15-2011 02:47 AM
Hi Folks,
I am trying to collect RX/TX data for specific ports connected to our DCX SAN switch to draw a read/write performance within time using #Gnuplot#
I have some concerns/question if any one can advice or help so we can have a simple tool that will graph Read/Write performance along with time for specific ports (in my case ports are attached to storage controllers)
Question:
Using snmpwalk to collect all ports counters value as show below (along with time - Thanks awk) is showing the counter values in 4 byte word and I think it is a cumulative values and the values will reset to 0 when it will reach it limit!!
* How the heck can I convert the counter32 values to Mega Bytes per Second?
Note:
I have seen a lot of confusion so I need some advice. Please. Thanks.
swFCPortRxWords 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.12 Received Frames
# snmpwalk -v 1 -c public 10.8.233.160 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.12 | awk -v TIME="`date +'%H:%M:%S'`" '{print $1","TIME","$4}'
.....
.....
&
swFCPortTxWords 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11 Transmit Frames
# snmpwalk -v 1 -c public 10.8.233.160 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11 | awk -v TIME="`date +'%H:%M:%S'`" '{print $1","TIME","$4}'
SNMPv2-SMI::enterprises.1588.2.1.1.1.6.2.1.11.1,17:49:26,2559054466
SNMPv2-SMI::enterprises.1588.2.1.1.1.6.2.1.11.2,17:49:26,2156974207
SNMPv2-SMI::enterprises.1588.2.1.1.1.6.2.1.11.3,17:49:26,361283056
SNMPv2-SMI::enterprises.1588.2.1.1.1.6.2.1.11.4,17:49:26,1577155022
SNMPv2-SMI::enterprises.1588.2.1.1.1.6.2.1.11.5,17:49:26,1330678533
SNMPv2-SMI::enterprises.1588.2.1.1.1.6.2.1.11.6,17:49:26,1246356291
SNMPv2-SMI::enterprises.1588.2.1.1.1.6.2.1.11.7,17:49:26,1000345790
SNMPv2-SMI::enterprises.1588.2.1.1.1.6.2.1.11.8,17:49:26,3803798811
SNMPv2-SMI::enterprises.1588.2.1.1.1.6.2.1.11.9,17:49:26,53082249
09-15-2011 08:43 AM
Q: * How the heck can I convert the counter32 values to Mega Bytes per Second?
A:
Time your intervals between polling.
Calculate the delta (value.now - value.before) If value.now is less then value.before the counter rolled over.
With the delta and polling interval you can calculate the counter per second.
Now convert your counter to Mega Bytes and your done.
Depending on the OID used the calulations could be different.
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11 and .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.12 are indeed 4 bytes long
The max a Counter32 can hold is 4294967295 (in this case FC words)
1 MegaByte is 1024 KiloByte which is 1048576 bytes which would equal 262144 FC words.
a delta of 15728640 FC words (R and T) in one minute would be 1 MegaByte per second (average).
If you have a lot of traffic and an interval of 5 min, it could be possible for the counter to roll over more than once (a interval).
Such a situation cannot be detected (AFAIK) while measuring.
Keep interval small enough to keep the counter rolling over more then once but not to small which will flood your switch with SNMP request.
Otherwise switch to Counter64
Eventually i opted for Cacti and altered the templates to suit my needs. > http://forums.cacti.net/viewtopic.php?f=12&t=6346
OID .1.3.6.1.3.94.4.5.1.6 & .1.3.6.1.3.94.4.5.1.7 are RX/TX element counters ith the following description (octetstring 8)
The number of octets or bytes that have been transmitted
by this port. One second periodic polling of the port. This
value is saved and compared with the next polled value to
compute net throughput. Note, for Fibre Channel, ordered
sets are not included in the count.
09-15-2011 04:46 PM
dion.v.d.c wrote:
1 MegaByte is 1024 KiloByte which is 1048576 bytes which would equal 262144 FC words.
why you devide by 4 to get to 262144? Whe you said "FC words" did you mean FC frame?
09-15-2011 09:48 PM
Q > why you devide by 4 to get to 262144?
A > A FC word is 4 bytes long, Thus every counted FC word means 4 bytes are transmitted. To get to bytes (we are looking to get MB/s) you should divide the counter by 4.
Q > Whe you said "FC words" did you mean FC frame?
A > No I really meant Words. FC frames are inaccurate as the payload of a vrame can vary with a max of 2112 bytes.
Unless you know the payload size of every counted frame its a worthless counter to get/calculate throughput.
A word is 4 bytes long as defined in RFC's which makes it easier to run calculations. But being such a small value you may run risk as described in my other post