Properties
The configuration file related to mBSA OSGi Runtime management is mbsap.mbsmanager.prs from the <image_home_dir>/mbsa/bin/configs/<os_name> directory. In general, the properties there allow you to:
To apply property changes, restart mBSA.
Change the JVM to Start OSGi Runtime On
By default, mBSA starts the OSGi framework on JDK. To run the framework on a different JVM, simply edit the mbs.manager.rtc.1.working_dir property. For example, to run the framework on JDK:
mbs.manager.rtc.1.working_dir=../vms/jdk
As a result, mBSA will load the server framework starting script from the JVM-specific directory. Note that you have to configure the settings needed for the successful execution of the server file. Refer to the Starting the Framework document for more information about running on certain JVMs.
Run OSGi with Options for Activating Specific Features
By specifying additional options to the server file starting the OSGi framework you can automatically activate specific features of the framework, such as resource management, lazy policy support, etc. Add the needed server option next to "mbsa" in the mbs.manager.rtc.1.args property.
For example, to launch the OSGi framework with active security features and manager, which corresponds to executing of:
server security
set the following:
mbs.manager.rtc.1.args=../../../../mbsa/bin/vms/mbsa security
Specify the Period to Ping the OSGi Runtime
You can change the period over which mBSA will check if the OSGi Runtime is operational. Edit the mbsa script file from the <image_home_dir>/mbsa/bin/vms and change the following property:
-Dmbs.mbsa.ping.timeout=<ping_period_in_ms>
Next, make sure that the mbs.manager.ping.timeout property from mbsap.mbsmanager.prs has value double the one you set with the -Dmbs.mbsa.ping.timeout option.
Configure Resource Monitoring
Use the mbs.manager.mbs_watchdog.<resource_type> properties to configure resource constraints including memory consumption, CPU usage.
mbs.manager.mbs_watchdog.period – Defines the period in seconds to check the state of the OSGi Runtime.
mbs.manager.mbs_watchdog.cpu_enabled – Can be true or false. Activates watching for high CPU usage.
mbs.manager.mbs_watchdog.cpu_limit – Defines the maximum percent of CPU usage that the OSGi Runtime should have.
CPU monitoring for Linux based boards, where threads are listed in procfs as separate processes, does not work.
mbs.manager.mbs_watchdog.mem_enabled - Can be true or false. Activates watching for high memory consumption.
mbs.manager.mbs_watchdog.mem_limit - Defines the maximum amount of memory in KB that the OSGi Runtime should use.
You need not configure mbs.manager.mbs_watchdog.count_only_Xxx properties for the Runtime.
You can define corrective actions in case the OSGi process consumes too much resources. Use the following properties:
with one of the following values:
Configure mBSA Logging
Configure Core and Plug-in Loggers Simultaneously
To configure the mBSA logs in the OSGi Runtime, edit the following variables for the MBSA logging configurations:
set LOG_CFG=core.log.maxsize=250 core.log.parts=2 core.log.maxcount=10 core.log.enable=true
export LOG_CFG="core.log.maxsize=250 core.log.parts=2 core.log.maxcount=10 core.log.enable=true"
from the mbsa_start script files placed in the <image_home_dir>/mbsa/bin directory.
set FEATURES=%FEATURES%-Dmbsa.lib.core.log=%MBSA_ROOT%/bin/logs/fwcore/mbsaj.core.log -Dmbsa.lib.core.log.parts=2 -Dmbsa.lib.core.log.maxsize=250 -Dmbsa.lib.core.log.maxcount=10 -Dmbsa.lib.core.log.enable=true
export FEATURES="$FEATURES -Dmbsa.lib.core.log=$MBSA_ROOT/bin/logs/fwcore/mbsaj.core.log -Dmbsa.lib.core.log.parts=2 -Dmbsa.lib.core.log.maxsize=250 -Dmbsa.lib.core.log.maxcount=10 -Dmbsa.lib.core.log.enable=true"
from the mbsa scripts placed in the <image_home_dir>/mbsa/bin/vms directory.
The plugin logger properties inherit the core logger ones (core.log.XXX - see the "Log Properties" section below) to simplify log configuration. In rare cases, where plugin logger configuration should differ from core logger one, edit mbsal.core.prs by uncommenting the relevant core.plugins.log.XXX properties (disabled by default).
Configure Core and Plug-in Loggers Separately
Refer to the Log Properties section below for the log properties description.
The following table presents the mapping between the -Dmbsa.lib.core.log.XXX Java core properties and the corresponding mBSA core log properties - core.log.XXX:
mBSA Java Core Log Properties |
Core Log Properties |
|---|---|
-Dmbsa.lib.core.log |
- |
-Dmbsa.lib.core.log.parts |
core.log.parts |
-Dmbsa.lib.core.log.maxsize |
core.log.maxsize |
-Dmbsa.lib.core.log.maxcount |
core.log.maxcount |
-Dmbsa.lib.core.log.enable |
core.log.enable |
Log Properties
The properties related to modifying the mBSA logging are as follows:
Core Properties |
Plug-In Properties |
Description |
|---|---|---|
core.log.file |
- |
Specifies the core log file. Default value is ./logs/mbsa_start.log |
mbsa.log.file |
- |
Specifies the mbsa start/stop log files. Modify these properties in the mbsa_start/mbsa_stop scripts. |
- |
core.plugins.log.dir |
Specifies the log directory of plug-ins. Default value is ./logs |
core.log.enable |
core.plugins.log.enable |
Can be true or false. Defines if the logging for core/all plug-ins is enabled or disabled. |
core.log.maxsize |
core.plugins.log.maxsize |
Defines the maximum size (in kilobytes) of single core/plugin logs. When 0, no maximum size is set. |
core.log.maxcount |
core.plugins.log.maxcount |
Defines the maximum log files per core/plugin. When the plugin or the core log's count exceeds this value, the oldest logs are deleted. Set it to 0 for no restriction on the count of log files. |
core.log.parts |
core.plugins.log.parts |
Defines the runtime log parts. Each log file will be with size = maxsize/parts. Used only if maxsize is set. |
If you have a specific mBSA problem, an advantage will be to increase the logging verbosity by setting core.plugins.log.level to 9999 before sending logs for troubleshooting. In this case, disable also log rotation by setting the core.plugins.log.maxsize property to 0.
Basic Log Configuration Tasks
In order to change the log directory for plug-ins, define the property responsible for specifying the log directory:
In order to disable the logging of the mBSA, locate the following property and set its value to false:
There is no monitoring for <image_home_dir>/mbsa/bin/mbsa.crash*.log files, so they are kept forever. To move them along with the other mBSA logs into a volatile storage, e.g. to redirect them to <image_home_dir>/mbsa/bin/logs/:
## Uncomment to override default mBSA crash log dir "."
export MBSA_CRASHDIR=./logs
You can disable mBSA Logging by setting the environment variable MBSA_LOG_DISABLED to the value of "1".
export MBSA_LOG_DISABLED=1
set MBSA_LOG_DISABLED=1