environment: write sysname, release, version, domain to metadata
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 7 Feb 2012 04:29:20 +0000 (23:29 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 7 Feb 2012 04:29:20 +0000 (23:29 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-events.c

index 674494bd6b0c30998ed3ada2083ccd765f7fafc7..a01d0af849e69a8ef3a4dc7cb33fa69ae167c981 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/jiffies.h>
+#include <linux/utsname.h>
 #include "wrapper/uuid.h"
 #include "wrapper/vmalloc.h"   /* for wrapper_vmalloc_sync_all() */
 #include "wrapper/random.h"
@@ -938,6 +939,21 @@ int _lttng_session_metadata_statedump(struct lttng_session *session)
        if (ret)
                goto end;
 
+       ret = lttng_metadata_printf(session,
+               "env {\n"
+               "       domain = \"%s\";\n"
+               "       sysname = \"%s\";\n"
+               "       release = \"%s\";\n"
+               "       version = \"%s\";\n"
+               "};\n\n",
+               "kernel",
+               utsname()->sysname,
+               utsname()->release,
+               utsname()->version
+               );
+       if (ret)
+               goto end;
+
        ret = lttng_metadata_printf(session,
                "clock {\n"
                "       name = %s;\n",
This page took 0.026067 seconds and 4 git commands to generate.