]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2136] added a note about a value from the Boss command show_processes
authorNaoki Kambe <kambe@jprs.co.jp>
Thu, 9 Aug 2012 04:26:36 +0000 (13:26 +0900)
committerNaoki Kambe <kambe@jprs.co.jp>
Thu, 9 Aug 2012 04:41:12 +0000 (13:41 +0900)
src/bin/stats/stats.py.in

index 66c0f5dd0326f4786e456979bc0cd1cb998f2a62..fd2df4969c628ce896e667eae272dfc385ab5c78 100755 (executable)
@@ -229,6 +229,31 @@ class Stats:
         if answer:
             (rcode, value) = isc.config.ccsession.parse_answer(answer)
             if rcode == 0 and type(value) is list:
+                # NOTE: For example, the "show_processes" command
+                # of Boss is assumed to return the response in this
+                # format:
+                #  [
+                #  ...
+                #    [
+                #      20061,
+                #      "b10-auth",
+                #      "Auth"
+                #    ],
+                #    [
+                #      20103,
+                #      "b10-auth-2",
+                #      "Auth"
+                #    ]
+                #  ...
+                #  ]
+                # If multiple instances of the same module are
+                # running, the address names of them, which are at the
+                # third element, must be also same. Thus, the value of
+                # the third element of each outer element is read here
+                # for counting multiple instances.  This is a
+                # workaround for counting the instances. This should
+                # be fixed in another proper way in the future
+                # release.
                 modules = [ v[2] if type(v) is list and len(v) > 2 \
                                 else None for v in value ]
         # start requesting each module to collect statistics data