X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.cpp;h=30ae63f2a8da3ff5ca442f0650534e902f675d04;hb=d0be3fbcfb2bc0eb27d7c3d0b630ab657ff8f222;hp=a6e5ab9ddb46e6e9ef2ff54002a5c7c0f7993c91;hpb=9ec374517954efc1b34694c7ed801231f035d7f7;p=anna.git diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index a6e5ab9..30ae63f 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -11,6 +11,9 @@ #include // std::cout #include // ceil #include +#include // chdir +//#include TODO: use this from gcc4.9.0: http://stackoverflow.com/questions/8060025/is-this-c11-regex-error-me-or-the-compiler +#include // Project #include @@ -23,18 +26,20 @@ #include #include #include +#include #include +#include // Process #include -#include #include -#include -#include +#include +#include +#include -#define SIGUSR2_TASKS_INPUT_FILENAME "./sigusr2.in" -#define SIGUSR2_TASKS_OUTPUT_FILENAME "./sigusr2.out" +#define SIGUSR2_TASKS_INPUT_FILENAME "sigusr2.in" +#define SIGUSR2_TASKS_OUTPUT_FILENAME "sigusr2.out" const char *ServicesDTD = "\ @@ -59,54 +64,67 @@ const char *ServicesDTD = "\ -->\n\ \n\ \n\ -\n\ +\n\ "; - result += "\n "; + result += "\n "; result += "\n"; result += "\n"; result += "\nServer configuration:"; @@ -908,13 +967,13 @@ std::string Launcher::help() const throw() { result += "\n "; result += "\n"; result += "\n "; - result += "\n "; + result += "\n "; result += "\n"; result += "\n"; result += "\nIf you act as a proxy or a translation agent, you need to combine both former setups, and probably"; result += "\n will need to program the answers to be replied through the operations interface. To balance the"; result += "\n traffic at your client side you shall use '--balance' and '--sessionBasedModelsClientSocketSelection'"; - result += "\n arguments in order to define the balancing behaviour. To make hybrid setups you only must mix the realms:"; + result += "\n arguments in order to define the balancing behaviour. To make hybrid setups you only must mix the nodes:"; result += "\n"; result += "\nClient and server configuration:"; result += "\n"; @@ -925,8 +984,8 @@ std::string Launcher::help() const throw() { result += "\n "; result += "\n"; result += "\n "; - result += "\n "; - result += "\n "; + result += "\n "; + result += "\n "; result += "\n"; result += "\n"; result += "\n"; @@ -948,7 +1007,7 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\n--------------------------------------------------------------------------------------- Node management"; result += "\n"; - result += "\nnode[|] Selects a context working node by mean a registered name."; + result += "\nnode[|] Selects a context working node by mean a registered name (origin-host)."; result += "\n All the subsequent operations will be forced to work with"; result += "\n this node, which makes possible some rare scenarios like"; result += "\n sending unexpected messages on remote peers. This is also"; @@ -958,12 +1017,12 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\nnode_auto Returns to the default behaviour (smart node selection)."; result += "\n Depending on the operation, this could imply a global"; - result += "\n action scope, affecting to all the registered realms."; + result += "\n action scope, affecting to all the registered hosts."; result += "\n This should be the normal configuration. Take into"; result += "\n account that if you fix the working node, this could"; result += "\n affect to things like test programming: communication"; result += "\n resources will override those which would be inferred"; - result += "\n from programmed messages Origin-Realm avps."; + result += "\n from programmed messages Origin-Host avps."; result += "\n"; result += "\n------------------------------------------------------------------------------------ Parsing operations"; result += "\n"; @@ -979,7 +1038,7 @@ std::string Launcher::help() const throw() { result += "\n line '--services' parameter was used or not. Those services which"; result += "\n are not correctly loaded will be ignored to keep the process alive."; result += "\n If you need to load services as deltas, you must firstly load the"; - result += "\n diameter base dictionary with stack id 0, because all the realms"; + result += "\n diameter base dictionary with stack id 0, because all the nodes"; result += "\n will use this dictionary to encode/decode base protocol messages"; result += "\n managed by the communication engine."; result += "\n"; @@ -992,9 +1051,19 @@ std::string Launcher::help() const throw() { result += "\n performance measurement. Context data can be written at"; result += "\n '/var/tmp/anna.context.' by mean 'kill -10 '."; result += "\n or sending operation 'context|[target file]'."; - result += "\n This operation applies over all the registered realm nodes"; + result += "\n This operation applies over all the registered host nodes"; result += "\n except if one specific working node has been set."; result += "\nforceCountersRecord Forces dump to file the current counters of the process."; + result += "\nlog-statistics-samples| Log statistics samples for the provided comma-separated concept id"; + result += "\n list, over './sample..csv' files. For example: \"1,2\""; + result += "\n will log concepts 1 and 2. Reserved words \"all\"/\"none\" activates/"; + result += "\n deactivates all registered statistics concept identifiers. That ids"; + result += "\n are shown at context dump."; + result += "\nchange-dir[|directory] Changes the execution point which could be fine to ease some"; + result += "\n file system interaction tasks. Be care about some requirements"; + result += "\n (for example if you have a user defined counters directory as"; + result += "\n relative path this must exists from the new execution directory)."; + result += "\n If nothing provided, initial working directory will be restored."; result += "\nshow-oam Dumps current counters of the process. This is also done at"; result += "\n process context dump."; result += "\nshow-stats Dumps statistics of the process. This is also done at process"; @@ -1081,10 +1150,10 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\n------------------------------------------------------------------------------------------- Burst tests"; result += "\n"; - result += "\nIn order to simplify user experience, burst category operations are only allowed in single realm node"; - result += "\n configuration. Indeed, you could send messages with incorrect Origin-Realm, and no warning is shown."; - result += "\nAll the operations are performed through the unique realm: if you need to use more interfaces, you may"; - result += "\n launch different ADML instances. Is nonsense to allow burst in a multi-realm configured ADML, because"; + result += "\nIn order to simplify user experience, burst category operations are only allowed in single host node"; + result += "\n configuration. Indeed, you could send messages with unmatched Origin-Host, and no warning is shown."; + result += "\nAll the operations are performed through the unique host: if you need to use more interfaces, you may"; + result += "\n launch different ADML instances. Is nonsense to allow burst in a multi-host configured ADML, because"; result += "\n this feature is not able to coordinate the messages."; result += "\n"; result += "\nburst|[|parameter] Used for performance testing, we first program diameter requests"; @@ -1117,7 +1186,7 @@ std::string Launcher::help() const throw() { result += "\n-------------------------------------------------------------------------------------- Advanced testing"; result += "\n"; result += "\n Burst mode only allows single interface interaction. For multiple interface"; - result += "\n (realm) coordination, you could use the advanced test cases programming:"; + result += "\n (origin-host) coordination, you could use the advanced test cases programming:"; result += "\n"; result += "\n"; result += "\n test||[|parameters]"; @@ -1149,6 +1218,9 @@ std::string Launcher::help() const throw() { result += "\n sendxml2e|[|]"; result += "\n Sends xml source file (pathfile) to entity (it would be a"; result += "\n 'forward' event if it came through local server endpoint)."; + result += "\n Take into account that the xml message is encoded just on"; + result += "\n call. The xml file is not longer needed neither interpreted"; + result += "\n in case of modification, after calling this command."; result += "\n The step number should be provided for answers to indicate"; result += "\n the 'wait for request' corresponding step. If you miss this"; result += "\n reference, the sequence information (hop-by-hop, end-to-end)"; @@ -1156,6 +1228,8 @@ std::string Launcher::help() const throw() { result += "\n the difficulty of predicting these information). Be sure to"; result += "\n refer to a 'wait for request' step. Conditions like 'regexp'"; result += "\n (as we will see later) are not verified."; + result += "\n In the case of requests, the step number is used to force the"; + result += "\n copy of Session-Id value from the referred step."; result += "\n"; result += "\n sendxml2c|[|]"; result += "\n Sends xml source file (pathfile) to client (it would be a"; @@ -1165,16 +1239,6 @@ std::string Launcher::help() const throw() { result += "\n delay| Blocking step until the time lapse expires. Useful to give "; result += "\n some cadence control and time schedule for a specific case."; result += "\n A value of 0 could be used as a dummy step."; - result += "\n wait| Blocking step until condition is fulfilled. The message could"; - result += "\n received from entity (waitfe) or from client (waitfc)."; - result += "\n"; - result += "\n wait-regexp|"; - result += "\n Wait condition, from entity (waitfe-regexp) or client (waitfc-regexp)"; - result += "\n to match the serialized xml content for received messages. CPU cost"; - result += "\n is bigger than the former ones because the whole message must be"; - result += "\n decoded and converted to xml instead of doing a direct hexadecimal"; - result += "\n buffer search. The main advantage is the great flexibility to identify"; - result += "\n any content with a regular expression."; result += "\n"; result += "\n sh-command|