WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] PATCH: Add persistent guest & hv logging in xenconsoled

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] PATCH: Add persistent guest & hv logging in xenconsoled
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Fri, 1 Jun 2007 14:51:50 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 01 Jun 2007 06:50:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C285930C.8471%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070531213208.GD15661@xxxxxxxxxx> <C285930C.8471%Keir.Fraser@xxxxxxxxxxxx>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Fri, Jun 01, 2007 at 09:10:36AM +0100, Keir Fraser wrote:
> On 31/5/07 22:32, "Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
> 
> > The first is how to configure & pass the --log arg to xenconsoled. In the
> > upstream xen codebase the various daemons (xenstore, xenconsoled, etc)
> > are all forked by the tools/misc/xend script (typically in /usr/sbin/xend).
> > In Fedora we're intending to ditch this script & just start each daemon
> > directly from the init script & thus we can use /etc/sysconfig/xend to
> > configure the logging args. Solaris also doesn't use that tools/misc/xend
> > script IIRC, having their own scripts for stopping/starting distros. So
> > in this patch I've not made any attempt to provide a way to actually pass
> > the --log arg to xenconsoled, leaving such decisions upto the distro
> > packagers. Any alternate ideas are welcome...
> 
> For guest logging it'd be nice to have the option to specify via xenstore
> where the log file should be written. Then it could be decided per guest by
> xend, perhaps via a config file option. Having a blanket option on the
> cmdline *as well* as a fallback is okay though. Other useful options would
> be max log size (both in terms of max logging to a file, and max buffering
> for the pty), again these could be read from xenstore per guest, with a
> cmdline-specifiable fallback.

IMHO getting Xenstore involved in this is needlessly complicating what
ultimately should be a simple problem - just need to decide how to make
XenD pass a suitable argument when starting the daemon.  I have posted
a separate mail describing changes we're doing in Fedora to the init 
scripts which allow the user to directly customize startup args for any
of the Xen related daemons.

Per guest log file names sounds like rather overkill IMHO and having max 
log sizes is unneccessary because logrotate is already capable of managing
the files being created. eg, a config like

 $ cat /etc/logrotate.d/xenconsoled
 /var/log/xen/console/* {
    notifempty
    missingok
    postrotate
        /bin/kill -HUP `cat /var/run/xenconsoled.pid 2>/dev/null` 1>/dev/null 
2>&1 || true
    endscript
 }

> > When logging hypervisor data we call xc_readconsolering to fetch the data.
> > Since we don't want to log the same data over & over again we have to tell
> > it to clear the console. So if you enable hypervisor logging in xenconsoled,
> > then 'xm dmesg' will no longer show you any data. Personally I don't have
> > any problem with this, but if there's a way to reliably consume hypervisor
> > logs in an incremental manner without having to clear the data I'm open
> > to suggestions...
> 
> I thought I'd applied a patch to improve this interface, clearly I haven't
> though. I'll look into it.

I could be misunderstanding the interface - but it seems that if I don't
use the clear flag to xc_readconsolering i'd just get the same data over
and over.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel