openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #18787
Re: [Swift] retrieve tenant-level, account-level and container-level usage information
At least, you can get byes-used and count statistics information by using
GET operation on account/container/object.
here's an example for account level:
Request: GET
http://localhost:8080/v1.0/AUTH_3cf0193e7e5d45e0945d0b377528faed/?format=json
Response:
Headers:
X-Account-Bytes-Used: 291041353
X-Account-Container-Count: 4
X-Account-Object-Count: 574
...
Body:
[{"count": 0, "bytes": 0, "name": "audio"}, {"count": 1, "bytes":
129461, "name": "publicContainer"}, {"count": 572, "bytes": 290757640,
"name": "rmobjects"}, {"count": 1, "bytes": 154252, "name": "video"}]
Or you can use swift CLI command to get these information:
#swift stat
Account: AUTH_3cf0193e7e5d45e0945d0b377528faed
Containers: 4
Objects: 574
Bytes: 291041353
Accept-Ranges: bytes
X-Timestamp: 1352438477.08951
X-Trans-Id: tx8d25d73cdb7445deb83b9128bfcf8d32
Content-Type: text/plain; charset=utf-8
#swift stat rmobjects
Account: AUTH_3cf0193e7e5d45e0945d0b377528faed
Container: rmobjects
Objects: 572
Bytes: 290757640
Read ACL:
Write ACL:
Sync To:
Sync Key:
Accept-Ranges: bytes
X-Timestamp: 1352686747.07211
X-Trans-Id: tx0500ad5584e54be4917f1b187cca2485
Content-Type: text/plain; charset=utf-8
-Edward Zhang
ning2008wisc
<ning2008wisc@gma
il.com> To
Sent by: openstack@xxxxxxxxxxxxxxxxxxx,
openstack-bounces cc
+zhuadl=cn.ibm.co
m@lists.launchpad Subject
.net [Openstack] [Swift] retrieve
tenant-level, account-level and
container-level usage information
2012-11-13 上午
10:35
Hello All,
Is there any Swift (GUI or command line) tool that can retrieve the
tenant-level, account-level and container-level usage information
(e.g. how large space has been used under an account, how large
space has been used under a tenant) and also works with keystone?
Thanks,
Ning_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp
References