Getting bucket information and statistics
Getting bucket information
To view full information about a bucket:
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
See a description of the CLI command to get bucket information:
yc storage bucket get --help
-
Get a list of buckets in the default folder:
yc storage bucket list
Result:
+------------------+----------------------+----------+-----------------------+---------------------+ | NAME | FOLDER ID | MAX SIZE | DEFAULT STORAGE CLASS | CREATED AT | +------------------+----------------------+----------+-----------------------+---------------------+ | first-bucket | b1gmit33ngp6******** | 0 | STANDARD | 2022-12-16 13:58:18 | +------------------+----------------------+----------+-----------------------+---------------------+
-
Save the name of the bucket (
NAME
column) you want to get information on. -
Get the bucket information:
yc storage bucket get <bucket_name> --full
Result:
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: {}
Getting bucket statistics
To view the statistics for a bucket:
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
See a description of the CLI command to get bucket statistics:
yc storage bucket stats --help
-
Get a list of buckets in the default folder:
yc storage bucket list
Result:
+------------------+----------------------+----------+-----------------------+---------------------+ | NAME | FOLDER ID | MAX SIZE | DEFAULT STORAGE CLASS | CREATED AT | +------------------+----------------------+----------+-----------------------+---------------------+ | first-bucket | b1gmit33ngp6******** | 0 | STANDARD | 2022-12-16 13:58:18 | +------------------+----------------------+----------+-----------------------+---------------------+
-
Save the name of the bucket (
NAME
column) you want to get statistics on. -
Get the bucket statistics:
yc storage bucket stats <bucket_name>
Result:
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"