![]() The owner of the process and also the PID is listed. The network interface for each process is listed. The network upload (sent) and download (received) speeds for each process is listed. That might not be the simplest approach, it's just what occurred to me off the top of my head. Top Linux Process Monitoring Linux Top command is a performance monitoring program that is used frequently by many system administrators to monitor Linux performance and it is available under many Linux/Unix-like operating systems. How to use nethogs to check network usage by process in Linux We can run command nethogs to start nethogs with root user. As for min and max, you can either eyeball that from the time-plot or use editcap to split the pcap files into chunks, run capinfos on each chunk, and calculate the min and max over all chunks. ![]() Wireshark can be used to generate a time-plot of the traffic with millisecond (or other) granularity via the menu "Statistics > IO Graph". The capinfos command will report the average throughput. ![]() You'll then have two pcap files, one for the whole network interface and one for just your process. That's one part that may or may not be simple, depending on whether you can identify your process from network traffic content, port(s), or by adding some sentinel dummy data. After capturing all packets on an interface, you can run tshark again on the pcap file to filter the file using Wireshark "Display filters" and extract just the packets for your process. We can easily use the utility in a command line for the purpose of throttling the downlink and uplink traffic on a particular network interface: wondershaper interface downlink uplink Let’s say we want to set the downlink limit to 2048 Kbits/sec and the uplink limit to 512 Kbits/sec. ![]() Wireshark is of course a GUI app, but the tshark command which comes with it is headless and can be used to capture packets to a file. Wireshark might work, depending on how far you're willing to relax the non-GUI requirement and whether locating your target processes is simple.
0 Comments
Leave a Reply. |