检查数据库性能
gs_checkperf
1. 以简要格式在屏幕上显示性能统计结果。
gs_checkperf -i pmk -U omm
2. 以详细格式在屏幕上显示性能统计结果。
gs_checkperf -i pmk -U omm --detai
确认数据库主节点的端口号
在1.2查到的数据库主节点数据路径下的postgresql.conf文件中查看端口号信息。示例如下:
cat /opt/gaussdb/master1/postgresql.conf |grep port
[omm@openGauss01 ~]$ cat /opt/gaussdb/master1/postgresql.conf |grep port
port = '36000' # (change requires restart)
#ssl_renegotiation_limit = 0 # amount of data between renegotiations, no longer supported
# supported by the operating system:
- 36000为数据库主节点的端口号
- 端口号在安装数据库时,会在xml文件中配置,查看安装时的xml配置文件也可以找到端口。
列出所有可用的数据库
gsql -d postgres -p 36000 -l
[omm@openGauss01 ~]$ gsql -d postgres -p 36000 -l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+-------+-----------+---------+-------+-------------------
db1 | song | SQL_ASCII | C | C |
db2 | song | SQL_ASCII | C | C |
kwdb | kw | SQL_ASCII | C | C |
mydb | song | GBK | C | C |
postgres | omm | SQL_ASCII | C | C |
song_suse | song | SQL_ASCII | C | C |
template0 | omm | SQL_ASCII | C | C | =c/omm +
| | | | | omm=CTc/omm
template1 | omm | SQL_ASCII | C | C | =c/omm +
| | | | | omm=CTc/omm
(8 rows)
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




