ClusterIt(2)

ClusterIt にはツールがいろいろと入ってるのでちょっとだけ,手っ取り早く使えそうなものをフォローしてみる.

Environment

ClusterIt(1) の時と同じ.

pdf

クラスタのディスク状況を調べる.df(1)の分散版といったところか.

実行例

$ pdf -g servers
Node     Filesystem           1K-Blks     Used    Avail  Cap Mounted On
sv-win: C:cygwinbin          40017880  7903764 32114116  20% /usr/bin
sv-win: C:cygwinlib          40017880  7903764 32114116  20% /usr/lib
sv-win: C:cygwin             40017880  7903764 32114116  20% /
sv-win: c:                   40017880  7903764 32114116  20% /c
sv-win: d:                   40017880 14417160 25600720  37% /d
sv-win: e:                   40017880 21724564 18293316  55% /e
sv-win: f:                   40017880  2844100 37173780   8% /f
sv-bsd: /dev/ad0s1a            507630    81648   385372  17% /
sv-bsd: devfs                       1        1        0 100% /dev
sv-bsd: /dev/ad0s1f          16354246  2241024 12804884  15% /usr
sv-bsd: /dev/ad0s1d           1190350    50708  1044414   5% /var
sv-bsd: devfs                       1        1        0 100% /var/named/dev

pcp

クラスタへファイルをコピー.

pcp [options] source1 ... sourceN [destination]

オプション

  • -c : クラスタの全ノードを指定
  • -e : リモートコマンドの出力を表示
  • -g group1,...,groupN : group の指定
  • -r : ディレクトリを再帰的にコピー
  • -w node1,...,nodeN : ノードを指定
  • -x node1,...,nodeN : 無視するノードを指定

destination を指定しない場合はユーザのホームディレクトリへ同じファイル名でコピーされる.


実行例

環境変数 RCP_CMD を設定していないとこうなる.デフォルトだとRCPを使いに行く.

$ pcp -ce -g servers clusterit-2.4.tar.gz
sv-win: connect to address 192.168.10.16 port 544: Connection refused
sv-win: Trying krb4 rcp...
sv-win: connect to address 192.168.10.16 port 544: Connection refused
sv-win: trying normal rcp (/usr/bin/rcp)
sv-win: sv-win: Connection refused
sv-bsd: connect to address 192.168.10.2 port 544: Connection refused
sv-bsd: Trying krb4 rcp...
sv-bsd: connect to address 192.168.10.2 port 544: Connection refused
sv-bsd: trying normal rcp (/usr/bin/rcp)
sv-bsd: sv-bsd: Connection refused

scpを使うのが良いだろう.

$ export RCP_CMD=/usr/bin/scp
$ pcp -ce -g servers clusterit-2.4.tar.gz
$ dsh -g servers ls -l *.gz
sv-win: -rw-rw-r-- 1 stereocat なし 286448 May  6 22:15 clusterit-2.4.tar.gz
sv-bsd: -rw-r--r--  1 stereocat  operator  286448 May  6 22:16 clusterit-2.4.tar.gz

prm

クラスタからファイルを削除.pcp の逆.

prm [options] file ... file

オプション

  • -R(-r) : ディレクトリを再帰的に削除
  • -P : 通常ファイルを削除する前に 0xff,0x00 で上書きしてから削除
  • -g group1,...,groupN : group の指定
  • -w node1,...,nodeN : ノードを指定
  • -x node1,...,nodeN : 無視するノードを指定

-P オプションが面白いな.

実行例

$ prm -g servers clusterit-2.4.tar.gz
$ dsh -g servers ls -l *.gz
$