* Re: [PATCH lttng-tools] Fix: Snapshot should be taken asap in core handler script
[not found] <1376586216-14065-1-git-send-email-christian.babeux@efficios.com>
@ 2013-08-15 17:33 ` David Goulet
0 siblings, 0 replies; 2+ messages in thread
From: David Goulet @ 2013-08-15 17:33 UTC (permalink / raw)
To: Christian Babeux; +Cc: lttng-dev
Merged!
Christian Babeux:
> Taking a snapshot should be the first thing the core handler does.
> An enormous core file write to disk could potentially discard a lot
> of tracing data if done before the snapshot.
>
> Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
> ---
> extras/core-handler/handler.sh | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/extras/core-handler/handler.sh b/extras/core-handler/handler.sh
> index 7817282..c2d2402 100755
> --- a/extras/core-handler/handler.sh
> +++ b/extras/core-handler/handler.sh
> @@ -29,6 +29,12 @@ SESSION_NAME="coredump-handler"
> # Sessiond binary name.
> SESSIOND_BIN_NAME="lttng-sessiond"
>
> +# TODO: Checking for a sessiond lockfile would be more appropriate.
> +if $PGREP_BIN -u root "${SESSIOND_BIN_NAME}" > /dev/null 2>&1
> +then
> + $LTTNG_BIN snapshot record -s ${SESSION_NAME} > /dev/null 2>&1
> +fi
> +
> # Core file settings.
> CORE_PATH="/tmp/lttng/core"
> CORE_PREFIX="core"
> @@ -54,9 +60,3 @@ $CAT_BIN - > "${CORE_PATH}/${CORE_PREFIX}.$p"
>
> # Optional, chain core dump handler with original systemd script.
> #$CAT_BIN - | /usr/lib/systemd/systemd-coredump $p $u $g $s $t $e
> -
> -# TODO: Checking for a sessiond lockfile would be more appropriate.
> -if $PGREP_BIN -u root "${SESSIOND_BIN_NAME}" > /dev/null 2>&1
> -then
> - $LTTNG_BIN snapshot record -s ${SESSION_NAME} > /dev/null 2>&1
> -fi
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH lttng-tools] Fix: Snapshot should be taken asap in core handler script
@ 2013-08-15 17:03 Christian Babeux
0 siblings, 0 replies; 2+ messages in thread
From: Christian Babeux @ 2013-08-15 17:03 UTC (permalink / raw)
To: dgoulet; +Cc: lttng-dev
Taking a snapshot should be the first thing the core handler does.
An enormous core file write to disk could potentially discard a lot
of tracing data if done before the snapshot.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
---
extras/core-handler/handler.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/extras/core-handler/handler.sh b/extras/core-handler/handler.sh
index 7817282..c2d2402 100755
--- a/extras/core-handler/handler.sh
+++ b/extras/core-handler/handler.sh
@@ -29,6 +29,12 @@ SESSION_NAME="coredump-handler"
# Sessiond binary name.
SESSIOND_BIN_NAME="lttng-sessiond"
+# TODO: Checking for a sessiond lockfile would be more appropriate.
+if $PGREP_BIN -u root "${SESSIOND_BIN_NAME}" > /dev/null 2>&1
+then
+ $LTTNG_BIN snapshot record -s ${SESSION_NAME} > /dev/null 2>&1
+fi
+
# Core file settings.
CORE_PATH="/tmp/lttng/core"
CORE_PREFIX="core"
@@ -54,9 +60,3 @@ $CAT_BIN - > "${CORE_PATH}/${CORE_PREFIX}.$p"
# Optional, chain core dump handler with original systemd script.
#$CAT_BIN - | /usr/lib/systemd/systemd-coredump $p $u $g $s $t $e
-
-# TODO: Checking for a sessiond lockfile would be more appropriate.
-if $PGREP_BIN -u root "${SESSIOND_BIN_NAME}" > /dev/null 2>&1
-then
- $LTTNG_BIN snapshot record -s ${SESSION_NAME} > /dev/null 2>&1
-fi
--
1.8.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-15 17:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1376586216-14065-1-git-send-email-christian.babeux@efficios.com>
2013-08-15 17:33 ` [PATCH lttng-tools] Fix: Snapshot should be taken asap in core handler script David Goulet
2013-08-15 17:03 Christian Babeux
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.