greenplum - 簡單常用查看gp狀態命令

  1. 啓動/關閉
gpstart

gpstop -M fast
gpstop -m
gpstop --host sdw1 # 只關一個節點
  1. 查看狀態
gpstate -b # brief status
gpstate -c # show primary to mirror mappings
gpstate -e # show segments with mirror status issues
gpstate -f # show standby master details
gpstate -i # show Greenplum Database version
gpstate -m # list mirrors
gpstate -p # show ports
gpstate -Q # quick status
gpstate -s # detailed status
  1. ANALYZE
analyzedb 
-d database 
-s schema 
-t schema.table 
-i col1,col2,col3 
-x col11,col12,col13
--skip_root_stats     This option is no longer used. Please remove it from
                      your scripts.
--gen_profile_only    Create cached state files to indicate specified table
                      or all tables have been analyzed.
--full                Analyze without using incremental. All tables
                      requested by the user will be analyzed.
--clean_last          Clean the state files generated by last analyzedb run.
                      All other options except -d will be ignored.
--clean_all           Clean all the state files generated by analyzedb. All
                      other options except -d will be ignored.

When to Run ANALYZE
Run ANALYZE:
after loading data,
after CREATE INDEX operations,
and after INSERT, UPDATE, and DELETE operations that significantly change the underlying data.

  1. 檢查 catalog
gpcheckcat -U gpadmin -A -p 5432
  1. 節點性能
# 查看所有節點的磁盤性能及內存性能
gpcheckperf -f /usr/local/greenplum-dball_segments -d /data/greenplum/data1 -d /data/greenplum/data2 -r ds

# 節點之間磁盤性能
gpcheckperf -h sdw1 -h sdw2 -d /data1 -r d -D -v

# 查看節點之間網絡狀況
gpcheckperf -f /usr/local/greenplum-dball_segments -r N -d /tmp
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章