Help us understand the problem. What is going on with this article?

Linuxで通信量を監視する

前の記事でディスク容量を監視してみました。
ついでに、通信量を測定してみたかったので、watchコマンドにifconfigを渡してみた。

$ watch -n 1 ifconfig enx00e04c00004a

こんな感じ。enx~はインターフェース名。書かなければ全部出てきます。
通信量は起動してからの受信量・送信量がそれぞれRX、TXとして表示されます。詳細はifconfigのマニュアル見てね。

Every 0.1s: ifconfig enx00e04c00004a                       graviohub: Thu Sep 10 14:57:45 2020

enx00e04c00004a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.86.55  netmask 255.255.255.0  broadcast 192.168.86.255
        inet6 fe80::79b8:173:d2bd:f0e9  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:00:00:4a  txqueuelen 1000  (Ethernet)
        RX packets 2500640  bytes 1823881816 (1.8 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3509207  bytes 1042507689 (1.0 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

このやり方もかなりお手軽なのでおすすめです。きちんと測定したいときはそれなりのやり方を考えましょう。:P

watch-ifconfig.gif

asteria
データ連携ソフトのASTERIA Warp、コンテンツ管理システムのHandbook、モバイルアプリ作成サービスPlatio、AI/IoTのエッジウェアGravioなどを開発しています
https://asteria.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした