System Manager Service

PART 5. SUPPLEMENTARY DOCUMENTATION
System Manager Service

 

System Manager Service

·            Overview

·            System Manager Service API

System Manager Service

 

Overview

System Management has two definitions in ESF.  First, there is a system manager service in ESF.  It is really a service to distribute information about the state of the system.  A properties file contains information such as Wind River Linux (WRL) version information, JVM version, JVM profile, number of Ethernet devices, etc.  This information is provided via a service API to other bundles within the system.  System Management also refers to overall management of the software, updates, and configuration.  All of the software in the system needs to be maintained in the sense that it can be upgraded and modified over time.

 

The System Manager Service is purely a tool for providing information about the state of the system.  System Management is a concept about how to control the software and the metadata in the System Manager Service over time.  There are many tools in ESF to aid in overall System Management including two basic components: Software Updater and Configuration Manager.  These two items will not be covered in this section.  For more information on these components, you can visit the Code Update Deployment section or the Configuration Deployment sections.  Code examples for these two sections are here and here respectively.

 

System Manager Service API

The System Manager Service is quite simple in how it works.  There is a basic properties file called

 

/opt/jvm/esf/configuration/.esf/com.esf.core.system.manager/esf.props

 

that contains the basic non-dynamic properties of the system.  The following is an example esf.props file for the system manager.

 

########################################################################

platform=helios

osArch=x86

osName=Linux

osVersion=2.6.27.39-WR3.0.2ax_standard

osDistro=wrl

osDistroVersion=3.0.2

javaVmName=J9

javaVmVersion=2.4

javaProfile=harmony

company=eurotech

project=denali

entity=eurotech

########################################################################

 

The definitions of the properties are

·            platform –hardware platform this instance of ESF is running on

·            osArch –processor architecture

·            osName –OS name ESF is running on

·            osVersion –OS version (the kernel version in the case or WRL)

·            osDistro –OS distribution name if applicable

·            osDistroVersion –OS distribution version if applicable

·            javaVmName –JVM name

·            javaVmVersion –JVM version

·            javaProfile –JVM profile

·            company –company who owns this ESF application

·            project –project name for this product

·            entity –base MQTT topic to use if applicable

 

Each of these properties must be updated as the components are updated so they are properly reflected via the service API.

 

The following are additional services provided for more dynamic features of the system:

·            Getting the primary MAC address

o   This is the MAC address of the first (if more than one) Ethernet controller.  It can and frequently is used as a unique identifier for the system.

·            Getting the product version

o   The product version is held in the /etc/esf/release.xml file.  The System Manager Service fetches it and can provide it to calling methods.

·            Getting ESF_HOME

o   ESF_HOME is defined as the directory root of ESF.  It is commonly /etc/jvm/esf on WRL.

·            Getting the ESF base bundle directory

o   This is commonly the $ESF_HOME/bundlefiles on WRL.

·            Getting the ESF configuration directory

o   This is commonly the $ESF_HOME/configuration/.esf directory on WRL.

·            Getting the ESF temporary directory

o   This is commonly /tmp/.esf/ on WRL.

·            Getting the Ethernet interfaces

o   This returns an ArrayList of Strings representing the Ethernet interfaces on the board

·            Getting the COM ports

o   This returns an ArrayList of com.esf.core.system.manager.service.EsfSerialPort definitions.  It is dynamic in that USB-to-Serial devices are also returned in this list.

 

As part of updating a system, it is also important to keep these system properties up-to-date in /opt/jvm/esf/configuration/.esf/com.esf.core.system.manager/esf.props.  Any time one of these properties are updated, the file showing it should also be updated.  This will help keep components that are dependent on specific versions up-to-date with the current state of the system.