Monitoring

Monitoring tools allow to consult status of objects and bags.

To open a object monitoring, you must use, in a web browser, URL **http://://MONITOR**.

With for host name and port, http connection of container ownes your object.

If you don't know the port or host name where your object runs, you can call the nameserver monitor with URL **http://:**: your browser will be redirect from associate nameserver object monitor tool.

From a monitor, you can navigate into other object monitors of your application.

Main

When you open object monitoring, you can see a screen like this:

Many parts are using:

  • Objects list browser: Allows you to change of object monitoring.
  • Location link: To show locations object screen
  • Bag menu: To show editor screen of a bag
  • Method menu: To have a link with public methods or a description (name and parameters) for protected methods.
  • Tools menu: Links to specific tools like trace or log viewer
  • Main frame: In this area, you can see the information select by left selection. By default, this frame shows Object Architecture of selected object.

Bag editor

The bag menu allows to show an editor of content bag:

In this screen, you can navigate in the bag and search specific value.

With modification toggle, you can add or delete a resources.

Location viewer

With clicking on LINC logo (in top-bottom), you can open object locations viewer:

In this screen, you can see all objects of your application associated to their containers (same host name and same port)

Tracer

Each containers manage trace file of their activities.

In the boot strap file, you can change trace level of your application.

For each containers, 2 difference trace files are avalable: generic trace and coordination trace.

The second save coordination activities (precondition and performance) and the first all other activities (container or object actions).

If the container has not coordinator object, the second trace is always empty.

Object trace viewer

This tool allows you to navigate into a trace file (generic or coordination).

You can navigate and refresh the trace viewer with control panel in the left.

Searching

The trace viewer has a search tool to help you to find specific information.

Open search panel by clicking on the top bottom of the control panel.

You must precise different criteria for your searching:

  • Level of trace message: 6 different levels are avalable :
    • ERROR
    • WARNING
    • INFORMATION
    • DEBUG
    • DEBUG LOW
    • DEBUG HIGH
  • Context
  • 2 Key words of filter

Note that this filter criteria is saving as a cookie in your web browser for 24 hours.

Command line

You can generate a html trace report in command line

python LINC/Lib/trace_cmd.py --filename <trace file>

This command create a html file of trace messages and open it in a web browser.

Logger

For each coordinator rules, a log mecanisme is associate to memorize in a file resources moving realized by them.

Different tools allow to exploite those files.

Log viewer

This viewer allows to navigate in the result tree for each rules.

For help your analize, you can create virtual log file with search feature.

Log statistic

This tool allows to analyze statistic evlution of a rule.

To access it, click on '?' of a rule in the log viewer.

By default, you see statistic data value for each lines of a rule.

With tongle, you can see time évolution of this rule.

Log resources flux

This tool allows to analyze flux of resources between each bags and for each rules.

To access it, click on 'Flux curve' in top of log viewer.

User can be zoom or navigate in the graph with mouse scroll wheel.

By default, you see flux for all bags and rules.

With tongle, you can zoom about only on bag.

Command line

If log file is too big, statistics and flux report are not available in web mode. You must use a command line to generate them. The command:

Log list

python LINC/Lib/log_cmd.py --logpath <LOG PATH> --loglist 1

Shows the list of log rules available.

Log statistic

python LINC/Lib/log_cmd.py --logpath <LOG PATH> --logname <RULE NAME>

Creates an html statistics report and opens it in the web browser.

You can also precise:

 --formatdate <FORMATDATE>   Generate a curve of statistic with this format date
                             0:auto/1:minute/2:hour/3:day/4:month

Log flux

python LINC/Lib/log_cmd.py --logpath <LOG PATH> --bagname <BAG NAME>

Creates html flux report and opens it in web browser.
If BAG NAME is empty, a report is created with all bags.
You can precised:

--filter <FILTER>            Filter for log flux:
                                0=All node
                                1=Only success performance
                                2=Only failure performance
--showing <SHOWING>          Result mode for log flux:
                                0=Only graphic
                                1=Only raw data
                                2=Graphic and raw data

Get the current inference tree

The logger contains all the coordination decsions done during the application's life which results in a big amount of data after some time.

To avoid consistently increasing the memory usage the Coordinator use a garbage collector mecanism.

It periodically browses the current inference tree and ask the bags if the each resource is still there. If a resource is not in the bag anymore, the coordinator removes it from the inference tree with all of its children.

You can see that in the logger interface if you check the box show closestream. You'll see a ot of purple children indicating closestream because of garbage.

If you want to know the current inference in a coordinaton object, you can call the method:

http://IP:PORT/ObjectName/METHOD?methodname=get_log_inference_tree

for instance for the first tutorial :

http://127.0.0.1:10000/Test/METHOD?methodname=get_log_inference_tree

You will get a text version of the inference tree

RU0001:
  r root ('RU0001', 'init', 'ENABLED')
RU0000:
  r root ('RU0000', 'init', 'ENABLED')
RU0003:
  r root ('RU0003', 'trom', 'ENABLED')
    r-0 ['RU0003', 'trom', 'ENABLED'] ('*', '*')
      r-0-1 ['denis', 'A'] ('denis', '*')
        r-0-1-0 ['denis', 'D'] ('A', 'D')
      r-0-2 ['alice', 'D'] ('alice', '*')
RU0002:
  r root ('RU0002', 'init', 'ENABLED')

Dashboard

With the command line

python <boot strap file> --dashboard

You open in your web browser a dashboard page for each daemon of your application.

In this web interface, you can select all your trace files, log files.

You have a link to all object monitors of your application too.

Re-execute

Principe

When an application runs, all rules save in log file their activities.

You can see them in the log viewer.

Before each start of daemons, all those log file are saved in archive zone (in maximum of 5 archives).

So, it possible to used this log information, to contrainte bag to re-execute same sequence of responses.

Using this feature

For using the re-execute feature, you must use "--reexecute" command before your objects starting.

In this command, you must precise the archive number to re-execute. (latest is #1, oldest is #5)

For example:

 python boot_strap.py --reexecyte 2 --go
 python boot_strap.py --reexecyte 1 --start_objects All --run_scripts All