Re: Network traffic per process



On Jun 2, 9:18 am, orium <oriu...@xxxxxxxxx> wrote:
Hi,

I am writing a simple process monitor, the only thing i am interested
that i couldn't obtain is the number of bytes read/written through the
network interface. Is there any file in the proc fs that can give me
that information,? Or some system call?

Thank you,

Diogo Sousa

I don't think the question is meaningful. For example, suppose two
processes share a file descriptor for a TCP connection. One goes to
write 10 bytes, but a packet is not send immediately due to Nagle.
Then the other writes 10 bytes, and a packet containing the 20 bytes
of data is sent. How do you account for this packet?

Suppose a packet containing 10 bytes is received on a network
connection shared by two processes. Both processes terminate without
reading the data. How do you account for this?

There doesn't seem to be any meaningful way to associate bytes sent
through a network interface with a process.

DS
.



Relevant Pages

  • Network problem with TCP packets
    ... Network Interface. ... I'm developing an application that sends packet at 5Hz over a TCP ... then the 256, and so on until there are no more free clusters, and the ... socket closes itself. ...
    (comp.os.vxworks)
  • Re: Help?
    ... for sake of keeping things simple the path from domain1 to domain2 ... - have someone start the packet sniffer for you ... network interfaces into "promiscuous mode" and parses the raw data ... where the network interface discards packets ...
    (comp.security.misc)
  • Re: Help?
    ... for sake of keeping things simple the path from domain1 to domain2 ... - have someone start the packet sniffer for you ... network interfaces into "promiscuous mode" and parses the raw data ... where the network interface discards packets ...
    (comp.security.misc)
  • Re: raw sockets and blocking
    ... >> I'm guessing the driver or network layer is ... >> back, however would it not be better to discard the packet, ... The output queue for a network interface was full. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)