topless

提供: FreeBSD入門
移動: 案内検索
スポンサーリンク

topless コマンドとは、topライクに画面を使って、コマンドの出力を表示するコマンドです。psやnetstat、lsコマンドなど、一回切りのコマンドを周期的に実行して、topライクに表示できます。モニタリングをする場合に利用できます。

読み方

topless
とっぷれす

概要

topless は、top風にコマンドを使用するためのユーティリティプログラムです。

インストール

pkgコマンドでインストールする場合

sudo pkg install topless

コマンドラインオプション

usage:
    topless [-cwVhv] [-s <seconds>] [-n <number>] [-a <command>] COMMAND
 
     -c             The lines difference from the previous screen update
                    are colorized. (default: false)
     -s <second>    Set the screen update periods to <seconds> seconds.
                    If the sleep(1) command accepts and honors a non-integer
                    number of seconds, <seconds> can be a non-integer number.
                    (default: 1)
     -n <number>    The lines are kept colorized for I<number> times screen
                    update when -c is also enabled. Once a line is colorized,
                    that line becomes blue on next screen update, and remains
                    blue until the line returns to be original color.
                    default: 1)
     -a <command>   Topless enforce the specified command when COMMAND output
                    gets difference from the previous output assumed for alert
                    use, instead of -c use for monochrome monitor or others.
                    (default: false)
     -w             Topless will use as many columns as necessary without
                    regard for your window size. (default: true)
     -V             Topless gets information header. (default: false)
     -h             Print help message.
     -v             Print version.
 
    key command
     q              quit
 
    environment variables
    TMPDIR          directory for temporary files
 
    topless version 1.52

ps

$ topless ps

前回と異なる行をカラーにする

-cオプションで、違いをカラーにできます。

$ topless -c ps axuww

0.1秒ごとに更新する

$ topless -s 0.1 ps ax

カラー表示と10秒おきの更新

topless -c -n 10 netstat -a

lsでディレクトリを監視する

$ topless /bin/ls /path/to

関連項目




スポンサーリンク