Skip to contentSkip to conversation

xenctrl domain name

DISCUSSION Shaun R. 3 participants 6 messages Aug 11, 2008

lore
Share & tools
lore

Shaun R.

author
#0 lore raw

Are there any function in the xenctrl lib (xenctrl.h) or some where else that will provide a list of domains that also returns the domains name. I've found functions like xc_domain_getinfo and xc_domain_getinfolist that return a list of domains but they do not give the domain name. If there's not, is there a function to return the name of a domain from it's id?

~Shaun

#1 lore raw

Its in xenstore.

You can use xs.h via xs_read

alternaltly from the shell:
xenstore-read /local/domain/0/name

Shaun R. wrote on 08/11/2008 03:02 PM:

Quoted 9 lines

Are there any function in the xenctrl lib (xenctrl.h) or some where else that will provide a list of domains that also returns the domains name. I've found functions like xc_domain_getinfo and xc_domain_getinfolist that return a list of domains but they do not give the domain name. If there's not, is there a function to return the name of a domain from it's id?

~Shaun

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

author
#2 lore raw

Wonder why the name is not provided with the domain info from those functions. Getting a domain list and then having to loop through xenstore until i find the name seams like extra work.

~Shaun

#3 lore raw

why would you need to loop, if you have the domid from the domain list?

Shaun R. wrote on 08/11/2008 03:30 PM:

Quoted 9 lines

Wonder why the name is not provided with the domain info from those functions. Getting a domain list and then having to loop through xenstore until i find the name seams like extra work.

~Shaun

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

author
#4 lore raw

My domains are tracked by the domain name, so if i wanted to find how much cpu the domain named george was using, i would now have to get a list of domain id's and loop through each id in the store until i found the name george... Or am i missing somthing?

~Shaun

#5 lore raw
Quoted 4 lines · Shaun R.

My domains are tracked by the domain name, so if i wanted to find how much cpu the domain named george was using, i would now have to get a list of domain id's and loop through each id in the store until i found the name george... Or am i missing somthing?

That's what you have to do unless you can cache name information some other way. Xen doesn't know about domain names hence it is not possible for the libxenctrl functions to give you faster access to names via a direct hypervisor interface.

-- Keir