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.
ossutil 1.0的功能后续将不会再更新,推荐您使用全新升级的ossutil 2.0提供的list-multipart-uploads命令获取分片上传任务产生的Part。
No updates will be available to ossutil 1.0. Users are advised to migrate to the enhanced ossutil 2.0 and utilize the new list-multipart-uploads command to retrieve parts generated by multipart upload tasks.
Usage notes
To query part information, you must have the
oss:ListParts
andoss:ListMultipartUploads
permissions. For more information, see Attach a custom policy to a RAM user.For ossutil V1.6.16 and later, you can directly use ossutil as the binary name in the command line. You do not need to update the binary name based on the system. For ossutil earlier than V1.6.16, you must specify a binary name that corresponds to the system. For more information, see ossutil command reference.
For more information about multipart uploads, see Multipart upload.
Command syntax
ossutil 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:
ossutil 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 specify the endpoint of the region in which the bucket is located. If you use ossutil to switch to a bucket that belongs to another Alibaba Cloud account, add the -i option to specify the AccessKey ID of the specified account, and add the -k option 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:
ossutil getallpartsize oss://testbucket -e oss-cn-hangzhou.aliyuncs.com -i yourAccessKeyID -k yourAccessKeySecret
For more information about common options, see Common options.