Create the session and domain directories on start
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index 27acbada09627970ee2c6a46ebe301bacf4e2ae9..1542fe8e1cb6ae6a91db693a5528338037575390 100644 (file)
@@ -2519,8 +2519,20 @@ int cmd_start_trace(struct ltt_session *session)
                goto error;
        }
 
+       if (!session->has_been_started) {
+               if (!session->snapshot_mode && session->output_traces) {
+                       ret = session_mkdir(session);
+                       if (ret) {
+                               ERR("Failed to create the session directories");
+                               ret = LTTNG_ERR_CREATE_DIR_FAIL;
+                               goto error;
+                       }
+               }
+       }
+
        /* Kernel tracing */
        if (ksession != NULL) {
+               DBG("Start kernel tracing session %s", session->name);
                ret = start_kernel_session(ksession, kernel_tracer_fd);
                if (ret != LTTNG_OK) {
                        goto error;
This page took 0.024263 seconds and 5 git commands to generate.