From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akio Takebe Subject: Re: [Xen-devel] Re: directing xm dmesg to syslog Date: Thu, 15 Jun 2006 22:32:53 +0900 Message-ID: References: <200605231459.33644.mog.johnny@gmx.net> <200605231631.44919.mark.williamson@cl.cam.ac.uk> <20060609163028.F2C4.MINAI@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060609163028.F2C4.MINAI@jp.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-users-bounces@lists.xensource.com Errors-To: xen-users-bounces@lists.xensource.com To: MINAI Katsuhito , Mark Williamson Cc: Hans-Christian Armingeon , xen-devel@lists.xensource.com, xen-users@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi, Minai I think this is cool tool! I want you to add xenlogd into /etc/init.d/xend. And I have small comments. See the below. diff -r 4f1e39ec05d6 tools/xenlogd/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/xenlogd/Makefile Fri Jun 09 15:40:36 2006 +0900 @@ -0,0 +1,7 @@ +CC=gcc +CFLAGS=-lxenctrl + +xenlogd: + +clean: + rm -f xenlogd You should add -Werror -g option into CFLAGS And you must add .PHONY, build, install section, because of "make tools" and "make install-tools" So you may add "SUBDIRS-y += xenlogd" into tools/Makefile diff -r 4f1e39ec05d6 tools/xenlogd/xenlogd.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/xenlogd/xenlogd.c Fri Jun 09 15:40:36 2006 +0900 @@ -0,0 +1,283 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define XCDSIZE (4096) +#define XENHEAD "(XEN) " +#define PIDFILE "/var/run/xenlogd.pid" +#define STARTMSG "logging has been started." + And STARTMSG isn't used. :-) This xenlog tools clear a reading part of console buffer. I think xenlogd which don't clear the buffer is more cool. But this fix might modify xen's code. So this fix is trade off. Hmm.... I hope other comments from community. :-) Best Regards, Akio Takebe >Hi all, > >I made the logging daemon of the Xen message. >This daemon outputs the messege to syslog if messages were found >in the console ring by the polling every one second. > >Following is the usage, but usually no option is necessary. >It will automatically be daemon. > >usage: xenlogd [-h] [-k] [-r] > -h: print help > -k: kill alive logging daemon > -r: restart logging daemon after kill alive one > >Signed-off-by: Katsuhito Minai > >Best regards, >Katsuhito Minai > > > >On Tue, 23 May 2006 16:31:44 +0100 >Mark Williamson wrote: >> > short questin: I want to direct the oputput of xm dmesg in (near) >> > realtime >> > to syslog. >> > >> > Is this possible? >> >> dom0 Linux doesn't (currently) get any notifications that the xm dmesg >> output >> has changed. >> >> You could write a daemon to poll xm dmesg and send changes to syslog... >> You >> might like to consider having it clear the dmesg also, since it uses a >> fixed-size buffer and won't work once that is full. >> >> Cheers, >> Mark >> >> -- >> Dave: Just a question. What use is a unicyle with no seat? And no pedals! >> Mark: To answer a question with a question: What use is a skateboard? >> Dave: Skateboards have wheels. >> Mark: My wheel has a wheel! >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users > > >-------------------------------text/plain------------------------------- >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel