--创建报告文件
touch /home/om/wdrTestNode.html
--连接数据库
gsql -d postgres -p 端口号 -r
--查询已经生成的快照。
openGauss=# select * from snapshot.snapshot;
snapshot_id | start_ts | end_ts
-------------+-------------------------------+-------------------------------
1 | 2020-09-07 10:20:36.763244+08 | 2020-09-07 10:20:42.166511+08
2 | 2020-09-07 10:21:13.416352+08 | 2020-09-07 10:21:19.470911+08
(2 rows)
--生成格式化性能报告wdrTestNode.html。
openGauss=# \a \t \o /home/om/wdrTestNode.html
Output format is unaligned.
Showing only tuples.
--向性能报告wdrTestNode.html中写入数据。
openGauss=# select generate_wdr_report(1, 2, 'all', 'node', 'dn_6001_6002_6003');
--关闭性能报告wdrTestNode.html。
openGauss=# \o
--生成格式化性能报告wdrTestCluster.html。
openGauss=# \o /home/om/wdrTestCluster.html
--向格式化性能报告wdrTestCluster.html中写入数据。
openGauss=# select generate_wdr_report(1, 2, 'all', 'cluster');
--关闭性能报告wdrTestCluster.html。
openGauss=# \o \a \t
Output format is aligned.
Tuples only is off.




