All Products
Search
Document Center

Object Storage Service:getallpartsize

Last Updated:Apr 02, 2024

This topic describes how to run the getallpartsize command to obtain the size of each part generated and the total size of all parts in incomplete multipart upload tasks.

Usage notes

  • To query part information, you must have the oss:ListParts and oss:ListMultipartUploads permissions. For more information, see Attach a custom policy to a RAM user.

  • This topic provides sample command lines that work on the 64-bit Linux system. For other systems, replace ./ossutil64 in the commands with the corresponding binary name. For more information, see ossutil command reference.

  • For more information about multipart uploads, see Multipart upload.

Command syntax

./ossutil64 getallpartsize oss://bucketname

The bucketname value specifies the name of the bucket that contains parts in incomplete multipart upload tasks.

Examples

The following sample command lists all parts that are generated in incomplete multipart upload tasks in the examplebucket bucket:

./ossutil64 getallpartsize oss://examplebucket

The following sample output returns part information such as the part number, total part size, and upload ID.

PartNumber      UploadId                                Size(Byte)      Path
1               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
2               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
3               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
4               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
5               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
6               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt

total part count:6     total part size(MB):300.00
0.142115(s) elapsed

Common options

If you use ossutil to switch to a bucket that is located in another region, add the -e option to the command to specify the endpoint of the region in which the specified bucket is located. If you use ossutil to switch to a bucket that belongs to another Alibaba Cloud account, you can add the -i option to the command to specify the AccessKey ID of the specified account, and add the -k option to the command to specify the AccessKey secret of the specified account.

For example, if you want to query parts generated in incomplete multipart upload tasks in the testbucket bucket owned by another Alibaba Cloud account in the China (Hangzhou) region, run the following command:

./ossutil64 getallpartsize oss://testbucket -e oss-cn-hangzhou.aliyuncs.com -i LTAI4Fw2NbDUCV8zYUzA****  -k 67DLVBkH7EamOjy2W5RVAHUY9H****

For more information about common options, see Common options.