throttling logs messages from qemu
I see that in 3.4.x, throttling has been changed from a file in /etc to a xenstore entry, as per the following code:
throttling = xenstore_vm_read(domid, "log-throttling", &len);
if (throttling != NULL) {
throttling_disabled = (throttling[0] - '0');
free(throttling);
}A bit of searching tells me that the full path of the key is /vm/<uuid>/log-throttling, but it appears to be read at boot. How can I get it written in there in time?
James
Quoted 9 lines · James Harper
I see that in 3.4.x, throttling has been changed from a file in /etc to a xenstore entry, as per the following code:
throttling = xenstore_vm_read(domid, "log-throttling", &len); if (throttling != NULL) { throttling_disabled = (throttling[0] - '0'); free(throttling); }
Quoted 4 lines
A bit of searching tells me that the full path of the key is /vm/<uuid>/log-throttling, but it appears to be read at boot. How can I get it written in there in time?
Good question :)
You could hack xend but it is not exactly something you want to do. Another possibility is to change your device_model in the vm config file to a bash script that does what you want and then calls qemu-dm with the right arguments.
We could probably modify qemu to read the xenstore key from another place that is easier to know before the VM is started.
Quoted 3 lines · James Harper
Quoted 1 line
I see that in 3.4.x, throttling has been changed from a file in /etc
to
Quoted 10 lines
Quoted 10 lines
a xenstore entry, as per the following code:
throttling = xenstore_vm_read(domid, "log-throttling", &len); if (throttling != NULL) { throttling_disabled = (throttling[0] - '0'); free(throttling); }A bit of searching tells me that the full path of the key is /vm/<uuid>/log-throttling, but it appears to be read at boot. How
can I
Quoted 6 lines
Quoted 2 lines
get it written in there in time?
Good question :)
You could hack xend but it is not exactly something you want to do. Another possibility is to change yourdevice_modelin the vm config
file
Quoted 1 line
to a bash script that does what you want and then calls qemu-dm with
the
Quoted 3 lines
right arguments.
We could probably modify qemu to read the xenstore key from another place that is easier to know before the VM is started.
Can we revert the patch then? I assume the citrix version of xend puts the log-throttling key in based on certain criteria but maybe it isn't appropriate for the gpl version? I mean it's pretty much useless in this form isn't it? It worked great for me as detecting the presence of a file in /etc...
Thanks
James
Quoted 5 lines · James Harper
Can we revert the patch then? I assume the citrix version of xend puts the log-throttling key in based on certain criteria but maybe it isn't appropriate for the gpl version? I mean it's pretty much useless in this form isn't it? It worked great for me as detecting the presence of a file in /etc...
I think it is important that we try to limit unneeded access from qemu to the dom0 filesystem: the fs-backend daemon was needed at boot time for stubdoms only because of the stat("/etc/disable-guest-log-throttle").
I am sure we can figure out a better alternative that works for everyone.
For example we could set a watch on xenstore for that node instead of just reading it.
Quoted 3 lines · James Harper
Quoted 1 line
Can we revert the patch then? I assume the citrix version of xend
puts
Quoted 1 line
Quoted 1 line
the log-throttling key in based on certain criteria but maybe it
isn't
Quoted 1 line
Quoted 1 line
appropriate for the gpl version? I mean it's pretty much useless in
this
Quoted 11 lines
Quoted 2 lines
form isn't it? It worked great for me as detecting the presence of a file in /etc...
I think it is important that we try to limit unneeded access from qemu to the dom0 filesystem: the fs-backend daemon was needed at boot time for stubdoms only because of the
stat("/etc/disable-guest-log-throttle").
I am sure we can figure out a better alternative that works for everyone.
For example we could set a watch on xenstore for that node instead of just reading it.
That could work. What about having a per domain config option in the standard config that 'xm create' picks up and puts in? That would be the most useful to me...
Which would be less work?
When running in a stub domain, where does the logfile go?
James
Quoted 20 lines · James Harper
Quoted 3 lines · James Harper
Quoted 1 line
Can we revert the patch then? I assume the citrix version of xend
puts
Quoted 1 line
Quoted 1 line
the log-throttling key in based on certain criteria but maybe it
isn't
Quoted 1 line
Quoted 1 line
appropriate for the gpl version? I mean it's pretty much useless in
this
Quoted 11 lines
Quoted 2 lines
form isn't it? It worked great for me as detecting the presence of a file in /etc...
I think it is important that we try to limit unneeded access from qemu to the dom0 filesystem: the fs-backend daemon was needed at boot time for stubdoms only because of the
stat("/etc/disable-guest-log-throttle").
I am sure we can figure out a better alternative that works for everyone.
For example we could set a watch on xenstore for that node instead of just reading it.
Quoted 5 lines
That could work. What about having a per domain config option in the standard config that 'xm create' picks up and puts in? That would be the most useful to me...
Which would be less work?
hacking qemu beats hacking xend anytime for me :)
Quoted 1 line
When running in a stub domain, where does the logfile go?
same place: /var/log/xen/qemu-dm-$domainname.log, besides that you also have /var/log/xen/qemu-dm-$domainname-dm.log that contains the pv qemu logs (the logs from the qemu process that runs in dom0 to provide the pv
framebuffer backend to the stubdom)