All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Move logs under /var/log/xen
@ 2006-08-18 18:33 Jeremy Katz
  2006-08-25 14:26 ` Jeremy Katz
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Katz @ 2006-08-18 18:33 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

The attached patch moves all of the various log files created by xen to
be under /var/log/xen instead of under /var/log directly.  This has the
advantage of cleaning things up a little[1] and also can make it easier
to restrict the permissions needed by xend.

Signed-off-by: Jeremy Katz <katzj@redhat.com>

Jeremy

[1] This is especially true as you run HVM guests and the number
of /var/log/qemu-dm.* files grows... :)

[-- Attachment #2: xen-logdir.patch --]
[-- Type: text/x-patch, Size: 6907 bytes --]

diff -r ec03b24a2d83 docs/man/xend-config.sxp.pod.5
--- a/docs/man/xend-config.sxp.pod.5	Tue Aug 15 19:53:55 2006 +0100
+++ b/docs/man/xend-config.sxp.pod.5	Fri Aug 18 14:27:54 2006 -0400
@@ -23,7 +23,7 @@ The following lists the daemon configura
 =item I<logfile>
 
 The location of the file to record runtime log messages.  Defaults to
-I</var/log/xend.log>.
+I</var/log/xen/xend.log>.
 
 =item I<loglevel>
 
diff -r ec03b24a2d83 docs/misc/xend.tex
--- a/docs/misc/xend.tex	Tue Aug 15 19:53:55 2006 +0100
+++ b/docs/misc/xend.tex	Fri Aug 18 14:27:54 2006 -0400
@@ -214,7 +214,7 @@ Configuration scripts ({\it e.g.} for ne
 Configuration scripts ({\it e.g.} for network-script) are looked for in {\tt /etc/xen}
 unless their name begins with '/'.
 
-Xend sends its log output to {\tt /var/log/xend.log}. This is a rotating logfile,
+Xend sends its log output to {\tt /var/log/xen/xend.log}. This is a rotating logfile,
 and logs are moved onto {\tt xend.log.1} {\it etc.} as they get large. Old logs may
 be deleted.
 
@@ -419,7 +419,7 @@ allows access to some debugging function
 \end{itemize}
 
 When tracing is on xend logs all functions calls and exceptions to
-{\tt /var/log/xend.trace}.
+{\tt /var/log/xen/xend.trace}.
 
 \begin{thebibliography}{99}
 
diff -r ec03b24a2d83 docs/src/user.tex
--- a/docs/src/user.tex	Tue Aug 15 19:53:55 2006 +0100
+++ b/docs/src/user.tex	Fri Aug 18 14:27:54 2006 -0400
@@ -973,8 +973,8 @@ using the \texttt{xm} tool.
 
 \subsection{Logging}
 
-As \xend\ runs, events will be logged to \path{/var/log/xend.log} and
-(less frequently) to \path{/var/log/xend-debug.log}. These, along with
+As \xend\ runs, events will be logged to \path{/var/log/xen/xend.log} and
+(less frequently) to \path{/var/log/xen/xend-debug.log}. These, along with
 the standard syslog files, are useful when troubleshooting problems.
 
 \subsection{Configuring \Xend\ }
diff -r ec03b24a2d83 tools/Makefile
--- a/tools/Makefile	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/Makefile	Fri Aug 18 14:30:51 2006 -0400
@@ -39,6 +39,7 @@ install: check
 	done
 	$(MAKE) ioemuinstall
 	$(INSTALL_DIR) -p $(DESTDIR)/var/xen/dump
+	$(INSTALL_DIR) -p $(DESTDIR)/var/log/xen
 
 .PHONY: clean
 clean: check_clean
diff -r ec03b24a2d83 tools/examples/xen-hotplug-common.sh
--- a/tools/examples/xen-hotplug-common.sh	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/examples/xen-hotplug-common.sh	Fri Aug 18 14:27:54 2006 -0400
@@ -21,7 +21,7 @@ dir=$(dirname "$0")
 . "$dir/xen-script-common.sh"
 . "$dir/locking.sh"
 
-exec 2>>/var/log/xen-hotplug.log
+exec 2>>/var/log/xen/xen-hotplug.log
 
 export PATH="/sbin:/bin:/usr/bin:/usr/sbin:$PATH"
 export LANG="POSIX"
diff -r ec03b24a2d83 tools/examples/xend-config.sxp
--- a/tools/examples/xend-config.sxp	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/examples/xend-config.sxp	Fri Aug 18 14:27:54 2006 -0400
@@ -11,7 +11,7 @@
 # Commented out entries show the default for that entry, unless otherwise
 # specified.
 
-#(logfile /var/log/xend.log)
+#(logfile /var/log/xen/xend.log)
 #(loglevel DEBUG)
 
 #(xend-http-server no)
diff -r ec03b24a2d83 tools/ioemu/patches/qemu-logging
--- a/tools/ioemu/patches/qemu-logging	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/ioemu/patches/qemu-logging	Fri Aug 18 14:27:54 2006 -0400
@@ -43,7 +43,7 @@ Index: ioemu/vl.c
      /* default mac address of the first network interface */
      
 +    /* init debug */
-+    sprintf(qemu_dm_logfilename, "/var/log/qemu-dm.%d.log", getpid());
++    sprintf(qemu_dm_logfilename, "/var/log/xen/qemu-dm.%d.log", getpid());
 +    cpu_set_log_filename(qemu_dm_logfilename);
 +    cpu_set_log(0);
 +    
diff -r ec03b24a2d83 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/ioemu/vl.c	Fri Aug 18 14:28:00 2006 -0400
@@ -5924,7 +5924,7 @@ int main(int argc, char **argv)
     /* default mac address of the first network interface */
     
     /* init debug */
-    sprintf(qemu_dm_logfilename, "/var/log/qemu-dm.%d.log", getpid());
+    sprintf(qemu_dm_logfilename, "/var/log/xen/qemu-dm.%d.log", getpid());
     cpu_set_log_filename(qemu_dm_logfilename);
     cpu_set_log(0);
     
diff -r ec03b24a2d83 tools/misc/xend
--- a/tools/misc/xend	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/misc/xend	Fri Aug 18 14:27:54 2006 -0400
@@ -86,7 +86,7 @@ def start_xenstored():
     XENSTORED_TRACE = os.getenv("XENSTORED_TRACE")
     cmd = "xenstored --pid-file /var/run/xenstore.pid"
     if XENSTORED_TRACE:
-        cmd += " -T /var/log/xenstored-trace.log"
+        cmd += " -T /var/log/xen/xenstored-trace.log"
     s,o = commands.getstatusoutput(cmd)
 
 def start_consoled():
diff -r ec03b24a2d83 tools/python/xen/util/bugtool.py
--- a/tools/python/xen/util/bugtool.py	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/python/xen/util/bugtool.py	Fri Aug 18 14:27:54 2006 -0400
@@ -43,8 +43,8 @@ TITLE_RE = re.compile(r'<title>(.*)</tit
 
 FILES_TO_SEND = [ '/var/log/' + x for x in 
                   [ 'syslog', 'messages', 'debug',
-                    'xend.log', 'xend-debug.log', 'xenstored-trace.log',
-                    'xen-hotplug.log' ] ]
+                    'xen/xend.log', 'xen/xend-debug.log', 'xen/xenstored-trace.log',
+                    'xen/xen-hotplug.log' ] ]
 #FILES_TO_SEND = [  ]
 
 
diff -r ec03b24a2d83 tools/python/xen/xend/XendRoot.py
--- a/tools/python/xen/xend/XendRoot.py	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/python/xen/xend/XendRoot.py	Fri Aug 18 14:27:54 2006 -0400
@@ -52,7 +52,7 @@ class XendRoot:
     block_script_dir = "/etc/xen/scripts"
 
     """Default path to the log file. """
-    logfile_default = "/var/log/xend.log"
+    logfile_default = "/var/log/xen/xend.log"
 
     """Default level of information to be logged."""
     loglevel_default = 'DEBUG'
diff -r ec03b24a2d83 tools/python/xen/xend/server/params.py
--- a/tools/python/xen/xend/server/params.py	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/python/xen/xend/server/params.py	Fri Aug 18 14:27:54 2006 -0400
@@ -39,8 +39,8 @@ def getenv(var, val, conv=None):
 
 # The following parameters could be placed in a configuration file.
 XEND_PID_FILE      = '/var/run/xend.pid'
-XEND_TRACE_FILE    = '/var/log/xend.trace'
-XEND_DEBUG_LOG     = '/var/log/xend-debug.log'
+XEND_TRACE_FILE    = '/var/log/xen/xend.trace'
+XEND_DEBUG_LOG     = '/var/log/xen/xend-debug.log'
 XEND_USER          = 'root'
 XEND_DEBUG         = getenv("XEND_DEBUG",     0, conv=int)
 XEND_DAEMONIZE     = getenv("XEND_DAEMONIZE", not XEND_DEBUG, conv=int)
diff -r ec03b24a2d83 tools/security/python/xensec_gen/main.py
--- a/tools/security/python/xensec_gen/main.py	Tue Aug 15 19:53:55 2006 +0100
+++ b/tools/security/python/xensec_gen/main.py	Fri Aug 18 14:27:54 2006 -0400
@@ -34,7 +34,7 @@ import CGIHTTPServer
 
 gHttpPort = 7777
 gHttpDir  = '/var/lib/xensec_gen'
-gLogFile  = '/var/log/xensec_gen.log'
+gLogFile  = '/var/log/xen/xensec_gen.log'
 gUser     = 'nobody'
 gGroup    = 'nobody'
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] Move logs under /var/log/xen
@ 2006-08-18 20:50 Ian Pratt
  2006-08-18 21:07 ` Jeremy Katz
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Pratt @ 2006-08-18 20:50 UTC (permalink / raw)
  To: Jeremy Katz, xen-devel

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

> The attached patch moves all of the various log files created by xen to
> be under /var/log/xen instead of under /var/log directly.  This has the
> advantage of cleaning things up a little[1] and also can make it easier
> to restrict the permissions needed by xend.

Alternatively, should we just be sending all of these messages to syslog and then syslog.conf figure out what to do with them? I've often thought it would be handy to have all the messages in one place, and with time stamps. 

Ian

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] Move logs under /var/log/xen
  2006-08-18 20:50 [PATCH] Move logs under /var/log/xen Ian Pratt
@ 2006-08-18 21:07 ` Jeremy Katz
  2006-08-28 15:49   ` Aron Griffis
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Katz @ 2006-08-18 21:07 UTC (permalink / raw)
  To: Ian Pratt; +Cc: xen-devel

On Fri, 2006-08-18 at 21:50 +0100, Ian Pratt wrote:
> > The attached patch moves all of the various log files created by xen to
> > be under /var/log/xen instead of under /var/log directly.  This has the
> > advantage of cleaning things up a little[1] and also can make it easier
> > to restrict the permissions needed by xend.
> 
> Alternatively, should we just be sending all of these messages to syslog and then 
> syslog.conf figure out what to do with them? I've often thought it would be handy 
> to have all the messages in one place, and with time stamps. 

I think right now, things are a bit verbose to just be doing everything
via syslog -- it'd be kind of like sending all of your apache logs to
syslog.  Things would just get overrun to the point of being less
useful.

Having the logs split out is actually kind of nice from my point of view
-- I just want them a little bit more so :-)

Jeremy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Move logs under /var/log/xen
  2006-08-18 18:33 Jeremy Katz
@ 2006-08-25 14:26 ` Jeremy Katz
  0 siblings, 0 replies; 6+ messages in thread
From: Jeremy Katz @ 2006-08-25 14:26 UTC (permalink / raw)
  To: xen-devel

On Fri, 2006-08-18 at 14:33 -0400, Jeremy Katz wrote:
> The attached patch moves all of the various log files created by xen to
> be under /var/log/xen instead of under /var/log directly.  This has the
> advantage of cleaning things up a little[1] and also can make it easier
> to restrict the permissions needed by xend.

Any other thoughts on this?

Jeremy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Move logs under /var/log/xen
  2006-08-18 21:07 ` Jeremy Katz
@ 2006-08-28 15:49   ` Aron Griffis
  0 siblings, 0 replies; 6+ messages in thread
From: Aron Griffis @ 2006-08-28 15:49 UTC (permalink / raw)
  To: Jeremy Katz; +Cc: Ian Pratt, xen-devel

Jeremy Katz wrote:  [Fri Aug 18 2006, 05:07:11PM EDT]
> On Fri, 2006-08-18 at 21:50 +0100, Ian Pratt wrote:
> > > The attached patch moves all of the various log files created by xen to
> > > be under /var/log/xen instead of under /var/log directly.  This has the
> > > advantage of cleaning things up a little[1] and also can make it easier
> > > to restrict the permissions needed by xend.
> > 
> > Alternatively, should we just be sending all of these messages to syslog and then 
> > syslog.conf figure out what to do with them? I've often thought it would be handy 
> > to have all the messages in one place, and with time stamps. 
> 
> I think right now, things are a bit verbose to just be doing everything
> via syslog -- it'd be kind of like sending all of your apache logs to
> syslog.  Things would just get overrun to the point of being less
> useful.
> 
> Having the logs split out is actually kind of nice from my point of view
> -- I just want them a little bit more so :-)

I like the idea of consolidating the logs to /var/log/xen, however
I don't quite understand how the logs could be too verbose for syslog.
With syslog configuration, you can branch them out to separate files
anyway, to keep the status quo.  The advantage of using syslog is that
you can also do interesting things like filtering and sending over the
network to a central logging machine.

Aron

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] Move logs under /var/log/xen
@ 2006-08-28 16:35 Ian Pratt
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Pratt @ 2006-08-28 16:35 UTC (permalink / raw)
  To: Aron Griffis, Jeremy Katz; +Cc: xen-devel

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]


> I like the idea of consolidating the logs to /var/log/xen, however
> I don't quite understand how the logs could be too verbose for syslog.
> With syslog configuration, you can branch them out to separate files
> anyway, to keep the status quo.  The advantage of using syslog is that
> you can also do interesting things like filtering and sending over the
> network to a central logging machine.

I'd certainly still like to see an option to enable logging everything via syslog (in addition to Jeremy's patch which is now in-tree)

Ian

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-08-28 16:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-18 20:50 [PATCH] Move logs under /var/log/xen Ian Pratt
2006-08-18 21:07 ` Jeremy Katz
2006-08-28 15:49   ` Aron Griffis
  -- strict thread matches above, loose matches on Subject: below --
2006-08-28 16:35 Ian Pratt
2006-08-18 18:33 Jeremy Katz
2006-08-25 14:26 ` Jeremy Katz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.