[Yandex Cloud documentation](../../../index.md) > [Yandex Object Storage](../../index.md) > [Step-by-step guides](../index.md) > Buckets > Getting bucket information and statistics

# Getting bucket information and statistics

## Getting bucket information {#get-information}

To view full information about a [bucket](../../concepts/bucket.md):

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select a folder.
  1. Navigate to **Object Storage**.
  1. Select the bucket from the list.
  1. In the left-hand panel, select the appropriate section with bucket information.
     * ![image](../../../_assets/console-icons/folder-tree.svg) **Objects**: List of objects stored in the bucket.
     * ![image](../../../_assets/console-icons/wrench.svg) **Settings**: Main bucket settings, information about website hosting in the bucket, versioning, logging, and lifecycles of bucket objects.
     * ![image](../../../_assets/console-icons/persons-lock.svg) **Security**: Description of access permissions and policy in the bucket, information about HTTPS and CORS configurations, object locks and object encryption in the bucket.

- Yandex Cloud CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the CLI command for getting bucket information:

     ```bash
     yc storage bucket get --help
     ```

  1. Get a list of buckets in the default folder:
     
     ```bash
     yc storage bucket list
     ```
     
     Result:
     
     ```text
     +------------------+----------------------+-------------+-----------------------+---------------------+
     |       NAME       |      FOLDER ID       |  MAX SIZE   | DEFAULT STORAGE CLASS |     CREATED AT      |
     +------------------+----------------------+-------------+-----------------------+---------------------+
     | first-bucket     | b1gmit33ngp6******** | 53687091200 | STANDARD              | 2022-12-16 13:58:18 |
     +------------------+----------------------+-------------+-----------------------+---------------------+
     ```
  1. Save the name (from the `NAME` column) of the bucket you want to get information about.

  1. Get bucket info:

     ```bash
     yc storage bucket get <bucket_name> --full
     ```

     Result:

     ```text
     name: first-bucket
     folder_id: b1gmit33ngp6********
     anonymous_access_flags:
       read: false
       list: false
       config_read: false
     default_storage_class: ICE
     versioning: VERSIONING_ENABLED
     max_size: "5368709120"
     acl:
       grants:
         - permission: PERMISSION_READ
           grant_type: GRANT_TYPE_ACCOUNT
           grantee_id: ajep03tkmqqr********
     created_at: "2023-04-10T19:41:30.266075Z"
     website_settings:
       index: index.html
       error: 404.html
       redirect_all_requests: {}
     ```

{% endlist %}

## Getting bucket statistics {#get-statistics}

To view bucket statistics:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select a folder.
  1. Navigate to **Object Storage**. 
  1. Select the bucket from the list.
  1. In the left-hand panel, select ![image](../../../_assets/console-icons/display-pulse.svg) **Monitoring**.
  1. On the page that opens, you can view bucket statistics for a certain period:
     
     The page displays the following dashboards:
     
     * ![image](../../../_assets/console-icons/chart-column.svg) **Read Requests**: Number of `GET`, `HEAD`, `LIST`, and `OPTIONS` requests.
     * ![image](../../../_assets/console-icons/chart-column.svg) **Modify Requests**: Number of `PUT`, `POST`, and `DELETE` requests.
     * ![image](../../../_assets/console-icons/chart-column.svg) **Traffic**: Outgoing traffic size.
     * ![image](../../../_assets/console-icons/chart-column.svg) **Objects counts**: Number of bucket objects.
     * ![image](../../../_assets/console-icons/chart-column.svg) **Space by object type**: Used storage space by object type (single part objects, multipart objects, or object parts).
     * ![image](../../../_assets/console-icons/chart-column.svg) **Space by storage type**: Used storage space used by storage class.


- Yandex Cloud CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the CLI command for getting bucket statistics:

     ```bash
     yc storage bucket stats --help
     ```

  1. Get a list of buckets in the default folder:
     
     ```bash
     yc storage bucket list
     ```
     
     Result:
     
     ```text
     +------------------+----------------------+-------------+-----------------------+---------------------+
     |       NAME       |      FOLDER ID       |  MAX SIZE   | DEFAULT STORAGE CLASS |     CREATED AT      |
     +------------------+----------------------+-------------+-----------------------+---------------------+
     | first-bucket     | b1gmit33ngp6******** | 53687091200 | STANDARD              | 2022-12-16 13:58:18 |
     +------------------+----------------------+-------------+-----------------------+---------------------+
     ```
  1. Save the name (from the `NAME` column) of the bucket you want to get statistics on.

  1. Get bucket statistics:

     ```bash
     yc storage bucket stats <bucket_name>
     ```

     Result:

     ```text
     name: first-bucket
     max_size: "5368709120"
     used_size: "621552"
     storage_class_used_sizes:
       - storage_class: STANDARD
         class_size: "607467"
       - storage_class: COLD
         class_size: "14085"
     storage_class_counters:
       - storage_class: STANDARD
         counters:
           simple_object_size: "607467"
           simple_object_count: "41"
       - storage_class: COLD
         counters:
           simple_object_size: "14085"
           simple_object_count: "16"
     default_storage_class: ICE
     anonymous_access_flags:
       read: false
       list: false
       config_read: false
     created_at: "2023-04-10T19:41:30.266075Z"
     updated_at: "2023-08-02T04:05:44.564924Z"
     ```

{% endlist %}