LoginSignup
2
2

More than 5 years have passed since last update.

ROMA のステータスの見方(stat)

Last updated at Posted at 2015-12-02

ROMAのステータスの確認方法です。
ROMAのインストール方法は昨日のポストを参照
http://qiita.com/hiroaki-iwase/items/d00936fc0e2bcb64a62a

コマンド

stat [regexp]
  • telnet <address> <port>でROMAにアクセスできます
  • regexpオプションは表示項目を正規表現で指定することが出来ます

見方

stat

> stat
version 1.2.0
config.DEFAULT_LOST_ACTION auto_assign
.
.
.
END
  • 全ステータス項目を表示します

stat node

> stat node
stats.run_receive_a_vnode {}
routing.nodes.length 2
routing.nodes ["localhost_10001", "localhost_10002"]
routing.vnodes.length 512
routing.short_vnodes 0
routing.lost_vnodes 0
routing.version_of_nodes {"localhost_10001"=>66048, "localhost_10002"=>66048}
END
  • 基本的なステータス情報を表示します
  • routing.short_vnodesは冗長度の落ちたvnodeの数を表します
    • 冗長度2の場合、1つのvnodeにアクセスできなくなっている状態です
    • dataの読み書きは行えます
    • 通常時は0です
  • routing.lost_vnodesは冗長度が0になったvnodeの数を表します(通常時は0です)
    • 冗長度2の場合、2つ(両方)のvnodeにアクセスできなくなっている状態です
    • dataの読み書きが行えません
    • 通常時は0です

stat primary|secondary

> stat primary|secondary
routing.primary 263
routing.secondary1 249
END
  • telnetでアクセスしたnodeが担当しているvnodesの数を表示します

stat path

> stat path|PATH
config.LOG_PATH /home/roma
config.RTTABLE_PATH /home/roma
config.WRITEBEHIND_PATH /home/roma/wb
stats.config_path roma/config
storages[roma].storage.storage_path /home/roma/localhost_10001/roma
write-behind.path /home/roma/wb
  • ROMAが参照している各ファイル、ディレクトリのpathを表示します

stat storage

> stat storage
storages[roma].storage.storage_path /home/roma/localhost_10001/roma
storages[roma].storage.st_class RubyHashStorage
storages[roma].storage.divnum 10
.
.
.
  • ROMAのstorage情報を表示します
  • st_classは使用しているstorageのタイプを表示します

    RubyHashStorage : メモリーモード
    TCStorage : TokyoCabinet
    GroongaStorage : Groonga

roma-admコマンド

telnetが使用できない/install出来ない場合は以下のroma-admコマンドでもステータスを確認できます

roma-adm <adm-command> <port No.>

$ roma-adm 'stat node' 10001
.
stats.run_receive_a_vnode {}
routing.nodes.length 2
routing.nodes ["localhost_10001", "localhost_10002"]
routing.vnodes.length 512
routing.short_vnodes 0
routing.lost_vnodes 0
routing.version_of_nodes {}
END

参照URL

ROMA Status List : http://roma-kvs.org/learn/status.html

2
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2