Thanks Alex!<br><br>But, it seems that "Swift -V2 -A" can not show <br>separate usage stat for differnt users in the <br>same account (tenant)? Is there any technical <br>difficulty/reason why the usage stat for a certian <br>
user (under a tenant name) can not be shown by <br>"Swift -V2 -A" ? or there is no
sense to do that?<br><br>One more question: What "tenant" means to the <br>Swift? What is the relationship between "tenant" <br>and "user" in keystone and Swift?<br><br>Thanks,<br><br>Ning<br>
<br><br><div class="gmail_quote">On Mon, Nov 12, 2012 at 10:01 PM, Alex Yang <span dir="ltr"><<a href="mailto:alex890714@gmail.com" target="_blank">alex890714@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div>The python-swiftclient(<a href="https://github.com/openstack/python-swiftclient" target="_blank">https://github.com/openstack/python-swiftclient</a>) can retrieve the account-level and container-level usage infomation.</div>
<div><br>
</div><div>To retrieve the account usage information:</div><div>$ swift -V 2 -A <a href="http://127.0.0.1:5000/v2.0" target="_blank">http://127.0.0.1:5000/v2.0</a> -U tenant1:swift_user -K 19561212 stat<br></div><div><div>
Account: AUTH_70b51a6d180f4f1da78d80316c69e85c</div>
<div>Containers: 10</div><div> Objects: 0</div><div> Bytes: 0</div><div>Meta Quota: L1</div><div>Accept-Ranges: bytes</div><div>X-Timestamp: 1352735608.55267</div><div>X-Trans-Id: tx72878dfcba9948298a6f4efb4e51e569</div>
</div><div><br></div><div>To retrieve the container usage information:</div><div><div>$ swift -V 2 -A <a href="http://127.0.0.1:5000/v2.0" target="_blank">http://127.0.0.1:5000/v2.0</a> -U tenant1:swift_user -K 19561212 stat c1</div>
<div>
No handlers could be found for logger "keystoneclient.v2_0.client"</div><div> Account: AUTH_70b51a6d180f4f1da78d80316c69e85c</div><div>Container: c1</div><div> Objects: 0</div><div> Bytes: 0</div><div> Read ACL: </div>
<div>Write ACL: </div><div> Sync To: </div><div> Sync Key: </div><div>Accept-Ranges: bytes</div><div>X-Timestamp: 1352735637.83676</div><div>X-Trans-Id: tx7968942b927b4f1fba0c40fb1372adba</div></div><div><br></div><div>
You can also use the REST API, <a href="http://docs.openstack.org/cli/quick-start/content/swift_client_commands.html" target="_blank">http://docs.openstack.org/cli/quick-start/content/swift_client_commands.html</a></div>
<div><br></div><div>But the bytes and objects of account is not accurate.</div><div>You can get the accurate result by retrieve all the containers and add them up.</div><div class="gmail_extra"><div><div class="h5"><br><br>
<div class="gmail_quote">
2012/11/13 Ning Zhang <span dir="ltr"><<a href="mailto:ning@zmanda.com" target="_blank">ning@zmanda.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello All,<br>
<br>
Is there any Swift (GUI or command line) tool that can<br>
retrieve the account-level and<br>
container-level usage information (e.g. how large space<br>
has been used under an account, how large space has been<br>
used under a tenant) and also works with keystone?<br>
<br>
Thanks,<br>
<br>
Ning<br>
<br>
<br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br> 杨雨<div> Email: <a href="mailto:alex890714@gmail.com" target="_blank">alex890714@gmail.com</a><div>
GitHub: <a href="https://github.com/AlexYangYu" target="_blank">https://github.com/AlexYangYu</a></div>
<div> Blog: <a href="http://alexyang.sinaapp.com" target="_blank">http://alexyang.sinaapp.com</a></div><div> Weibo: <a href="http://www.weibo.com/alexyangyu" target="_blank">http://www.weibo.com/alexyangyu</a></div>
</div><br>
</font></span></div>
<br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br>