Home > database >  GBase 8 a database cluster operations inspection maintenance simplified version of the common comman
GBase 8 a database cluster operations inspection maintenance simplified version of the common comman

Time:09-16

GBase 8 a cluster operations command simplified version
============================================
The latest version of the http://www.gbase8.cn/? P=657
The official BBS http://www.gbase8a.com
Private web site http://www.gbase8.cn
============================================
1, check to see if the cluster normal
1.1 check the cluster status
Gcadmin
1.2 check the cluster data inconsistencies
Gcadmin showdmlevent
Gcadmin showddlevent
Gcadmin showdmlstorageevent
2, the cluster command line, used to execute SQL command
Su - gbase
Interactive mode gccli - uUsername - pPassword - hIP
Simple implementation gccli - uUsername - pPassword - hIP - e "show the processlist"
Batch file gccli - uUsername - pPassword - hIP & lt; AllSQL. TXT
3, check the cluster running SQL
3.1 a specified node
Simple show the processlist
Complete the show full the processlist
Detailed show the detail the processlist
3.2 all the nodes
Select COORDINATOR_NAME, ID, user, host, and command, start_time, time, the state, the substring (0100) the info, the info from information_schema. COORDINATORS_TASK_INFORMATION where the command='query' and time & gt;=0 order by time desc;
4, export data
RMT: select * from ac08 where btime between '2020-01-01' and '2020-02-01 s' into outfile'/opt/ac08. TXT 'fields terminated by', 'ENCLOSED by the' "' null_value '\ N'
5, loading data
The load data infile 'ftp://gbase:[email protected]//opt/ac08.txt' into table ac08 NULL_VALUE '\ N' fields terminated by ', 'ENCLOSED by' "' DATETIME FORMAT '% % m - Y H: % d % % I:' % s'
With the date of the millisecond
The load data infile 'ftp://gbase:[email protected]//opt/ac08.txt' into table ac08 NULL_VALUE '\ N' fields terminated by ', 'ENCLOSED by' "' DATETIME FORMAT '% % m - Y H: % d % % I: % s. % f
'6, view the current loading schedule
The select db_name tb_name, IP, the state, start_time, progress, total_size, loaded_size, loaded_records, skipped_records from information_schema. Load_status order by db_name, tb_name;
7, view the history load results
The select task_id db_name, tb_name, user, HOST_IP, start_time, end_time, elapsed_time, total_size, loaded_records, skipped_records from information_schema. Load_result where start_time & gt; '2020-07-26' order by start_time;
8, see table, stored procedure, function
Show tables;
Show tables like '% XXX %';
The show function status.
Show procedure status;
9, see table, function, structure of the stored procedure
Show create table mytablename;
Show create procedure myProc;
Show the create function myFunc;
10, view the variable
Show variables like '% XXXX %';
Check the state of
Show status like '% meminfo %';
12, at the table takes up space
Select * from information_schema. Cluster_tables a where table_schema='testdb' and table_name='t1';
Check each shard of space
Select * from information_schema. CLUSTER_TABLE_SEGMENTS a where table_schema='testdb' and table_name='t1';
13, all kinds of log position
Default log position service process name
Gcware corosync
Service start-stop log, only to start and stop information
V8 version installation directory/gcluster/log/gcluster/corosync_system log
V9 version installation directory/gcluster/log/gcluster/gcware_system log
Service log in detail, detailed start stop information
V8 version/var/log/corosync. Log
V9 version installation directory/gcware/log/gcware log
Gcadmin command execution log
V8 version/var/log/gcware/gcware_XXXX log
V9 version installation directory/gcware liblog/gcware log
Gcluster gclusterd
The installation directory/gcluster/log/gcluster/system. The log start-stop log
The installation directory/gcluster/log/gcluster/express log engine log
The installation directory/gcluster/log/gcluster/gclusterd general log log, recording the executable SQL commands
The installation directory/gcluster/log/gcluster gclusterd - audit. The log audit log to record all command execution results
Gnode gbased installation directory/gnode/log/gbase system. The log start-stop log
The installation directory/gnode/log/gbase/express the log engine log
Syncserver gc_sync_server
The installation directory/gnode/log/gbase/syncserver log service log
The installation directory/gnode/log/gbase/syncclient_XXXX log client log
Gcrecover
The installation directory/gclusger/log/gcluster/gc_recover log operation log
The installation directory/gclusger/log/gcluster/gcrecover_taskrecord synchronous record log
The installation directory/gclusger/log/gcluster/gcrecover_system log start-stop log
Gcmonit installation directory/gclusger/log/gcluster/gcmonit log process monitoring
Gcmmonit installation directory/gclusger/log/gcluster/gcmmonit log process monitoring of monitoring

[turn laozhizhu GBase MPP operations]
  • Related