
rick.jones2 at hp
May 9, 2011, 3:36 PM
Post #12 of 30
(1623 views)
Permalink
|
|
Re: Newby having trouble with first ntop setup
[In reply to]
|
|
On Mon, 2011-05-09 at 15:20 -0700, Paul A. Spagnola wrote: > Ok, I got that to work. I now have some valid sflow data saved in a dump > file. How do I interpret this data without using ntop so that I can > confirm that the correct data is being sent to the ntop server, but ntop > is not displaying it. Run it through sflowtool to decode the PDU's for you, look at the timestamps and the counter values. Subtract and divide as appropriate. Presumably, from output like this: startDatagram ================================= datagramSourceIP 192.168.1.7 datagramSize 204 unixSecondsUTC 1304980053 datagramVersion 5 agentSubId 0 agent 192.168.1.7 packetSequenceNo 146213 sysUpTime 950062840 samplesInPacket 1 startSample ---------------------- sampleType_tag 0:2 sampleType COUNTERSSAMPLE sampleSequenceNo 144103 sourceId 0:45 counterBlock_tag 0:1 ifIndex 45 networkType 6 ifSpeed 1000000000 ifDirection 1 ifStatus 3 ifInOctets 7618363344 ifInUcastPkts 113930197 ifInMulticastPkts 31625 ifInBroadcastPkts 43 ifInDiscards 0 ifInErrors 0 ifInUnknownProtos 0 ifOutOctets 44555271400203 ifOutUcastPkts 3873510231 ifOutMulticastPkts 21938874 ifOutBroadcastPkts 346677994 ifOutDiscards 0 ifOutErrors 0 ifPromiscuousMode 0 counterBlock_tag 0:2 dot3StatsAlignmentErrors 0 dot3StatsFCSErrors 0 dot3StatsSingleCollisionFrames 0 dot3StatsMultipleCollisionFrames 0 dot3StatsSQETestErrors 0 dot3StatsDeferredTransmissions 0 dot3StatsLateCollisions 0 dot3StatsExcessiveCollisions 0 dot3StatsInternalMacTransmitErrors 0 dot3StatsCarrierSenseErrors 0 dot3StatsFrameTooLongs 0 dot3StatsInternalMacReceiveErrors 0 dot3StatsSymbolErrors 0 endSample ---------------------- endDatagram ================================= You will match-up the agent, agentSubId and ifIndex from a series of samples (if you "know" that you are getting samples from only one ifIndex and only one agent/agentSubid the matching should be easy :), and will compute the time intervals between two samples by using either unixSecondsUTC (time as measured on the "collector") or sysUpTime (*milliseconds* of time since the switch/agent booted, measured by the switch/agent). You will then divide that into octets (bytes) sent or received on the interface over that same interval, using ifInOctets or ifOutOctets from those same samples. That will give you octets per second (or millisecond). You then multiply by 8 to get bits per second (or millisecond). If you have units per millisecond and you want units per second, multiply by 1000. rick jones > > -Paul > > -----Original Message----- > From: ntop-bounces [at] listgateway > [mailto:ntop-bounces [at] listgateway] On Behalf Of Rick Jones > Sent: Monday, May 09, 2011 2:20 PM > To: ntop users > Subject: Re: [Ntop] Newby having trouble with first ntop setup > > On Mon, 2011-05-09 at 14:13 -0700, Paul A. Spagnola wrote: > > I tried: tcpdump -w dump.out udp port 6343 and then read in like this: > > sflowtool -r dump.out > > > > I got an error about incomplete packets. snaplen not large enough. > > Increase the snaplen, many tcpdump versions default to a mere 96 bytes, > and you want the whole datagram. The manpage for tcpdump will describe > it as the -s option. > > rick > > > > > -Paul > > > > -----Original Message----- > > From: ntop-bounces [at] listgateway > > [mailto:ntop-bounces [at] listgateway] On Behalf Of Rick Jones > > Sent: Monday, May 09, 2011 1:44 PM > > To: ntop [at] unipi > > Subject: Re: [Ntop] Newby having trouble with first ntop setup > > > > On Mon, 2011-05-09 at 11:26 -0700, Paul A. Spagnola wrote: > > > Ntop is receiving that data not cacti. > > > > > > The interface being monitored is a firewall interface. 1GB speed, > > > actual traffic throughput fluctuates from 200 kbps to 400 mbps. > > > > > > I am capturing samples every 60 seconds. How would I got about > > > manual math on two samples? > > > > If ntop is running with the sflow plugin enabled, then via tcpdump > > (don't forget to capture whole packets, so a nice big snaplen) feed to > > > sflowtool (or just tcpdump if you have the top-of-trunk tcpdump). > > > > Or if the plugin is not running, just via sflowtool. > > > > Match-up the agent and index, and follow your nose through the output. > > > > rick jones > > > > > > > > > > > Paul Spagnola > > > Desktop Support Manager > > > IT Dept. Douglas County, Oregon > > > Phone (Desk): (541) 957-4856 > > > Phone (Office): (541) 440-4330 > > > Fax: (541) 440-6129 > > > Email: paspagno [at] co > > > > > > > > > > > > > > > -----Original Message----- > > > From: ntop-bounces [at] listgateway > > > [mailto:ntop-bounces [at] listgateway] On Behalf Of Rick Jones > > > Sent: Monday, May 09, 2011 10:45 AM > > > To: ntop [at] unipi > > > Subject: Re: [Ntop] Newby having trouble with first ntop setup > > > > > > On Mon, 2011-05-09 at 10:29 -0700, Paul A. Spagnola wrote: > > > > I used the sflowtool to confirm sflow data is getting to the > server. > > > > Here is a sample. However, the ntop plugin shows very little data > > > > for this host. It should show mbps and I only see kbps. > > > > > > > > startDatagram ================================= datagramSourceIP > > > > 199.xx.xx.xx datagramSize 144 unixSecondsUTC 1304961484 > > > > datagramVersion 5 agentSubId 0 agent 199.195.30.2 > > > > > > As useless as security through obscurity is asserted to be, it is > > > even > > > > > less useful if it is incomplete :) > > > > > > > packetSequenceNo 13471 > > > > sysUpTime 345440000 > > > > samplesInPacket 1 > > > > startSample ---------------------- sampleType_tag 0:2 sampleType > > > > COUNTERSSAMPLE sampleSequenceNo 5756 sourceId 0:33 > > > > counterBlock_tag 0:1 ifIndex 33 networkType 6 ifSpeed 328674108107 > > > > > > What sort of interface is this again? that is a somewhat odd > > > looking value of ifSpeed. > > > > > > > > > Out of mostly idle curiousity, how frequently are the counter > > > samples being sent? It might be good to capture a few of them and > > > do some math by hand to validate the samples. > > > > > > > ifDirection 662766254 > > > > ifStatus 3 > > > > ifInOctets 5422793630 > > > > ifInUcastPkts 30358132 > > > > ifInMulticastPkts 0 > > > > ifInBroadcastPkts 0 > > > > ifInDiscards 0 > > > > ifInErrors 0 > > > > ifInUnknownProtos 0 > > > > ifOutOctets 26183045703 > > > > ifOutUcastPkts 38620125 > > > > ifOutMulticastPkts 0 > > > > ifOutBroadcastPkts 0 > > > > ifOutDiscards 0 > > > > ifOutErrors 0 > > > > ifPromiscuousMode 0 > > > > endSample ---------------------- > > > > endDatagram ================================= > > > > > > > > -----Original Message----- > > > > From: ntop-bounces [at] listgateway > > > > [mailto:ntop-bounces [at] listgateway] On Behalf Of Alex > > > > DEKKER > > > > Sent: Saturday, May 07, 2011 2:51 AM > > > > To: ntop [at] unipi > > > > Subject: Re: [Ntop] Newby having trouble with first ntop setup > > > > > > > > On Saturday 07 May 2011 00:45:56 Paul A. Spagnola wrote: > > > > > I have never used ntop before. Where is a good place to start? > > > > > > > > The easiest place to start is with packet capture on an interface, > > > > > which is what Ntop defaults to. > > > > > > > > > Here is my issue: > > > > > > > > > > I have a Fortigate 200B sending sFlow data to my CentOS (running > > > > > cacti) server. On this server I have ntop running and the sflow > > > > > plugin > > > > enabled. > > > > > I do not think the sflow data is showing in ntop. What should I > > try? > > > > > > > > Switch to the virtual NIC that the sFlow data should be reporting > > on. > > > > If you don't see any data, check the sFlow stats, if that shows > > > > nothing, use tcpdump to see if any sFlow packets are arriving at > > > > your > > > Ntop box. > > > > > > > > > I can view the ntop webpage. The ntop page does show numerous > > > > > hosts on > > > > > > > > > my network. I do not believe that data is accurate, because > > > > > nothing is > > > > > > > > > configured to send data to ntop or sflow. > > > > > > > > IME Ntop captures by default on the first ethernet interface. This > > > > > will be what you're seeing on the web interface. > > > > > > > > alexd > > > > > > > > _______________________________________________ > > > > Ntop mailing list > > > > Ntop [at] listgateway > > > > http://listgateway.unipi.it/mailman/listinfo/ntop > > > > _______________________________________________ > > > > Ntop mailing list > > > > Ntop [at] listgateway > > > > http://listgateway.unipi.it/mailman/listinfo/ntop > > > > > > > > > _______________________________________________ > > > Ntop mailing list > > > Ntop [at] listgateway > > > http://listgateway.unipi.it/mailman/listinfo/ntop > > > _______________________________________________ > > > Ntop mailing list > > > Ntop [at] listgateway > > > http://listgateway.unipi.it/mailman/listinfo/ntop > > > > > > _______________________________________________ > > Ntop mailing list > > Ntop [at] listgateway > > http://listgateway.unipi.it/mailman/listinfo/ntop > > > _______________________________________________ > Ntop mailing list > Ntop [at] listgateway > http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list Ntop [at] listgateway http://listgateway.unipi.it/mailman/listinfo/ntop
|