From 5f3b0b0ac3219bafe9e509db11babe2db59ba2d4 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 4 Feb 2016 17:12:07 +0100 Subject: [PATCH] give an example on how to use @include statements --- etc/websocket-stats.conf | 22 ++++++++++++++++++++++ etc/ws.conf | 19 +++++++++---------- 2 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 etc/websocket-stats.conf diff --git a/etc/websocket-stats.conf b/etc/websocket-stats.conf new file mode 100644 index 000000000..24122d4c1 --- /dev/null +++ b/etc/websocket-stats.conf @@ -0,0 +1,22 @@ +/** This should be included to all websocket node configurations which report + * path stats by the 'stats_send' hook. + * + * Have a look at etc/ws.conf for an example. + * + * @author Steffen Vogel + * @copyright 2014-2015, Institute for Automation of Complex Power Systems, EONERC + * This file is part of S2SS. All Rights Reserved. Proprietary and confidential. + * Unauthorized copying of this file, via any medium is strictly prohibited. + *********************************************************************************/ + +series = ( + { label = "Sent [#msgs]" }, + { label = "Received [#msgs]" }, + { label = "Invalid [#msgs]" }, + { label = "Skipped [#msgs]" }, + { label = "Dropped [#msgs]" }, + { label = "Overruns [#msgs]" }, + { label = "One-way delay [sec]" }, + { label = "Send rate [samples/sec]" }, + { label = "Receive rate [samples/sec]" } +) \ No newline at end of file diff --git a/etc/ws.conf b/etc/ws.conf index f44518786..b8b5ac931 100644 --- a/etc/ws.conf +++ b/etc/ws.conf @@ -1,13 +1,6 @@ ############ Global Options ############ -affinity = 0x02; # Mask of cores the server should run on - # This also maps the NIC interrupts to those cores! - -priority = 50; # Priority for the server tasks. - # Usually the server is using a real-time FIFO - # scheduling algorithm - debug = 10; # The level of verbosity for debug messages # Higher number => increased verbosity @@ -37,9 +30,10 @@ nodes = { } } - ws2 = { + ws_stats = { type = "websocket", - description = "Warum nicht noch einanderer?" + description = "Statistics for path: ws => ws", + @include "websocket-stats.conf" /* This adds a caption to the statistics plot */ } }; @@ -47,7 +41,12 @@ nodes = { ############ List of paths ############ paths = ( - { in = "ws"; out = "ws"; hook = [ "ts", "fir:0" ]; rate = 20 } + { + in = "file", + out = "ws", + hook = [ "stats_send:ws_stats" ], + rate = 20 + } ); http = {