Monitor upload traffic

Hello, is there a package or CLI that can monitor uploads?

I'd like to see what my IOT devices are uploading to the internet (time, destination, bytes).

Thank you.

here is some tools to monitor traffic.

iptraf-ng can also help.

When I look at conntrack, is there a field where it can show downloaded vs uploaded traffic?

Yes, the SRC and DST IPs.

I think he means bytes.

1 Like

I was wanting to know if conntrack can show me which is upload vs download traffic :slight_smile: an easy to tell.

connectd -L shows lines like
tcp 6 7439 ESTABLISHED src= dst= sport=53190 dport=22 packets=43 bytes=5289 src= dst= sport=22 dport=53190 packets=32 bytes=3910 [ASSURED] mark=256 use=1
So you can see, how many bytes in which direction, for active connection.
Either you write a smart script to evaluate this output (either periodically or using conntrack events), OR, you become familar with "ulogd" , to do accouting for longer periods of time.


whats the cli command? just connectd -L? I tried that and it didnt work.

Sorry, my fault. Try 'conntrack -L' instead.

I guess the hard part is, idk how to tell what is upload vs download from conntrack. Any helpful tips?
I tried to upload a file to google drive and capture the output from conntrack, but it doesnt make sense, I see multiple connections uploading to google.

src/dst indicates direction. Of course, there might be multiple connections used simultaneously.

When I look at my sample data I can see source and destination and then destination and source in the same line, but with data, so I'm a little confused. There's no indicator in the line that says which way it's going.

That's the hard part for me right now. I'm kind of looking for an indicator so I can only pick on that.

Always from src to dst. Usually, connections are used in both ways ...


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.