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

Oleg Gelbukh ogelbukh at mirantis.com
Tue Nov 13 14:51:15 UTC 2012


Hello, Ning,

On the second question: Keystone 'tenant' maps to 'account' in Swift.
Keystone 'user' directly corresponds to Swift 'user'.

--
Best regards,
Oleg Gelbukh
Mirantis IT


On Tue, Nov 13, 2012 at 12:19 PM, ning2008wisc <ning2008wisc at gmail.com>wrote:

> Thanks Alex!
>
> But, it seems that "Swift -V2 -A" can not show
> separate usage stat for differnt users in the
> same account (tenant)? Is there any technical
> difficulty/reason why the usage stat for a certian
> user (under a tenant name) can not be shown by
> "Swift -V2 -A" ? or there is no sense to do that?
>
> One more question: What "tenant" means to the
> Swift? What is the relationship between "tenant"
> and "user" in keystone and Swift?
>
> Thanks,
>
> Ning
>
>
>
> On Mon, Nov 12, 2012 at 10:01 PM, Alex Yang <alex890714 at gmail.com> wrote:
>
>> 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
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121113/70a32875/attachment.html>


More information about the Openstack mailing list