sflow / host-sflow

host-sflow agent
http://sflow.net
Other
146 stars 55 forks source link

hsflowd is listening to a RANDOM UDP after every restart #34

Open nidotech opened 4 years ago

nidotech commented 4 years ago

udp 0 0 0.0.0.0:11074 0.0.0.0:* 22032/hsflowd

What is this for? And how can I disable this?

It appears for most distributions debian9, centos7, ubuntu18.

sflow commented 4 years ago

Isn't that just the UDP socket for sending sFlow datagrams to the collector? It writes to the socket here:

https://github.com/sflow/host-sflow/blob/master/src/Linux/hsflowd.c#L60

but never reads from it. Is there another step that should be followed?

FYI, if you add "json {}" to the hsflowd.conf it will open another UDP socket and listen for local metric data and local transaction samples (see mod_json.c). And the mod_opx module for Openswitch uses a UDP socket to receive packet-samples from hardware. But if you don't include those modules then none of that happens.