cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

os:linux:performance:network.html



Network on Linux Performance (sar, bwm-ng)

Check network from /proc/net/dev

root@ubuntu20:~# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo: 2082501   27407    0    0    0     0          0         0  2082501   27407    0    0    0     0       0          0
  eth0: 12762631192 113668788    0    0    0     0          0         0 32621772094 10560106    0    0    0     0       0          0
root@ubuntu20:~#


Linux Command for Swap

sar -n DEV

root@ubuntu20:~# sar -n DEV 1
Linux 5.4.0-65-generic (ubuntu20)       03/04/2021      _x86_64_        (2 CPU)

09:02:43 AM     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s   %ifutil
09:02:44 AM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09:02:44 AM      eth0     52.00      1.00      3.65      0.21      0.00      0.00      0.00      0.00

09:02:44 AM     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s   %ifutil
09:02:45 AM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09:02:45 AM      eth0     84.00      2.00      5.56      0.70      0.00      0.00      0.00      0.00

09:02:45 AM     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s   %ifutil
09:02:46 AM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09:02:46 AM      eth0     33.00      1.00      2.43      0.65      0.00      0.00      0.00      0.00

09:02:46 AM     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s   %ifutil
09:02:47 AM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
09:02:47 AM      eth0     50.00      6.00      3.61      1.52      0.00      0.00      0.00      0.00
^C


Average:        IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s   %ifutil
Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         eth0     54.75      2.50      3.81      0.77      0.00      0.00      0.00      0.00
root@ubuntu20:~#


bwm-ng

root@ubuntu20:~# bwm-ng

  bwm-ng v0.6.2 (probing every 0.500s), press 'h' for help
  input: /proc/net/dev type: rate
  -         iface                   Rx                   Tx                Total
  ==============================================================================
               lo:           0.00 KB/s            0.00 KB/s            0.00 KB/s
             eth0:           3.77 KB/s            0.42 KB/s            4.19 KB/s
  ------------------------------------------------------------------------------
            total:           3.77 KB/s            0.42 KB/s            4.19 KB/s




Related Pages




os/linux/performance/network.html.txt ยท Last modified: 2021/03/04 by admin

Page Tools