<html><head></head><body>Test<br><br><div class="gmail_quote"><br>
<br>
libvirt-users-request@redhat.com schrieb:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Send libvirt-users mailing list submissions to<br /> libvirt-users@redhat.com<br /><br />To subscribe or unsubscribe via the World Wide Web, visit<br /> <a href="https://www.redhat.com/mailman/listinfo/libvirt-users">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br />or, via email, send a message with subject or body 'help' to<br /> libvirt-users-request@redhat.com<br /><br />You can reach the person managing the list at<br /> libvirt-users-owner@redhat.com<br /><br />When replying, please edit your Subject line so it is more specific<br />than "Re: Contents of libvirt-users digest..."<br /><br /><br />Today's Topics:<br /><br />1. Finding out CPU topology. (Peeyush Gupta)<br />2. Re: Finding out CPU topology. (Daniel P. Berrange)<br />3. Re: Finding out CPU topology. (Peeyush Gupta)<br /><br /><br /><hr /><br /><br />Message: 1<br />Date: Tue, 17 Sep 2013 17:41:12 +0800 (SGT)<br />From: Peeyush Gupta <gpeeyush@ymail.com><br />To:
"libvirt-users@redhat.com" <libvirt-users@redhat.com><br />Subject: [libvirt-users] Finding out CPU topology.<br />Message-ID:<br /> <1379410872.26498.YahooMailNeo@web194604.mail.sg3.yahoo.com><br />Content-Type: text/plain; charset="iso-8859-1"<br /><br />Hi all,<br /><br />I have been trying to find out cpu topology using libvirt. When<br />I do 'virsh capabilites', I find this inside <topology> tag:<br /><br /><br /><topology><br />? ? ? <cells num='1'><br />? ? ? ? <cell id='0'><br />? ? ? ? ? <memory unit='KiB'>3908488</memory><br />? ? ? ? ? <cpus num='4'><br />? ? ? ? ? ? <cpu id='0' socket_id='0' core_id='0' siblings='0'/><br />? ? ? ? ? ? <cpu id='1' socket_id='0' core_id='0' siblings='1'/><br />? ? ? ? ? ? <cpu id='2' socket_id='0' core_id='1' siblings='2'/><br />? ? ? ? ? ? <cpu id='3' socket_id='0' core_id='1' siblings='3'/><br />? ? ? ? ? </cpus><br />? ? ? ? </cell><br />?!
  ? ?
</cells><br /></topology><br /><br />But when I use the 'getCapbilities()' function of the python binding,<br />the result is:<br /><topology> ? ?<br />? <cells num='1'> ??<br />? ? ?<cell id='0'> ? ? ? ??<br />? ? ?<cpus num='4'> ??<br />? ? ? ?<cpu id='0'/><br />? ? ? ?<cpu id='1'/><br />? ? ? ?<cpu id='2'/><br />? ? ? ?<cpu id='3'/> ? ? ? ??<br />? ? ?</cpus> ? ? ? ?<br />? ?</cell> ? ? ?<br />?</cells> ?<br /></topology>\n<br /><br />As you can see this doesnt give any information about socket/core/thread etc.<br />What I an interested to know is that is it a limitation of python binding or libvirt<br />C API itself? How can I get the whole topology without just parsing the output<br />of virsh capabilities?<br /><br />Thanks.<br />~Peeyush Gupta<br />-------------- next part --------------<br />An HTML attachment was scrubbed...<br />URL: <<a
href="https://www.redhat.com/archives/libvirt-users/attachments/20130917/ff834444/attachment.html">https://www.redhat.com/archives/libvirt-users/attachments/20130917/ff834444/attachment.html</a>><br /><br /><hr /><br /><br />Message: 2<br />Date: Tue, 17 Sep 2013 10:49:29 +0100<br />From: "Daniel P. Berrange" <berrange@redhat.com><br />To: Peeyush Gupta <gpeeyush@ymail.com><br />Cc: "libvirt-users@redhat.com" <libvirt-users@redhat.com><br />Subject: Re: [libvirt-users] Finding out CPU topology.<br />Message-ID: <20130917094929.GD28204@redhat.com><br />Content-Type: text/plain; charset=utf-8<br /><br />On Tue, Sep 17, 2013 at 05:41:12PM +0800, Peeyush Gupta wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Hi all,<br /><br />I have been trying to find out cpu topology using libvirt. When<br />I do 'virsh capabilites', I find this inside <topology> tag:<br /><br /><!
 br
/><topology><br />? ? ? <cells num='1'><br />? ? ? ? <cell id='0'><br />? ? ? ? ? <memory unit='KiB'>3908488</memory><br />? ? ? ? ? <cpus num='4'><br />? ? ? ? ? ? <cpu id='0' socket_id='0' core_id='0' siblings='0'/><br />? ? ? ? ? ? <cpu id='1' socket_id='0' core_id='0' siblings='1'/><br />? ? ? ? ? ? <cpu id='2' socket_id='0' core_id='1' siblings='2'/><br />? ? ? ? ? ? <cpu id='3' socket_id='0' core_id='1' siblings='3'/><br />? ? ? ? ? </cpus><br />? ? ? ? </cell><br />? ? ? </cells><br /></topology><br /><br />But when I use the 'getCapbilities()' function of the python binding,<br />the result is:<br /><topology> ? ?<br />? <cells num='1'> ??<br />? ? ?<cell id='0'> ? ? ? ??<br />? ? ?<cpus num='4'> ??<br />? ? ? ?<cpu id='0'/><br />? ? ? ?<cpu id='1'/><br />? ? ? ?<cpu id='2'/><br />? ? ? ?<cpu id='3'/> ? ? ? ??<br />? ? ?</cpus> ? ?!
  ? ?<br
/>? ?</cell> ? ? ?<br />?</cells> ?<br /></topology>\n<br /><br />As you can see this doesnt give any information about socket/core/thread etc.<br />What I an interested to know is that is it a limitation of python binding or libvirt<br />C API itself? How can I get the whole topology without just parsing the output<br />of virsh capabilities?</blockquote><br />Did you really run these two examples on the same machine, with the same<br />libvirt URI ? Both virsh and the python binding call the same libvirt API<br />'virConnectGetCapabilities' so will return the same data if run against<br />the same libvirt. The socket_id, core_id and siblings data is a relatively<br />new feature we added, so older libvirt won't show it.<br /><br />Daniel</pre></blockquote></div><br>
-- <br>
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.</body></html>