[Openstack] [Swift] account-level and container-level usage information

Alex Yang alex890714 at gmail.com
Tue Nov 13 06:01:00 UTC 2012


Hi,
The python-swiftclient(https://github.com/openstack/python-swiftclient) can
retrieve the account-level and container-level usage infomation.

To retrieve the account usage information:
$ swift -V 2 -A http://127.0.0.1:5000/v2.0 -U tenant1:swift_user -K
19561212 stat
   Account: AUTH_70b51a6d180f4f1da78d80316c69e85c
Containers: 10
   Objects: 0
     Bytes: 0
Meta Quota: L1
Accept-Ranges: bytes
X-Timestamp: 1352735608.55267
X-Trans-Id: tx72878dfcba9948298a6f4efb4e51e569

To retrieve the container usage information:
$ swift -V 2 -A http://127.0.0.1:5000/v2.0 -U tenant1:swift_user -K
19561212 stat c1
No handlers could be found for logger "keystoneclient.v2_0.client"
  Account: AUTH_70b51a6d180f4f1da78d80316c69e85c
Container: c1
  Objects: 0
    Bytes: 0
 Read ACL:
Write ACL:
  Sync To:
 Sync Key:
Accept-Ranges: bytes
X-Timestamp: 1352735637.83676
X-Trans-Id: tx7968942b927b4f1fba0c40fb1372adba

You can also use the REST API,
http://docs.openstack.org/cli/quick-start/content/swift_client_commands.html

But the bytes and objects of account is not accurate.
You can get the accurate result by retrieve all the containers and add them
up.


2012/11/13 Ning Zhang <ning at zmanda.com>

> Hello All,
>
> Is there any Swift (GUI or command line) tool that can
> retrieve the 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 at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>



-- 
  杨雨
  Email:       alex890714 at gmail.com
GitHub:       https://github.com/AlexYangYu
    Blog:        http://alexyang.sinaapp.com
 Weibo:       http://www.weibo.com/alexyangyu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121113/aff552bc/attachment.html>


More information about the Openstack mailing list