zoukankan      html  css  js  c++  java
  • GreenPlum 大数据平台--web监控

    一,安装web监控界面

      01,准备

      下载greenplum cc包,>>

      解压缩

      02,安装前配置

    vim /greenplum/data/master/gpseg-1/pg_hba.conf
    local    gpperfmon   gpmon                         trust
    host     all         gpmon         127.0.0.1/28    trust
    host     all         gpmon         ::1/128         trust
    
    配置 export PGDATA=/greenplum/data/master/gpseg-1/
    
    

      03,安装

    ./gpccinstall-4.1.1

    缺少用户,执行以下命令

    gpperfmon_install --enable --password 123456 --port 5432

    然后继续执行安装命令

    [gpadmin@greenplum01 greenplum-cc-web-4.6.1-LINUX-x86_64]$ ./gpccinstall-4.6.1
           ***  IMPORTANT INFORMATION - PLEASE READ CAREFULLY  ***
    
    PIVOTAL GREENPLUM DATABASE END USER LICENSE AGREEMENT
    
    IMPORTANT - READ CAREFULLY: This Software contains computer programs and
    other proprietary material and information, the use of which is subject to
    and expressly conditioned upon acceptance of this End User License
    Agreement ("EULA").
    
    .................(慢慢点跳过)
    Rev: Pivotal_GPDB_EULA_03182014.txt
    I HAVE READ AND AGREE TO THE TERMS OF THE ABOVE PIVOTAL GREENPLUM DATABASE
    END USER LICENSE AGREEMENT.
    Do you agree to the Pivotal Greenplum Command Center End User License Agreement? Yy/Nn (Default=Y)
    Y
    
    Where would you like to install Greenplum Command Center? (Default=/usr/local)
    /home/gpadmin/greenplum-web
    
    Path not exist, create it? Yy/Nn (Default=Y)
    y
    
    What would you like to name this installation of Greenplum Command Center? (Default=gpcc)
    
    
    What port would you like gpcc webserver to use? (Default=28080)
    
    
    Would you like to enable kerberos? Yy/Nn (Default=N)
    
    
    Would you like enable SSL? Yy/Nn (Default=N)
    
    
    Please choose a display language (Default=English)
    1.  English
    2.  Chinese
    2
    2019/03/13 03:31:28 GPCC [version 4.6.1] may not be fully compatible with GPDB [installed version 5.16].
    Please reference the version compatibility in the GPCC documentation (gpcc.docs.pivotal.io/461)
    
    Installation in progress...
    2019/03/13 03:31:37
    Successfully installed Greenplum Command Center.
    gpscp -h greenplum02 $MASTER_DATA_DIRECTORY/pg_hba.conf =:$MASTER_DATA_DIRECTORY/
    gpscp -h greenplum02 ~/.pgpass =:~/   

      04,查看

    [gpadmin@greenplum01 greenplum-cc-web-4.6.1-LINUX-x86_64]$ psql -d 'gpperfmon' -c 'select * from system_now;' ctime | hostname | mem_total | mem_used | mem_actual_used | mem_actual_free | swap_total | swap_used | swap_
    page_in | swap_page_out | cpu_user | cpu_sys | cpu_idle | load0 | load1 | load2 | quantum | disk_ro_rate | di
    sk_wo_rate | disk_rb_rate | disk_wb_rate | net_rp_rate | net_wp_rate | net_rb_rate | net_wb_rate
    -------+----------+-----------+----------+-----------------+-----------------+------------+-----------+------
    --------+---------------+----------+---------+----------+-------+-------+-------+---------+--------------+---
    -----------+--------------+--------------+-------------+-------------+-------------+-------------
    (0 rows)
    
    [gpadmin@greenplum01 greenplum-cc-web-4.6.1-LINUX-x86_64]$

    二,配置环境变量

      01,所有机器:

    .bash_profile里面添加

    source /home/gpadmin/greenplum-web/greenplum-cc-web-4.6.1/gpcc_path.sh
    然后
    source .bashrc

      02,启动服务

    gpcc start

    添加允许客户端

    host     all         gpmon        192.168.0.221/24     md5

      03,访问

    账号:gpmon 密码123456

     常用:

     

     1 gpstart 默认安装完成会自动开启,启动数据库
     2 
     3 gpstate{-f 查看standby状态} 查看数据库状态
     4 
     5 gpstop 关闭数据库
     6 
     7 psql -l 列出所有数据库
     8 
     9 gpstop -M fast 快速关闭
    10 
    11 gpstop –r 重启
    12 
    13 gpstop –u 重新加载配置文件
    14 
    15 createdb -p 5432 -e -U gpadmin dbname 创建数据库
    16 
    17 gpconfig -c 参数名称 -v 参数值(若果master和segment不一样,name在后面指定-m master参数值) 批量修改系统配置文件参数
    View Code
     1 alter role gpadmin with password '123456'; --户名创建密码
     2 
     3 select * from gp_segment_configuration; --查看segment配置
     4 
     5 select * from pg_filespace_entry; --查看文件系统
     6 
     7 d+ <tablename> --查看表结构
     8 
     9 dt --显示表
    10 
    11 l --显示数据库
    12 
    13 q 退出
    View Code

      

  • 相关阅读:
    Scala-文件操作
    python-数字
    python-访问模型
    scala-包
    Scala对象
    Scala-类
    sql存储过程
    sql视图
    sql基本语句
    sql中级语句
  • 原文地址:https://www.cnblogs.com/kingle-study/p/10523512.html
Copyright © 2011-2022 走看看