SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
s3.bucket.list: measure quota usage by logical size (#10274)
Chris Lu11fd20e2b093
diff --git a/weed/shell/command_s3_bucket_list.go b/weed/shell/command_s3_bucket_list.goindex 94eb2f8ba3..b000652f74 100644--- a/weed/shell/command_s3_bucket_list.go+++ b/weed/shell/command_s3_bucket_list.go@@ -64,14 +64,15 @@ func (c *commandS3BucketList) Do(args []string, commandEnv *CommandEnv, writer ireturn nil}collection := getCollectionName(commandEnv, entry.Name)- var collectionSize, fileCount float64+ var collectionSize, logicalSize, fileCount float64if collectionInfo, found := collectionInfos[collection]; found {collectionSize = collectionInfo.Size+ logicalSize = collectionInfo.LogicalSize()fileCount = collectionInfo.FileCount - collectionInfo.DeleteCount}- fmt.Fprintf(writer, " %s\tsize:%.0f\tchunk:%.0f", entry.Name, collectionSize, fileCount)+ fmt.Fprintf(writer, " %s\tsize:%.0f\tlogical:%.0f\tchunk:%.0f", entry.Name, collectionSize, logicalSize, fileCount)if entry.Quota > 0 {- fmt.Fprintf(writer, "\tquota:%d\tusage:%.2f%%", entry.Quota, float64(collectionSize)*100/float64(entry.Quota))+ fmt.Fprintf(writer, "\tquota:%d\tusage:%.2f%%", entry.Quota, logicalSize*100/float64(entry.Quota))}// Show bucket owner (use %q to escape special characters)if entry.Extended != nil {