From 97fdf4b33bba4e945db66d73ad4d164020d6aa38 Mon Sep 17 00:00:00 2001 From: Steve Schnepp Date: Wed, 27 Feb 2013 09:59:15 +0100 Subject: [PATCH 1/3] profiling: adding a dump_node --- tools/profiling/dump_node.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tools/profiling/dump_node.sh diff --git a/tools/profiling/dump_node.sh b/tools/profiling/dump_node.sh new file mode 100644 index 00000000..168158c6 --- /dev/null +++ b/tools/profiling/dump_node.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +NODE=${1:-localhost} +PORT=${2:-4949} + +{ + for plugin in $(echo "list" | nc $NODE $PORT | tail -n 1) + do + echo "config $plugin" + echo "fetch $plugin" + done + echo "quit" +} | nc $NODE $PORT From 4bb73b59c2d91b1be4d706de270c85d47eb3ad89 Mon Sep 17 00:00:00 2001 From: Steve Schnepp Date: Wed, 27 Feb 2013 10:05:52 +0100 Subject: [PATCH 2/3] profiling: remove ext to dump_node --- tools/profiling/{dump_node.sh => dump_node} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tools/profiling/{dump_node.sh => dump_node} (100%) mode change 100644 => 100755 diff --git a/tools/profiling/dump_node.sh b/tools/profiling/dump_node old mode 100644 new mode 100755 similarity index 100% rename from tools/profiling/dump_node.sh rename to tools/profiling/dump_node From 3e7d7308cf12b00a25df1798f5c1cedbbdf2697d Mon Sep 17 00:00:00 2001 From: Steve Schnepp Date: Thu, 1 Oct 2020 20:40:43 +0200 Subject: [PATCH 3/3] Quoting vars --- tools/profiling/dump_node | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/profiling/dump_node b/tools/profiling/dump_node index 168158c6..34d4b630 100755 --- a/tools/profiling/dump_node +++ b/tools/profiling/dump_node @@ -1,13 +1,13 @@ #! /bin/sh -NODE=${1:-localhost} -PORT=${2:-4949} +NODE="${1:-localhost}" +PORT="${2:-4949}" { - for plugin in $(echo "list" | nc $NODE $PORT | tail -n 1) + for plugin in $(echo "list" | nc "$NODE" "$PORT" | tail -n 1) do echo "config $plugin" echo "fetch $plugin" done echo "quit" -} | nc $NODE $PORT +} | nc "$NODE" "$PORT"