projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the GMT offset in the rotated chunk path
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
rotate.c
diff --git
a/src/bin/lttng-sessiond/rotate.c
b/src/bin/lttng-sessiond/rotate.c
index 3ca80ce6a8a16ad970b6a9c99ddf2a3543201b2d..4264cd4bd91fadeca704f9895b4c0733610a1b9c 100644
(file)
--- a/
src/bin/lttng-sessiond/rotate.c
+++ b/
src/bin/lttng-sessiond/rotate.c
@@
-209,8
+209,8
@@
error:
int rename_complete_chunk(struct ltt_session *session, time_t ts)
{
struct tm *timeinfo;
int rename_complete_chunk(struct ltt_session *session, time_t ts)
{
struct tm *timeinfo;
- char datetime[16], start_datetime[16];
char new_path[LTTNG_PATH_MAX];
char new_path[LTTNG_PATH_MAX];
+ char datetime[21], start_datetime[21];
int ret;
size_t strf_ret;
int ret;
size_t strf_ret;
@@
-221,7
+221,8
@@
int rename_complete_chunk(struct ltt_session *session, time_t ts)
ret = -1;
goto end;
}
ret = -1;
goto end;
}
- strf_ret = strftime(datetime, sizeof(datetime), "%Y%m%d-%H%M%S",
+
+ strf_ret = strftime(datetime, sizeof(datetime), "%Y%m%dT%H%M%S%z",
timeinfo);
if (strf_ret == 0) {
ERR("Failed to format timestamp while renaming completed session chunk");
timeinfo);
if (strf_ret == 0) {
ERR("Failed to format timestamp while renaming completed session chunk");
@@
-230,7
+231,7
@@
int rename_complete_chunk(struct ltt_session *session, time_t ts)
}
if (session->rotate_count == 1) {
}
if (session->rotate_count == 1) {
- char start_time[
16
];
+ char start_time[
21
];
timeinfo = localtime(&session->last_chunk_start_ts);
if (!timeinfo) {
timeinfo = localtime(&session->last_chunk_start_ts);
if (!timeinfo) {
@@
-240,7
+241,7
@@
int rename_complete_chunk(struct ltt_session *session, time_t ts)
}
strf_ret = strftime(start_time, sizeof(start_time),
}
strf_ret = strftime(start_time, sizeof(start_time),
- "%Y%m%d
-%H%M%S
", timeinfo);
+ "%Y%m%d
T%H%M%S%z
", timeinfo);
if (strf_ret == 0) {
ERR("Failed to format timestamp while renaming completed session chunk");
ret = -1;
if (strf_ret == 0) {
ERR("Failed to format timestamp while renaming completed session chunk");
ret = -1;
@@
-302,7
+303,8
@@
int rename_complete_chunk(struct ltt_session *session, time_t ts)
ret = -1;
goto end;
}
ret = -1;
goto end;
}
- strf_ret = strftime(start_datetime, sizeof(start_datetime), "%Y%m%d-%H%M%S", timeinfo);
+ strf_ret = strftime(start_datetime, sizeof(start_datetime),
+ "%Y%m%dT%H%M%S%z", timeinfo);
if (!strf_ret) {
ERR("Failed to format timestamp while renaming completed session chunk");
ret = -1;
if (!strf_ret) {
ERR("Failed to format timestamp while renaming completed session chunk");
ret = -1;
@@
-348,7
+350,7
@@
int rename_complete_chunk(struct ltt_session *session, time_t ts)
goto end;
error:
goto end;
error:
- session->rotation_stat
us = LTTNG_ROTATION_STATUS
_ERROR;
+ session->rotation_stat
e = LTTNG_ROTATION_STATE
_ERROR;
end:
return ret;
}
end:
return ret;
}
This page took
0.024455 seconds
and
4
git commands to generate.