it is blind to all non-TCP traffic (see issues/62.it requires a costly copy from kernel space to user space for every single packet.This approach comes with two disadvantages: Nethogs works by parsing /proc/net/tcp and /proc/net/tcp6 to get a mapping from connected TCP endpoints to inodes, capturing all traffic using libpcap, parsing each packet, and finding which process owns the TCP connection of each packet. Differently from the previous tools, nethogs does report per-process bandwidth usage, but it suffers from other flaws. Not only this is very laborious and fragile, but it also risks missing spikes of traffic on very short-lived sockets.Ī tool that gets mentioned a lot is nethogs. Most of the recommended tools – like iftop, nload, bmon, and iptraf – miss the mark by quite a bit: they mostly report per-interface or per-socket traffic, leaving to the user the tedious exercise of mapping sockets to processes via perilous parsing of /proc/net/tcp, or grep-ping and awk-ing of the output of ss or netstat. Searching for “per process network usage linux” is disappointing. Further reading Existing tools to measure bandwidth usage on Linux.Existing tools to measure bandwidth usage on Linux.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |