[Lubuntu] iperf は自分でサーバを用意する必要があるため断念。speedtest をインストールする。

iperf を勢いでインストールしたのは良いものの、iperf サーバを自前でインターネット側に用意しないとインターネットの速度測定ができないことがわかったので、iperf は断念です。違うツールを探しました。

そうすると、speedtest というツールが候補に上がってきたのでこれを Lubuntu にインストールしてみます。speedtest 自体が Python で書かれているらしく、まず Python で書かれたソフトをインストールするためのパッケージ管理システムである pip をインストールします。

iperf の時と同様に aptitude を使ってインストールしていきます。

$ aptitude search python-pip
p python-pip – alternative Python package installer
p python-pipeline – iterator pipelines for Python
$ aptitude show python-pip
パッケージ: python-pip
状態: インストールされていません
バージョン: 1.4.1-2
優先度: 任意
セクション: universe/python
メンテナ: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
アーキテクチャ: all
展開サイズ: 1,469 k
依存: ca-certificates, python-pkg-resources, python-setuptools (>= 0.6c1), python (>= 2.7), python (< 2.8), python (>= 2.7.1-0ubuntu2)
推奨: build-essential, python-dev-all (>= 2.6)
説明: alternative Python package installer
pip is a replacement for easy_install, and is intended to be an improved Python package installer. It
integrates with virtualenv, doesn’t do partial installs, can save package state for replaying, can install from
non-egg sources, and can install from version control repositories.
ホームページ: http://www.pip-installer.org/$ sudo aptitude install python-pip
[sudo] password for keramax:
以下の新規パッケージがインストールされます:
python-pip python-setuptools{a}
0 個のパッケージを更新、 2 個を新たにインストール、 0 個を削除予定、52 個が更新されていない。
768 k バイトのアーカイブを取得する必要があります。 展開後に 2,616 k バイトのディスク領域が新たに消費されます。
先に進みますか? [Y/n/?] Y
取得: 1 http://jp.archive.ubuntu.com/ubuntu/ saucy/main python-setuptools all 0.6.37-1ubuntu1 [455 kB]
取得: 2 http://jp.archive.ubuntu.com/ubuntu/ saucy/universe python-pip all 1.4.1-2 [313 kB]
Fetched 768 kB in 1秒 (481 kB/s)
以前に未選択のパッケージ python-setuptools を選択しています。
(データベースを読み込んでいます … 現在 162333 個のファイルとディレクトリがインストールされています。)
(…/python-setuptools_0.6.37-1ubuntu1_all.deb から) python-setuptools を展開しています…
以前に未選択のパッケージ python-pip を選択しています。
(…/python-pip_1.4.1-2_all.deb から) python-pip を展開しています…
man-db のトリガを処理しています …
python-setuptools (0.6.37-1ubuntu1) を設定しています …
python-pip (1.4.1-2) を設定しています …
$

これで pip がインストールされました。

次にいまインストールしたばかりの pip を使用して speedtest をインストールしていきます。pip の使い方も aptitude と似ています。ヘルプを表示してみると、

$ pip -h

Usage:
pip [options]

Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
search Search PyPI for packages.
wheel Build wheels from your requirements.
zip Zip individual packages.
unzip Unzip individual packages.
bundle Create pybundles.
help Show help for commands.

General Options:
-h, –help Show help.
-v, –verbose Give more output. Option is additive, and can be used up to 3 times.
-V, –version Show version and exit.
-q, –quiet Give less output.
–log Log file where a complete (maximum verbosity) record will be kept.
–proxy Specify a proxy in the form [user:passwd@]proxy.server:port.
–timeout Set the socket timeout (default 15 seconds).
–exists-action Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
–cert Path to alternate CA bundle.
$

オプションに search, show, install があるところが aptitude と似ていますね。ではインストールです。

$ sudo pip install speedtest-cli
Downloading/unpacking speedtest-cli
Downloading speedtest-cli-0.3.1.tar.gz
Running setup.py egg_info for package speedtest-cliInstalling collected packages: speedtest-cli
Running setup.py install for speedtest-cliInstalling speedtest script to /usr/local/bin
Installing speedtest-cli script to /usr/local/bin
Successfully installed speedtest-cli
Cleaning up…
$

which で確認すると、/usr/local/bin にインストールされています。speedtest のヘルプを表示させてみます。

$ which speedtest
/usr/local/bin/speedtest
$ speedtest -h
usage: speedtest [-h] [–bytes] [–share] [–simple] [–list]
[–server SERVER] [–mini MINI] [–source SOURCE] [–version]Command line interface for testing internet bandwidth using speedtest.net.
————————————————————————–
https://github.com/sivel/speedtest-clioptional arguments:
-h, –help show this help message and exit
–bytes Display values in bytes instead of bits. Does not affect
the image generated by –share
–share Generate and provide a URL to the speedtest.net share
results image
–simple Suppress verbose output, only show basic information
–list Display a list of speedtest.net servers sorted by distance
–server SERVER Specify a server ID to test against
–mini MINI URL of the Speedtest Mini server
–source SOURCE Source IP address to bind to
–version Show the version number and exit
$

これで speedtest のインストールが完了です。

 

 

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください