postgresql - 在 IBM Cloud Databases 中,是否可以使用 ibmcloud cli 查看 postgres 实例的磁盘大小?

标签 postgresql ibm-cloud

我在 IBM Cloud 数据库上部署了 Postgres,并且我正在尝试以编程方式获取它使用的资源,即磁盘、RAM 和 CPU。最好的方法是什么?

最佳答案

您可以使用 IBM Cloud CLI 查询部署中的资源。 您需要CLI itselfcloud databases plugin 。 然后,您可以使用 groups 命令获取部署的资源列表:

ibmcloud cdb groups <CRN> --json

您将得到如下输出:

{
 "groups": [
  {
   "id": "member",
   "count": 2,
   "memory": {
    "units": "mb",
    "allocation_mb": 2048,
    "minimum_mb": 2048,
    "step_size_mb": 256,
    "is_adjustable": true
   },
   "cpu": {
    "units": "count",
    "allocation_count": 0,
    "minimum_count": 6,
    "step_size_count": 2,
    "is_adjustable": true
   },
   "disk": {
    "units": "mb",
    "allocation_mb": 10240,
    "minimum_mb": 10240,
    "step_size_mb": 1024,
    "is_adjustable": true
   }
  }
 ]
}

CRN 是您的云数据库部署的唯一标识符。

上述命令适用于所有数据库部署,即也适用于 MySQL、MongoDB、Elastic 和其他 IBM Cloud Databases

关于postgresql - 在 IBM Cloud Databases 中,是否可以使用 ibmcloud cli 查看 postgres 实例的磁盘大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75158487/

相关文章:

postgresql - 不使用 Postgres 索引

PostgreSql:如何从数组更新表?

node.js - Cloudant NodeJS 出现意外 `server_admin required` 错误

node.js - Bluemix Node+Cloudant 样板 - EOF 错误

java - ObjectStore Bluemix 连接 java

ruby-on-rails - ActiveRecord:获取在特定日期没有创建 child 的 parent 的范围

php - 将 SQL 表反序列化为对象集合

swift - 在 Swift 中为具有命名冲突的 Objective-C 类覆盖 init 方法

nginx - 如何在 IBM Bluemix 上的 Kubernetes 中向入口资源添加 websocket 支持?

postgresql - 如何为 postgresql 序列指定值列表