How to monitor bandwidth usage per process?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







64















I am using Ubuntu 14.04. My internet connection is pretty slow (512 kbps). Sometimes I see that I have no software running which should download anything from the internet, but the system monitor still shows that some download is going on. So I think some hidden software are causing this. Is there a way I can monitor every software that is using internet?










share|improve this question

























  • @Braiam: That question is about monitoring total network data usage across system restarts.

    – David Foerster
    May 17 '17 at 13:21











  • @codeaviator: I think the answers on this question are better than on the one behind your link. We should either have the duplicate flag point the other way around or merge them altogether. I'm raising a flag for the latter.

    – David Foerster
    May 17 '17 at 13:22













  • @DavidFoerster Good point. I'm raising a moderator flag in favor of merging both questions.

    – codeaviator
    May 18 '17 at 4:49






  • 1





    distro agnostic: stackoverflow.com/questions/368002/…

    – Ciro Santilli 新疆改造中心996ICU六四事件
    Oct 29 '17 at 2:04




















64















I am using Ubuntu 14.04. My internet connection is pretty slow (512 kbps). Sometimes I see that I have no software running which should download anything from the internet, but the system monitor still shows that some download is going on. So I think some hidden software are causing this. Is there a way I can monitor every software that is using internet?










share|improve this question

























  • @Braiam: That question is about monitoring total network data usage across system restarts.

    – David Foerster
    May 17 '17 at 13:21











  • @codeaviator: I think the answers on this question are better than on the one behind your link. We should either have the duplicate flag point the other way around or merge them altogether. I'm raising a flag for the latter.

    – David Foerster
    May 17 '17 at 13:22













  • @DavidFoerster Good point. I'm raising a moderator flag in favor of merging both questions.

    – codeaviator
    May 18 '17 at 4:49






  • 1





    distro agnostic: stackoverflow.com/questions/368002/…

    – Ciro Santilli 新疆改造中心996ICU六四事件
    Oct 29 '17 at 2:04
















64












64








64


27






I am using Ubuntu 14.04. My internet connection is pretty slow (512 kbps). Sometimes I see that I have no software running which should download anything from the internet, but the system monitor still shows that some download is going on. So I think some hidden software are causing this. Is there a way I can monitor every software that is using internet?










share|improve this question
















I am using Ubuntu 14.04. My internet connection is pretty slow (512 kbps). Sometimes I see that I have no software running which should download anything from the internet, but the system monitor still shows that some download is going on. So I think some hidden software are causing this. Is there a way I can monitor every software that is using internet?







networking






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 26 '17 at 4:06









Ciro Santilli 新疆改造中心996ICU六四事件

10.6k45053




10.6k45053










asked Oct 5 '14 at 8:43









CluelessNoobCluelessNoob

93021522




93021522













  • @Braiam: That question is about monitoring total network data usage across system restarts.

    – David Foerster
    May 17 '17 at 13:21











  • @codeaviator: I think the answers on this question are better than on the one behind your link. We should either have the duplicate flag point the other way around or merge them altogether. I'm raising a flag for the latter.

    – David Foerster
    May 17 '17 at 13:22













  • @DavidFoerster Good point. I'm raising a moderator flag in favor of merging both questions.

    – codeaviator
    May 18 '17 at 4:49






  • 1





    distro agnostic: stackoverflow.com/questions/368002/…

    – Ciro Santilli 新疆改造中心996ICU六四事件
    Oct 29 '17 at 2:04





















  • @Braiam: That question is about monitoring total network data usage across system restarts.

    – David Foerster
    May 17 '17 at 13:21











  • @codeaviator: I think the answers on this question are better than on the one behind your link. We should either have the duplicate flag point the other way around or merge them altogether. I'm raising a flag for the latter.

    – David Foerster
    May 17 '17 at 13:22













  • @DavidFoerster Good point. I'm raising a moderator flag in favor of merging both questions.

    – codeaviator
    May 18 '17 at 4:49






  • 1





    distro agnostic: stackoverflow.com/questions/368002/…

    – Ciro Santilli 新疆改造中心996ICU六四事件
    Oct 29 '17 at 2:04



















@Braiam: That question is about monitoring total network data usage across system restarts.

– David Foerster
May 17 '17 at 13:21





@Braiam: That question is about monitoring total network data usage across system restarts.

– David Foerster
May 17 '17 at 13:21













@codeaviator: I think the answers on this question are better than on the one behind your link. We should either have the duplicate flag point the other way around or merge them altogether. I'm raising a flag for the latter.

– David Foerster
May 17 '17 at 13:22







@codeaviator: I think the answers on this question are better than on the one behind your link. We should either have the duplicate flag point the other way around or merge them altogether. I'm raising a flag for the latter.

– David Foerster
May 17 '17 at 13:22















@DavidFoerster Good point. I'm raising a moderator flag in favor of merging both questions.

– codeaviator
May 18 '17 at 4:49





@DavidFoerster Good point. I'm raising a moderator flag in favor of merging both questions.

– codeaviator
May 18 '17 at 4:49




1




1





distro agnostic: stackoverflow.com/questions/368002/…

– Ciro Santilli 新疆改造中心996ICU六四事件
Oct 29 '17 at 2:04







distro agnostic: stackoverflow.com/questions/368002/…

– Ciro Santilli 新疆改造中心996ICU六四事件
Oct 29 '17 at 2:04












7 Answers
7






active

oldest

votes


















94














You can use nethogs Install nethogs tool to monitor all your traffic on an interface.



Install it using



sudo apt-get install nethogs


Now run it using



sudo nethogs <interface name>


For example



sudo nethogs wlan0


enter image description here



For more detail type man nethogs after installing.






share|improve this answer


























  • Anyway to set bandwidth parameters on the applications?

    – Karl Morrison
    Jun 29 '15 at 17:57











  • No, this tool only monitors bandwidth. If you are looking for something similar to bandwidth shaping, you can refer this post.

    – g_p
    Jun 29 '15 at 18:16








  • 3





    If you have 'creating socket failed while establishing local IP - are you root?' despite being root, then see the answer at askubuntu.com/a/729560/67747

    – sage
    May 6 '16 at 16:36











  • Brilliant just what i was looking for!

    – Louwki
    May 17 '16 at 14:07











  • sudo nethogs eth0 for default.

    – Travis van der Font
    Aug 22 '17 at 21:03





















9














I prefer sudo netstat -tunap



vinny@vinny-Bonobo-Extreme:~$ sudo netstat -tunap 
[sudo] password for vinny:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8200 0.0.0.0:* LISTEN 1160/minidlnad
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 927/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2543/cupsd
tcp 0 0 192.168.2.10:58491 198.252.206.149:443 ESTABLISHED 30401/firefox
tcp 0 0 192.168.2.10:39824 173.194.219.189:443 ESTABLISHED 30401/firefox
tcp 0 0 192.168.2.10:58569 198.252.206.149:443 ESTABLISHED 30401/firefox
tcp 0 0 192.168.2.10:59283 173.194.219.18:443 ESTABLISHED 30401/firefox
tcp6 0 0 ::1:631 :::* LISTEN 2543/cupsd
tcp6 1 0 ::1:60390 ::1:631 CLOSE_WAIT 863/cups-browsed
tcp6 1 0 ::1:34718 ::1:631 CLOSE_WAIT 1469/plasmashell
tcp6 1 0 ::1:60391 ::1:631 CLOSE_WAIT 863/cups-browsed
udp 0 0 0.0.0.0:1900 0.0.0.0:* 1160/minidlnad
udp 0 0 0.0.0.0:10097 0.0.0.0:* 26759/dhclient
udp 0 0 0.0.0.0:5353 0.0.0.0:* 759/avahi-daemon: r
udp 0 0 0.0.0.0:39609 0.0.0.0:* 759/avahi-daemon: r
udp 0 0 192.168.2.10:57168 0.0.0.0:* 1160/minidlnad
udp 0 0 127.0.1.1:53 0.0.0.0:* 927/dnsmasq
udp 0 0 0.0.0.0:68 0.0.0.0:* 26759/dhclient
udp 0 0 0.0.0.0:631 0.0.0.0:* 863/cups-browsed
udp6 0 0 :::5353 :::* 759/avahi-daemon: r
udp6 0 0 :::13818 :::* 26759/dhclient
udp6 0 0 :::39404 :::* 759/avahi-daemon: r


shows even system proses that is using the network and the name of them.



but not really a monitor as you half to keep running it to see changing output.






share|improve this answer

































    7














    Just a bit more comfort with netstat sudo watch -n1 netstat -tunap



    It will refresh the data each 1s






    share|improve this answer
























    • This should be an edit to the existing answer above...

      – Fabby
      Aug 28 '17 at 20:36



















    6














    The iptraf utility is another way to monitor the traffic, provided by the iptraf Install iptraf package. sudo apt-get install iptraf installs it.



    iptraf is available in Red Hat Linux also; run yum install iptraf as root to install it.






    share|improve this answer

































      4














      Terminal tool: netstat -tnp . -n option is to show numerical address (ip) to which connection is established, -p is program which has established that connection, and -t lists all tcplimits to tcp connections. Alternativelly, you could use netstat -a > networkscan.txt to output everything into a txt file






      share|improve this answer































        1














        Socket Statistics, ss



        ss is the modern alternative to netstat.



        sudo apt install iproute2  # Install


        Usage example:



        watch -n1 sudo ss -ntp  # Do not try to resolve service names. TCP. View processes





        share|improve this answer

































          0














          There is a more modern alternative to ss by now :)



          ss2(pyroute)






          share|improve this answer



















          • 1





            While this link may answer the question,it's better to include essential parts here.

            – Codito ergo sum
            Mar 16 at 8:18












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f532424%2fhow-to-monitor-bandwidth-usage-per-process%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          7 Answers
          7






          active

          oldest

          votes








          7 Answers
          7






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          94














          You can use nethogs Install nethogs tool to monitor all your traffic on an interface.



          Install it using



          sudo apt-get install nethogs


          Now run it using



          sudo nethogs <interface name>


          For example



          sudo nethogs wlan0


          enter image description here



          For more detail type man nethogs after installing.






          share|improve this answer


























          • Anyway to set bandwidth parameters on the applications?

            – Karl Morrison
            Jun 29 '15 at 17:57











          • No, this tool only monitors bandwidth. If you are looking for something similar to bandwidth shaping, you can refer this post.

            – g_p
            Jun 29 '15 at 18:16








          • 3





            If you have 'creating socket failed while establishing local IP - are you root?' despite being root, then see the answer at askubuntu.com/a/729560/67747

            – sage
            May 6 '16 at 16:36











          • Brilliant just what i was looking for!

            – Louwki
            May 17 '16 at 14:07











          • sudo nethogs eth0 for default.

            – Travis van der Font
            Aug 22 '17 at 21:03


















          94














          You can use nethogs Install nethogs tool to monitor all your traffic on an interface.



          Install it using



          sudo apt-get install nethogs


          Now run it using



          sudo nethogs <interface name>


          For example



          sudo nethogs wlan0


          enter image description here



          For more detail type man nethogs after installing.






          share|improve this answer


























          • Anyway to set bandwidth parameters on the applications?

            – Karl Morrison
            Jun 29 '15 at 17:57











          • No, this tool only monitors bandwidth. If you are looking for something similar to bandwidth shaping, you can refer this post.

            – g_p
            Jun 29 '15 at 18:16








          • 3





            If you have 'creating socket failed while establishing local IP - are you root?' despite being root, then see the answer at askubuntu.com/a/729560/67747

            – sage
            May 6 '16 at 16:36











          • Brilliant just what i was looking for!

            – Louwki
            May 17 '16 at 14:07











          • sudo nethogs eth0 for default.

            – Travis van der Font
            Aug 22 '17 at 21:03
















          94












          94








          94







          You can use nethogs Install nethogs tool to monitor all your traffic on an interface.



          Install it using



          sudo apt-get install nethogs


          Now run it using



          sudo nethogs <interface name>


          For example



          sudo nethogs wlan0


          enter image description here



          For more detail type man nethogs after installing.






          share|improve this answer















          You can use nethogs Install nethogs tool to monitor all your traffic on an interface.



          Install it using



          sudo apt-get install nethogs


          Now run it using



          sudo nethogs <interface name>


          For example



          sudo nethogs wlan0


          enter image description here



          For more detail type man nethogs after installing.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 11 '17 at 19:03









          Community

          1




          1










          answered Oct 5 '14 at 8:52









          g_pg_p

          13k24761




          13k24761













          • Anyway to set bandwidth parameters on the applications?

            – Karl Morrison
            Jun 29 '15 at 17:57











          • No, this tool only monitors bandwidth. If you are looking for something similar to bandwidth shaping, you can refer this post.

            – g_p
            Jun 29 '15 at 18:16








          • 3





            If you have 'creating socket failed while establishing local IP - are you root?' despite being root, then see the answer at askubuntu.com/a/729560/67747

            – sage
            May 6 '16 at 16:36











          • Brilliant just what i was looking for!

            – Louwki
            May 17 '16 at 14:07











          • sudo nethogs eth0 for default.

            – Travis van der Font
            Aug 22 '17 at 21:03





















          • Anyway to set bandwidth parameters on the applications?

            – Karl Morrison
            Jun 29 '15 at 17:57











          • No, this tool only monitors bandwidth. If you are looking for something similar to bandwidth shaping, you can refer this post.

            – g_p
            Jun 29 '15 at 18:16








          • 3





            If you have 'creating socket failed while establishing local IP - are you root?' despite being root, then see the answer at askubuntu.com/a/729560/67747

            – sage
            May 6 '16 at 16:36











          • Brilliant just what i was looking for!

            – Louwki
            May 17 '16 at 14:07











          • sudo nethogs eth0 for default.

            – Travis van der Font
            Aug 22 '17 at 21:03



















          Anyway to set bandwidth parameters on the applications?

          – Karl Morrison
          Jun 29 '15 at 17:57





          Anyway to set bandwidth parameters on the applications?

          – Karl Morrison
          Jun 29 '15 at 17:57













          No, this tool only monitors bandwidth. If you are looking for something similar to bandwidth shaping, you can refer this post.

          – g_p
          Jun 29 '15 at 18:16







          No, this tool only monitors bandwidth. If you are looking for something similar to bandwidth shaping, you can refer this post.

          – g_p
          Jun 29 '15 at 18:16






          3




          3





          If you have 'creating socket failed while establishing local IP - are you root?' despite being root, then see the answer at askubuntu.com/a/729560/67747

          – sage
          May 6 '16 at 16:36





          If you have 'creating socket failed while establishing local IP - are you root?' despite being root, then see the answer at askubuntu.com/a/729560/67747

          – sage
          May 6 '16 at 16:36













          Brilliant just what i was looking for!

          – Louwki
          May 17 '16 at 14:07





          Brilliant just what i was looking for!

          – Louwki
          May 17 '16 at 14:07













          sudo nethogs eth0 for default.

          – Travis van der Font
          Aug 22 '17 at 21:03







          sudo nethogs eth0 for default.

          – Travis van der Font
          Aug 22 '17 at 21:03















          9














          I prefer sudo netstat -tunap



          vinny@vinny-Bonobo-Extreme:~$ sudo netstat -tunap 
          [sudo] password for vinny:
          Active Internet connections (servers and established)
          Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
          tcp 0 0 0.0.0.0:8200 0.0.0.0:* LISTEN 1160/minidlnad
          tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 927/dnsmasq
          tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2543/cupsd
          tcp 0 0 192.168.2.10:58491 198.252.206.149:443 ESTABLISHED 30401/firefox
          tcp 0 0 192.168.2.10:39824 173.194.219.189:443 ESTABLISHED 30401/firefox
          tcp 0 0 192.168.2.10:58569 198.252.206.149:443 ESTABLISHED 30401/firefox
          tcp 0 0 192.168.2.10:59283 173.194.219.18:443 ESTABLISHED 30401/firefox
          tcp6 0 0 ::1:631 :::* LISTEN 2543/cupsd
          tcp6 1 0 ::1:60390 ::1:631 CLOSE_WAIT 863/cups-browsed
          tcp6 1 0 ::1:34718 ::1:631 CLOSE_WAIT 1469/plasmashell
          tcp6 1 0 ::1:60391 ::1:631 CLOSE_WAIT 863/cups-browsed
          udp 0 0 0.0.0.0:1900 0.0.0.0:* 1160/minidlnad
          udp 0 0 0.0.0.0:10097 0.0.0.0:* 26759/dhclient
          udp 0 0 0.0.0.0:5353 0.0.0.0:* 759/avahi-daemon: r
          udp 0 0 0.0.0.0:39609 0.0.0.0:* 759/avahi-daemon: r
          udp 0 0 192.168.2.10:57168 0.0.0.0:* 1160/minidlnad
          udp 0 0 127.0.1.1:53 0.0.0.0:* 927/dnsmasq
          udp 0 0 0.0.0.0:68 0.0.0.0:* 26759/dhclient
          udp 0 0 0.0.0.0:631 0.0.0.0:* 863/cups-browsed
          udp6 0 0 :::5353 :::* 759/avahi-daemon: r
          udp6 0 0 :::13818 :::* 26759/dhclient
          udp6 0 0 :::39404 :::* 759/avahi-daemon: r


          shows even system proses that is using the network and the name of them.



          but not really a monitor as you half to keep running it to see changing output.






          share|improve this answer






























            9














            I prefer sudo netstat -tunap



            vinny@vinny-Bonobo-Extreme:~$ sudo netstat -tunap 
            [sudo] password for vinny:
            Active Internet connections (servers and established)
            Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
            tcp 0 0 0.0.0.0:8200 0.0.0.0:* LISTEN 1160/minidlnad
            tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 927/dnsmasq
            tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2543/cupsd
            tcp 0 0 192.168.2.10:58491 198.252.206.149:443 ESTABLISHED 30401/firefox
            tcp 0 0 192.168.2.10:39824 173.194.219.189:443 ESTABLISHED 30401/firefox
            tcp 0 0 192.168.2.10:58569 198.252.206.149:443 ESTABLISHED 30401/firefox
            tcp 0 0 192.168.2.10:59283 173.194.219.18:443 ESTABLISHED 30401/firefox
            tcp6 0 0 ::1:631 :::* LISTEN 2543/cupsd
            tcp6 1 0 ::1:60390 ::1:631 CLOSE_WAIT 863/cups-browsed
            tcp6 1 0 ::1:34718 ::1:631 CLOSE_WAIT 1469/plasmashell
            tcp6 1 0 ::1:60391 ::1:631 CLOSE_WAIT 863/cups-browsed
            udp 0 0 0.0.0.0:1900 0.0.0.0:* 1160/minidlnad
            udp 0 0 0.0.0.0:10097 0.0.0.0:* 26759/dhclient
            udp 0 0 0.0.0.0:5353 0.0.0.0:* 759/avahi-daemon: r
            udp 0 0 0.0.0.0:39609 0.0.0.0:* 759/avahi-daemon: r
            udp 0 0 192.168.2.10:57168 0.0.0.0:* 1160/minidlnad
            udp 0 0 127.0.1.1:53 0.0.0.0:* 927/dnsmasq
            udp 0 0 0.0.0.0:68 0.0.0.0:* 26759/dhclient
            udp 0 0 0.0.0.0:631 0.0.0.0:* 863/cups-browsed
            udp6 0 0 :::5353 :::* 759/avahi-daemon: r
            udp6 0 0 :::13818 :::* 26759/dhclient
            udp6 0 0 :::39404 :::* 759/avahi-daemon: r


            shows even system proses that is using the network and the name of them.



            but not really a monitor as you half to keep running it to see changing output.






            share|improve this answer




























              9












              9








              9







              I prefer sudo netstat -tunap



              vinny@vinny-Bonobo-Extreme:~$ sudo netstat -tunap 
              [sudo] password for vinny:
              Active Internet connections (servers and established)
              Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
              tcp 0 0 0.0.0.0:8200 0.0.0.0:* LISTEN 1160/minidlnad
              tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 927/dnsmasq
              tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2543/cupsd
              tcp 0 0 192.168.2.10:58491 198.252.206.149:443 ESTABLISHED 30401/firefox
              tcp 0 0 192.168.2.10:39824 173.194.219.189:443 ESTABLISHED 30401/firefox
              tcp 0 0 192.168.2.10:58569 198.252.206.149:443 ESTABLISHED 30401/firefox
              tcp 0 0 192.168.2.10:59283 173.194.219.18:443 ESTABLISHED 30401/firefox
              tcp6 0 0 ::1:631 :::* LISTEN 2543/cupsd
              tcp6 1 0 ::1:60390 ::1:631 CLOSE_WAIT 863/cups-browsed
              tcp6 1 0 ::1:34718 ::1:631 CLOSE_WAIT 1469/plasmashell
              tcp6 1 0 ::1:60391 ::1:631 CLOSE_WAIT 863/cups-browsed
              udp 0 0 0.0.0.0:1900 0.0.0.0:* 1160/minidlnad
              udp 0 0 0.0.0.0:10097 0.0.0.0:* 26759/dhclient
              udp 0 0 0.0.0.0:5353 0.0.0.0:* 759/avahi-daemon: r
              udp 0 0 0.0.0.0:39609 0.0.0.0:* 759/avahi-daemon: r
              udp 0 0 192.168.2.10:57168 0.0.0.0:* 1160/minidlnad
              udp 0 0 127.0.1.1:53 0.0.0.0:* 927/dnsmasq
              udp 0 0 0.0.0.0:68 0.0.0.0:* 26759/dhclient
              udp 0 0 0.0.0.0:631 0.0.0.0:* 863/cups-browsed
              udp6 0 0 :::5353 :::* 759/avahi-daemon: r
              udp6 0 0 :::13818 :::* 26759/dhclient
              udp6 0 0 :::39404 :::* 759/avahi-daemon: r


              shows even system proses that is using the network and the name of them.



              but not really a monitor as you half to keep running it to see changing output.






              share|improve this answer















              I prefer sudo netstat -tunap



              vinny@vinny-Bonobo-Extreme:~$ sudo netstat -tunap 
              [sudo] password for vinny:
              Active Internet connections (servers and established)
              Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
              tcp 0 0 0.0.0.0:8200 0.0.0.0:* LISTEN 1160/minidlnad
              tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 927/dnsmasq
              tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2543/cupsd
              tcp 0 0 192.168.2.10:58491 198.252.206.149:443 ESTABLISHED 30401/firefox
              tcp 0 0 192.168.2.10:39824 173.194.219.189:443 ESTABLISHED 30401/firefox
              tcp 0 0 192.168.2.10:58569 198.252.206.149:443 ESTABLISHED 30401/firefox
              tcp 0 0 192.168.2.10:59283 173.194.219.18:443 ESTABLISHED 30401/firefox
              tcp6 0 0 ::1:631 :::* LISTEN 2543/cupsd
              tcp6 1 0 ::1:60390 ::1:631 CLOSE_WAIT 863/cups-browsed
              tcp6 1 0 ::1:34718 ::1:631 CLOSE_WAIT 1469/plasmashell
              tcp6 1 0 ::1:60391 ::1:631 CLOSE_WAIT 863/cups-browsed
              udp 0 0 0.0.0.0:1900 0.0.0.0:* 1160/minidlnad
              udp 0 0 0.0.0.0:10097 0.0.0.0:* 26759/dhclient
              udp 0 0 0.0.0.0:5353 0.0.0.0:* 759/avahi-daemon: r
              udp 0 0 0.0.0.0:39609 0.0.0.0:* 759/avahi-daemon: r
              udp 0 0 192.168.2.10:57168 0.0.0.0:* 1160/minidlnad
              udp 0 0 127.0.1.1:53 0.0.0.0:* 927/dnsmasq
              udp 0 0 0.0.0.0:68 0.0.0.0:* 26759/dhclient
              udp 0 0 0.0.0.0:631 0.0.0.0:* 863/cups-browsed
              udp6 0 0 :::5353 :::* 759/avahi-daemon: r
              udp6 0 0 :::13818 :::* 26759/dhclient
              udp6 0 0 :::39404 :::* 759/avahi-daemon: r


              shows even system proses that is using the network and the name of them.



              but not really a monitor as you half to keep running it to see changing output.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 19 '15 at 8:56









              g_p

              13k24761




              13k24761










              answered Apr 17 '15 at 0:18









              Charles WrightCharles Wright

              20224




              20224























                  7














                  Just a bit more comfort with netstat sudo watch -n1 netstat -tunap



                  It will refresh the data each 1s






                  share|improve this answer
























                  • This should be an edit to the existing answer above...

                    – Fabby
                    Aug 28 '17 at 20:36
















                  7














                  Just a bit more comfort with netstat sudo watch -n1 netstat -tunap



                  It will refresh the data each 1s






                  share|improve this answer
























                  • This should be an edit to the existing answer above...

                    – Fabby
                    Aug 28 '17 at 20:36














                  7












                  7








                  7







                  Just a bit more comfort with netstat sudo watch -n1 netstat -tunap



                  It will refresh the data each 1s






                  share|improve this answer













                  Just a bit more comfort with netstat sudo watch -n1 netstat -tunap



                  It will refresh the data each 1s







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 12 '16 at 16:44









                  Artem ZhukovArtem Zhukov

                  19627




                  19627













                  • This should be an edit to the existing answer above...

                    – Fabby
                    Aug 28 '17 at 20:36



















                  • This should be an edit to the existing answer above...

                    – Fabby
                    Aug 28 '17 at 20:36

















                  This should be an edit to the existing answer above...

                  – Fabby
                  Aug 28 '17 at 20:36





                  This should be an edit to the existing answer above...

                  – Fabby
                  Aug 28 '17 at 20:36











                  6














                  The iptraf utility is another way to monitor the traffic, provided by the iptraf Install iptraf package. sudo apt-get install iptraf installs it.



                  iptraf is available in Red Hat Linux also; run yum install iptraf as root to install it.






                  share|improve this answer






























                    6














                    The iptraf utility is another way to monitor the traffic, provided by the iptraf Install iptraf package. sudo apt-get install iptraf installs it.



                    iptraf is available in Red Hat Linux also; run yum install iptraf as root to install it.






                    share|improve this answer




























                      6












                      6








                      6







                      The iptraf utility is another way to monitor the traffic, provided by the iptraf Install iptraf package. sudo apt-get install iptraf installs it.



                      iptraf is available in Red Hat Linux also; run yum install iptraf as root to install it.






                      share|improve this answer















                      The iptraf utility is another way to monitor the traffic, provided by the iptraf Install iptraf package. sudo apt-get install iptraf installs it.



                      iptraf is available in Red Hat Linux also; run yum install iptraf as root to install it.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Mar 11 '17 at 19:03









                      Community

                      1




                      1










                      answered Apr 16 '15 at 17:39









                      user398737user398737

                      6111




                      6111























                          4














                          Terminal tool: netstat -tnp . -n option is to show numerical address (ip) to which connection is established, -p is program which has established that connection, and -t lists all tcplimits to tcp connections. Alternativelly, you could use netstat -a > networkscan.txt to output everything into a txt file






                          share|improve this answer




























                            4














                            Terminal tool: netstat -tnp . -n option is to show numerical address (ip) to which connection is established, -p is program which has established that connection, and -t lists all tcplimits to tcp connections. Alternativelly, you could use netstat -a > networkscan.txt to output everything into a txt file






                            share|improve this answer


























                              4












                              4








                              4







                              Terminal tool: netstat -tnp . -n option is to show numerical address (ip) to which connection is established, -p is program which has established that connection, and -t lists all tcplimits to tcp connections. Alternativelly, you could use netstat -a > networkscan.txt to output everything into a txt file






                              share|improve this answer













                              Terminal tool: netstat -tnp . -n option is to show numerical address (ip) to which connection is established, -p is program which has established that connection, and -t lists all tcplimits to tcp connections. Alternativelly, you could use netstat -a > networkscan.txt to output everything into a txt file







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Oct 5 '14 at 8:58









                              Sergiy KolodyazhnyySergiy Kolodyazhnyy

                              75.6k9156330




                              75.6k9156330























                                  1














                                  Socket Statistics, ss



                                  ss is the modern alternative to netstat.



                                  sudo apt install iproute2  # Install


                                  Usage example:



                                  watch -n1 sudo ss -ntp  # Do not try to resolve service names. TCP. View processes





                                  share|improve this answer






























                                    1














                                    Socket Statistics, ss



                                    ss is the modern alternative to netstat.



                                    sudo apt install iproute2  # Install


                                    Usage example:



                                    watch -n1 sudo ss -ntp  # Do not try to resolve service names. TCP. View processes





                                    share|improve this answer




























                                      1












                                      1








                                      1







                                      Socket Statistics, ss



                                      ss is the modern alternative to netstat.



                                      sudo apt install iproute2  # Install


                                      Usage example:



                                      watch -n1 sudo ss -ntp  # Do not try to resolve service names. TCP. View processes





                                      share|improve this answer















                                      Socket Statistics, ss



                                      ss is the modern alternative to netstat.



                                      sudo apt install iproute2  # Install


                                      Usage example:



                                      watch -n1 sudo ss -ntp  # Do not try to resolve service names. TCP. View processes






                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Feb 21 at 16:09

























                                      answered Feb 20 at 0:44









                                      Pablo BianchiPablo Bianchi

                                      3,13521836




                                      3,13521836























                                          0














                                          There is a more modern alternative to ss by now :)



                                          ss2(pyroute)






                                          share|improve this answer



















                                          • 1





                                            While this link may answer the question,it's better to include essential parts here.

                                            – Codito ergo sum
                                            Mar 16 at 8:18
















                                          0














                                          There is a more modern alternative to ss by now :)



                                          ss2(pyroute)






                                          share|improve this answer



















                                          • 1





                                            While this link may answer the question,it's better to include essential parts here.

                                            – Codito ergo sum
                                            Mar 16 at 8:18














                                          0












                                          0








                                          0







                                          There is a more modern alternative to ss by now :)



                                          ss2(pyroute)






                                          share|improve this answer













                                          There is a more modern alternative to ss by now :)



                                          ss2(pyroute)







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Mar 16 at 7:58









                                          cheruskcherusk

                                          1




                                          1








                                          • 1





                                            While this link may answer the question,it's better to include essential parts here.

                                            – Codito ergo sum
                                            Mar 16 at 8:18














                                          • 1





                                            While this link may answer the question,it's better to include essential parts here.

                                            – Codito ergo sum
                                            Mar 16 at 8:18








                                          1




                                          1





                                          While this link may answer the question,it's better to include essential parts here.

                                          – Codito ergo sum
                                          Mar 16 at 8:18





                                          While this link may answer the question,it's better to include essential parts here.

                                          – Codito ergo sum
                                          Mar 16 at 8:18


















                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Ask Ubuntu!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f532424%2fhow-to-monitor-bandwidth-usage-per-process%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                                          ComboBox Display Member on multiple fields

                                          Is it possible to collect Nectar points via Trainline?