コンテンツにスキップ

「VnStat」の版間の差分

提供: ArchWiki
削除された内容 追加された内容
ページの作成:「Category:ネットワーク en:vnStat ru:vnStat {{lowercase title}} [http://humdi.net/vnstat/ vnStat] は軽量な (コマンドライン) ネットワーク...」
 
設定: 英語版に差し替え
11行目: 11行目:
== 設定 ==
== 設定 ==


[[Start/enable]] the {{ic|vnstat.service}} daemon.
エディタで {{ic|/etc/vnstat.conf}} を開いてインターフェイスの名前が正しく設定されているか確認してください、例:
# Interface "enp3s0"


Pick a preferred network interface and edit the {{ic|Interface}} variable in the {{ic|/etc/vnstat.conf}} accordingly. To list all interfaces available to vnstat, use {{ic|vnstat --iflist}}.
=== インターフェイスデータの作成 ===


To start monitoring a particular interface that was not referred to in the configuration file when the daemon was started, you must initialize a database first. Each interface needs its own database. The command to initialize one for the {{ic|eth0}} interface is:
まず vnStat ディレクトリを作成する必要があります:
# mkdir /var/lib/vnstat
# vnstat --add -i eth0
それから以下のコマンドを使って監視したいインターフェイスのデータベースを作成してください (例: ''enp3s0''):
# vnstat -u -i enp3s0
もしくは無線インターフェイスの場合:
# vnstat -u -i wlan0


Remember to [[restart]] the {{ic|vnstat.service}} daemon after you have added a new interface.
=== Systemd サービスの起動 ===

インターフェイスを設定して設定ファイルをチェックしたら、[[systemd]] で監視プロセスを開始することができます:
# systemctl start vnstat.service
サービスを永続的に使用するには:
# systemctl enable vnstat.service


== 使用方法 ==
== 使用方法 ==

2022年3月25日 (金) 14:53時点における版

vnStat は軽量な (コマンドライン) ネットワークトラフィックモニターです。インターフェイスを選択して監視することができ、後で解析できるようにデータベースにネットワークトラフィックログを記録します。

インストール

公式リポジトリから vnstatインストールしてください。

設定

Start/enable the vnstat.service daemon.

Pick a preferred network interface and edit the Interface variable in the /etc/vnstat.conf accordingly. To list all interfaces available to vnstat, use vnstat --iflist.

To start monitoring a particular interface that was not referred to in the configuration file when the daemon was started, you must initialize a database first. Each interface needs its own database. The command to initialize one for the eth0 interface is:

# vnstat --add -i eth0

Remember to restart the vnstat.service daemon after you have added a new interface.

使用方法

ネットワークトラフィックを問い合わせる:

# vnstat -q

ネットワークトラフィックの使用量をライブで表示:

# vnstat -l

他のオプションを見るには、次を実行:

# vnstat --help

参照

VnStat Custom WebUI