I am trying to calculate the % network utilization for a server on my network for any snmp traffic, (in or out). I have followed the below steps, can someone point out if I have gone wrong in the process ?
Step 1: run tcpdump for one minute to capture all packets which have src or dst port as 161(snmp) and send it to a text file
Step 2: extract the length from the captured packets, example line below
11:09:59.602526 IP (tos 0x0, ttl 252, id 21267, offset 0, flags [none], proto UDP (17), **length 84**)
myremotedevice.snmp > mylocalserver.32802: { SNMPv1 C=public { GetResponse(37) R=<redected> E:redected=redected } }
Step 3: Add all the lengths from the file, lets say, total length= 4505407 Bytes
Step 4: Perform Y=(X * 8)/60 to get the bits per second.
Y = (4505407 * 8) / 60
Y = 600720.93
Step 5: I have a gigabit network, so to find the network util I perform the following: %util = (Y/1000000000) * 100
%util = (600720.93/1000000000) * 100
%util = 0.06%
Thus, I can conclude that the network utilization per second for SNMP traffic for my server is 0.06%
So, the question is, is the above calculation accurate ? Thanks!