вторник, 25 апреля 2017 г.

sflowtool compilation

Very very very simple:
cd /tmp
wget https://github.com/sflow/sflowtool/releases/download/v3.41/sflowtool-3.41.tar.gztar -xf sflowtool-3.41.tar.gz
cd sflowtool-3.41
./configure --prefix=/opt/sflowtool
make install
It's very useful toolkit for reading sFLOW dumps.

You could try to read sFLOW in pcap format:
/opt/sflowtool/bin/sflowtool -r sflow.pcap
Or you cal start it and it will listen on sFLOW port:
/opt/sflowtool/bin/sflowtool
Here you could find example of output:
startDatagram =================================
datagramSourceIP 127.0.0.1
datagramSize 696
unixSecondsUTC 1435146070
datagramVersion 5
agentSubId 100000
agent 192.168.122.162
packetSequenceNo 3175
sysUpTime 786000
samplesInPacket 1
startSample ----------------------
sampleType_tag 0:2
sampleType COUNTERSSAMPLE
sampleSequenceNo 27
sourceId 2:1
counterBlock_tag 0:2001
counterBlock_tag 0:2010
udpInDatagrams 5430
udpNoPorts 24321676
udpInErrors 0
udpOutDatagrams 8154
udpRcvbufErrors 0
udpSndbufErrors 0
udpInCsumErrors 0
counterBlock_tag 0:2009
tcpRtoAlgorithm 1
tcpRtoMin 200
tcpRtoMax 120000
tcpMaxConn 4294967295
tcpActiveOpens 119
tcpPassiveOpens 11
tcpAttemptFails 0
tcpEstabResets 10
tcpCurrEstab 2
tcpInSegs 225262
tcpOutSegs 263644
tcpRetransSegs 10
tcpInErrs 0
tcpOutRsts 1668
tcpInCsumErrors 0
counterBlock_tag 0:2008
icmpInMsgs 2694
icmpInErrors 0
icmpInDestUnreachs 0
icmpInTimeExcds 2690
icmpInParamProbs 0
icmpInSrcQuenchs 0
icmpInRedirects 0
icmpInEchos 0
icmpInEchoReps 4
icmpInTimestamps 0
icmpInAddrMasks 0
icmpInAddrMaskReps 0
icmpOutMsgs 0
icmpOutErrors 0
icmpOutDestUnreachs 12148804
icmpOutTimeExcds 247174
icmpOutParamProbs 12148797
icmpOutSrcQuenchs 0
icmpOutRedirects 0
icmpOutEchos 0
icmpOutEchoReps 0
icmpOutTimestamps 3
icmpOutTimestampReps 4
icmpOutAddrMasks 0
icmpOutAddrMaskReps 0
counterBlock_tag 0:2007
ipForwarding 2
ipDefaultTTL 64
ipInReceives 25451365
ipInHdrErrors 0
ipInAddrErrors 2
ipForwDatagrams 0
ipInUnknownProtos 0
ipInDiscards 0
ipInDelivers 24555065
ipOutRequests 12420612
ipOutDiscards 412852
ipOutNoRoutes 0
ipReasmTimeout 0
ipReasmReqds 0
ipReasmOKs 0
ipReasmFails 0
ipFragOKs 0
ipFragFails 0
ipFragCreates 0
counterBlock_tag 0:2005
disk_total 20091629568
disk_free 75268096
disk_partition_max_used 99.62
disk_reads 49609
disk_bytes_read 2410784768
disk_read_time 64008
disk_writes 71505
disk_bytes_written 2536456192
disk_write_time 1195352
counterBlock_tag 0:2004
mem_total 14447202304
mem_free 12821819392
mem_shared 0
mem_buffers 104521728
mem_cached 1174110208
swap_total 922742784
swap_free 922742784
page_in 1177603
page_out 1238504
swap_in 0
swap_out 0
counterBlock_tag 0:2003
cpu_load_one 0.130
cpu_load_five 0.350
cpu_load_fifteen 0.430
cpu_proc_run 0
cpu_proc_total 125
cpu_num 8
cpu_speed 3600
cpu_uptime 269214
cpu_user 923700
cpu_nice 0
cpu_system 308060
cpu_idle 2150608980
cpu_wio 307440
cpuintr 290
cpu_sintr 518020
cpuinterrupts 27964221
cpu_contexts 43373068
cpu_steal 15120
cpu_guest 0
cpu_guest_nice 0
counterBlock_tag 0:2006
nio_bytes_in 446691530
nio_pkts_in 7430121
nio_errs_in 0
nio_drops_in 0
nio_bytes_out 476011841
nio_pkts_out 6730531
nio_errs_out 0
nio_drops_out 0
counterBlock_tag 0:2000
hostname debian
UUID 5b-5a-d7-11-9e-5b-7c-48-bf-5b-cb-41-78-cd-a0-2b
machine_type 3
os_name 2
os_release 3.16.0-4-amd64
endSample   ----------------------
endDatagram   =================================
startDatagram =================================
datagramSourceIP 127.0.0.1
datagramSize 160
unixSecondsUTC 1435146073
datagramVersion 5
agentSubId 100000
agent 192.168.122.162
packetSequenceNo 3176
sysUpTime 789000
samplesInPacket 1
startSample ----------------------
sampleType_tag 0:2
sampleType COUNTERSSAMPLE
sampleSequenceNo 27
sourceId 0:14
counterBlock_tag 0:1005
ifName eth5
counterBlock_tag 0:1
ifIndex 14
networkType 6
ifSpeed 10000000000
ifDirection 1
ifStatus 3
ifInOctets 445441800
ifInUcastPkts 7424030
ifInMulticastPkts 4294967295
ifInBroadcastPkts 4294967295
ifInDiscards 0
ifInErrors 0
ifInUnknownProtos 4294967295
ifOutOctets 126
ifOutUcastPkts 3
ifOutMulticastPkts 4294967295
ifOutBroadcastPkts 4294967295
ifOutDiscards 0
ifOutErrors 0
ifPromiscuousMode 0
endSample   ----------------------
endDatagram   =================================

Комментариев нет :

Отправить комментарий