summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
804c90a)
Make sure that the ust snapshot is put under the same folder as the
kernel snapshot.
Fixes #970
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
assert(output);
assert(session);
assert(output);
assert(session);
- /* Get the datetime for the snapshot output directory. */
- ret = utils_get_current_time_str("%Y%m%d-%H%M%S", output->datetime,
- sizeof(output->datetime));
- if (!ret) {
- ret = LTTNG_ERR_INVALID;
- goto error;
- }
/*
* Copy kernel session sockets so we can communicate with the right
/*
* Copy kernel session sockets so we can communicate with the right
assert(output);
assert(session);
assert(output);
assert(session);
- /* Get the datetime for the snapshot output directory. */
- ret = utils_get_current_time_str("%Y%m%d-%H%M%S", output->datetime,
- sizeof(output->datetime));
- if (!ret) {
- ret = LTTNG_ERR_INVALID;
- goto error;
- }
-
/*
* Copy UST session sockets so we can communicate with the right
* consumer for the snapshot record command.
/*
* Copy UST session sockets so we can communicate with the right
* consumer for the snapshot record command.
unsigned int use_tmp_output = 0;
struct snapshot_output tmp_output;
unsigned int snapshot_success = 0;
unsigned int use_tmp_output = 0;
struct snapshot_output tmp_output;
unsigned int snapshot_success = 0;
assert(session);
assert(output);
DBG("Cmd snapshot record for session %s", session->name);
assert(session);
assert(output);
DBG("Cmd snapshot record for session %s", session->name);
+ /* Get the datetime for the snapshot output directory. */
+ ret = utils_get_current_time_str("%Y%m%d-%H%M%S", datetime,
+ sizeof(datetime));
+ if (!ret) {
+ ret = LTTNG_ERR_INVALID;
+ goto error;
+ }
+
/*
* Permission denied to create an output if the session is not
* set in no output mode.
/*
* Permission denied to create an output if the session is not
* set in no output mode.
}
/* Use the global session count for the temporary snapshot. */
tmp_output.nb_snapshot = session->snapshot.nb_snapshot;
}
/* Use the global session count for the temporary snapshot. */
tmp_output.nb_snapshot = session->snapshot.nb_snapshot;
+
+ /* Use the global datetime */
+ memcpy(tmp_output.datetime, datetime, sizeof(datetime));
}
tmp_output.nb_snapshot = session->snapshot.nb_snapshot;
}
tmp_output.nb_snapshot = session->snapshot.nb_snapshot;
+ memcpy(tmp_output.datetime, datetime, sizeof(datetime));
if (session->kernel_session) {
ret = record_kernel_snapshot(session->kernel_session,
if (session->kernel_session) {
ret = record_kernel_snapshot(session->kernel_session,