run.php

Running the BarbequeRTRM

Let assume you have successfully downloaded and compiled the BOSP sources, that should be pretty straightway by following the directions reported into Download BOSP and Compiling BOSP. Let's also assume that you have configured BOSP to run on your own Linux machine, actually this is a good starting configuration to discover the framework and becoming confident with some of its concepts.

The following sections detail the main steps required to configure and to start playing with the RTRM. We will make the assumption that you installed BOSP under ~/BOSP and you used the default installation prefix, i.e. ~/BOSP/out.

Configuring the run-time environment

Of course, a Run-Time Manager should be aware about the run-time environment it has to manage.

Configuring the BarbequeRTRM

The BarbequeRTRM comes with a configuration file which allows to configure and fine tune its run-time behaviors, ranging from logging to specific framework modules options. This configuration file is ~/BOSP/out/etc/bbque/bbque.conf, its default values should be just fine for an initial experimentation thus, for this initial phase, just have a look at this file.

Starting the BarbequeRTRM

Once everything has been configured for the target platform and the required usage, now we could start the run-time resource ,anager. For this purpose, BOSP provides a set of convenient scripts and also a dedicated shell which makes easier to interact with the framework.

The BOSP Shell must be started by sourcing the environment configuration script bosp_init.env:

$ . ~/BOSP/out/etc/bbque/bosp_init.env

By issuing this command you will find on a customized shell, which appears like this:

A screenshot of the BOSP Shell

and a new bosp-help command is available to dump a sort list of all the other available commands.

All the BOSP/BarbequeRTRM related commands start with either bosp- or bbque-. This allows you to exploit the shell completion to get a list of available commands.

Commands starting with bosp- target the management of the projects, such as compile a different flavor, while bbque- starting commands target the management of the RTRM, such as starting and stopping the daemon.

Among the BOSP commands, one is parliamentary useful since it takes care of properly start the BarbeuqeRTRM, without boring about the required syntax. To start the BarbequeRTRM daemon you just have to run this command from within a BOSP Shell:

$ bbque-startd

Notice the ending 'd', this command start BarbequeRTRM as a “daemon”. A similar command, bbque-start, allows you to start the RTRM in foreground, but that's useful only for development and debugging purposes. This command only works if the BarbequeRTRM is built with the option “Simulated Mode –> [*] Test Plaftorm Data” enabled.

A this point a set of actions are triggered, among them:

  1. A CPU partition layout is generated
  2. The CPU partitions are configured
  3. All active processes are moved into the HOST partition
  4. The BarbequeRTRM daemon is started

If everything has gone well, now the BarbequeRTRM has got complete control on the resources of the managed device, and you should see an output similar to this:

The output generated by the BarbequeRTRM daemon starting command

Known issue

Linux distribution based on systemd (e.g, starting from Ubuntu 15.04) most probably need the application of a patch to allows the BarbequeRTRM to successfully mount its own cgroup hierarchy. Proceed as follows:

$ bbque-systemd-setup

The BarbequeRTRM log file

Now you could check that everything has been configured correctly and it is working properly. This can be achieved by looking at the BarbequeRTRM log file, which is produced in the file specified by the daemon configuration file and which, by default, is ~/BOSP/out/var/bbque/bbque.log). Otherwise, you could issue a bbque-log command which should spawn a new terminal showing a live tail of this log file.

The bbque-log terminal, as well as all the BOSP generated terminal, make use of the aterm, which is the Afterstep XVT terminal emulator. Pleas ensure you have it installed before using commands which should spawn a new terminal.

The BarbequeRTRM Console

Another useful way to keep an eye on what is its going on, under the control of the BarbequeRTRM, is by means of the so called BarbequeRTRM Console, which could be started by issuing this command:

$ bbque-console

What you get is a set of new windows which populate your desktop, something like in this screenshot:

A screenshot of the BarbequeRTRM console (click the right link to view a full size image)

Starting from the top-right corner and turning clock-wise, in foreground you can see:

  • Resource Monitor: the active resource partition
  • Task Monitor: the resources assigned to the running applications
  • CPUs Load: workload on each of the CPUs of you target system
  • BBQUE Shell: where a set of test applications have been started and are producing their output;
  • BBQUE Log: the window displaying information produced by the BarbequeRTRM daemon
  • Syslog window: displaying the system log

In background there are some more windows which show some GNUPlot graph, being produced and updated at run-time, which represent a graphical representation of some metrics related to the RTRM behavios.

Congratulations, you have (we hope) a working BarbequeRTRM setup!

Testing the framework

Starting the Test Application

Once started the daemon, to check if the BarbequeRTRM is running properly you can try to launch a simple test application. To do that, after the BOSP shell initialization, type:

$ bbque-testapp

If everything is working the application will print a sequence of log messages about the Abstract Execution Model (AEM) calls executed and the number of onRun() cycles.

run.php.txt · Last modified: 2017/05/16 22:43 by jumanix

Page Tools