Jace Data Recovery
Jace Data Recovery
Jace Data Recovery
Confidentiality
The information contained in this document is confidential information of Tridium, Inc., a Delaware corpora-
tion (“Tridium”). Such information and the software described herein, is furnished under a license agreement
and may be used only in accordance with that agreement.
The information contained in this document is provided solely for use by Tridium employees, licensees, and
system owners; and, except as permitted under the below copyright notice, is not to be released to, or re-
produced for, anyone else.
While every effort has been made to assure the accuracy of this document, Tridium is not responsible for
damages of any kind, including without limitation consequential damages, arising from the application of the
information contained herein. Information and specifications published here are current as of the date of this
publication and are subject to change without notice. The latest product specifications can be found by con-
tacting our corporate headquarters, Richmond, Virginia.
Trademark notice
BACnet and ASHRAE are registered trademarks of American Society of Heating, Refrigerating and Air-Con-
ditioning Engineers. Microsoft, Excel, Internet Explorer, Windows, Windows Vista, Windows Server, and SQL
Server are registered trademarks of Microsoft Corporation. Oracle and Java are registered trademarks of
Oracle and/or its affiliates. Mozilla and Firefox are trademarks of the Mozilla Foundation. Echelon, LON, Lon-
Mark, LonTalk, and LonWorks are registered trademarks of Echelon Corporation. Tridium, JACE, Niagara
Framework, NiagaraAX Framework, and Sedona Framework are registered trademarks, and Workbench,
WorkPlaceAX, and AXSupervisor, are trademarks of Tridium Inc. All other product names and services men-
tioned in this publication that is known to be trademarks, registered trademarks, or service marks are the
property of their respective owners.
Niagara 4 includes support for “battery-less” JACE operation, where a JACE uses capacitor-charged SRAM
(static random access memory), to preserve RAM-resident data when a power outage occurs. This includes
station data not yet committed to non-volatile flash memory.
• Initially, this applied only to a QNX-based controller with an installed SRAM option card. Previously, such
controllers were always considered “battery-less”, where any installed backup battery was removed
when the option card was installed. However, with later releases, including Niagara 4, a JACE controller
can use both SRAM and a backup battery.
• The QNX-based JACE models have onboard SRAM as standard—no option card required. This includes
the JACE-8000 series controller, plus the JACE-3E, and NPM6E processor-based series (JACE-6E and
“retrofit board” JACE-603 and JACE-645 controllers). The JACE-8000 controllers ship “battery-less”.
The JACE-6E and JACE-3E controllers ship “battery-less” as well however, you can optionally install a
NiMH backup battery (identical to the one in JACE-6 series controllers).
• N4.1 supports the JACE-8000 controller model. AX-3.7 and AX-3.8 support all the controller models (ex-
cept the JACE-8000) and also all controllers with an installed SRAM option card. For JACE-3E support,
build AX-3.7.105 or later is required.
N O T E : The Security JACE platform does not include SRAM, nor does it support the SRAM option card/
DataRecoveryService in any build of NiagaraAX.
For hardware mounting details, refer the installation document that ships with each SRAM option card or
SRAM-equipped controller. This document summarizes usage scenarios and software operation details of
the SRAM memory feature.
Battery-less JACE (with SRAM) JACE with SRAM plus backup battery JACE using only backup battery
This is the “battery-less” controller configu- Since Niagara 3.6.44 or later, an SRAM- Sometimes a station is a poor candidate for
ration for the Niagara implementation of equipped JACE can utilize both SRAM and SRAM support. Disabling SRAM operation
SRAM. No backup battery (NiMH or other- an installed backup battery, like the NiMH is best in this case, even if “onboard”
wise) is attached to the JACE. battery pack shown above. SRAM.
This configuration also applies to the JACE-
8000 controllers (not shown), which do not
support battery backup.
Ba t t er y- le ss ver s us b at t e r y t r ad e- offs
Any JACE controller with a charged backup battery holds a key advantage over a battery-less SRAM-
equipped JACE, in this regard:
• Station operation continues (uninterrupted) across very short power outages, that is “power bumps” last-
ing only a few seconds—without initiating an orderly shutdown.
[A UPS could be used to mitigate this, but this would re-introduce battery maintenance for the UPS.]
The NiMH battery provides enough power for this, immediately recharging when power is restored. If a
power outage lasts longer than its defined “shutdown delay” time, the NiMH battery allows sufficient time
for the JACE to perform an “orderly shutdown”, including saving the station’s database (config.bog) and all
recorded alarm and history records.
However, a JACE without SRAM but with a weak NiMH battery is exposed to a different power outage issue
—where the potential exists for data loss (since the last station save), due to insufficient battery power to
complete an orderly shutdown. Potentially, this could also occur if enough power outages occur in rapid suc-
cession—draining the controller’s battery to a low level.
A battery-less JACE solves that problem, as all station-generated data (changed from that stored in its non-
volatile flash memory at the time of power loss) is always preserved in SRAM. Upon power restoration, this
data is “played back” in the station during startup, then saved in its non-volatile flash memory.
S R A M d o e s n o t p re s e r v e d a t a o r f i l e s e x t e r n a l t o s t a t i o n
Please note that if a JACE power event occurs when station users have unsaved file changes, say in a Px file
or Nav file being edited, those unsaved changes are lost. This behavior may seem different from a battery-
equipped JACE entering an ordered shutdown—but it is not.
The practical difference is that a battery-equipped JACE may keep running over a short “power bump”. Sta-
tion users may be aware of such an event, and react by saving changes (click S a v e button in the active view).
Providing that communications are still established, the file edited may be saved. Or, power may be lost only
momentarily, and then remain stable until the user does a normal save.
N O T E : A battery-less SRAM-equipped JACE does not provide a similar save opportunity after a power
bump—it is already busy rebooting. Therefore, as a best practice, you should advise system users of bat-
tery-less SRAM-equipped JACEs to save often when editing items like Px graphics and Nav files.
this hybrid configuration is standard with a “retrofit board” JACE-603 or JACE-645, assuming the control-
ler’s 12V SLA battery (in the controller’s enclosure) is retained.
Note in this hybrid configuration, JACE monitoring of backup battery(ies) continues—so “battery bad”
alarm notifications are still possible, and the regular replacement of backup batteries is still needed.
Again, the “SRAM plus battery” configuration for an SRAM-equipped controller is one of two possible con-
figurations where SRAM is used: the other is for a JACE controller to be “battery-less”.
N O T E : Although this hybrid configuration is typically the most desirable, note that some stations may be
poor candidates for SRAM operation, with SRAM support even counter-productive. In this case, a controller
platform that includes “built-in” SRAM (such as a JACE-6E or JACE-3E) can be configured to disable its Data-
RecoveryService, and use only its (optional) installed backup battery. Or, an SRAM option card can be re-
moved from another JACE controller, such that it also uses only its installed backup battery.
The following is required for SRAM support in a JACE controller, using either “onboard” SRAM or the SRAM
option card, along with the platform DataRecoveryService:
• A JACE-8000, JACE-6E, or JACE-3E controller with onboard SRAM, or
A JACE-603 or JACE-645 with onboard SRAM, licensed to run a NiagaraAX station, or
A JACE-2,-6,-7 controller running AX-3.6 or later, with an available option card slot, and
– An SRAM option card, installed in that option card slot.
– The “platDataRecovery” module must be installed in the JACE
(this module is automatically installed in platforms with "onboard" SRAM).
• The JACE must also be licensed for this feature—see “Licensing”.
Licensing
The JACE needs a license entry as shown here, to support the SRAM option card and DataRecoveryService:
<feature name="dataRecovery" expiration="2030-12-31"/>
JACE controllers with onboard SRAM should have the dataRecovery license feature by default. For JACEs
with SRAM option cards, ensure the feature is present in the license. If the license feature is missing, SRAM
will not work - either the DataRecoveryService in its station will be missing or will otherwise remain in a fault
condition.
NOTE:
• If the JACE is not properly licensed, this service remains in fault.
• This service includes a “Service Enabled” configuration property. The DataRecoveryService does not re-
place the PowerMonitorService.
N O T E : Starting in N4.0, the D a t a R e c o v e r y S e r v i c e E d i t o r view includes additional configurable fields.
For example, S t a t i o n S a v e L i m i t , S t a t i o n S a v e L i m i t P e r i o d , G e n e r a t e A l e r t o n R e p l a y and P l a t f o r m
Alarm Support.
Fi gu re 1 Data Recovery Service Editor in PlatformServices of SRAM-equipped JACE
The figure above shows the default view (for an AX release) for the service: the D a t a R e c o v e r y S e r v i c e
E d i t o r.
Note the example above reflects a scenario where a station save has occurred since the service was created.
Some SRAM “data recovery blocks” have already been flushed to flash (“Persistent Storage Size” is not 0.00
KB).
Blocks Configuration
These status properties include the following:
• Total Size
Reflects, in bytes, the total amount of SRAM buffer memory available to the service. For example, this is
“524288” for the 512 KB SRAM option card.
N O T E : For JACE-8000 controllers this is “262144” bytes for the 256 KB SRAM memory.
• Number of Data Recovery Blocks
Reflects the number of data block partitions of SRAM used, for example, 3.
• Active Directory
Reflects the directory used in SRAM for the active data block.
• Persistent Directory
Reflects the full flash file directory path used to store flushed “.drdb” files,
which equates to: /dataRecovery
• Full Policy
Reflects the current policy when an SRAM data block becomes full (currently “Flush”).
• Persistent Capacity
Reflects the size limit, in KB, for the total of all “flushed to flash” data block files (“.drdb” files). If this limit
is exceeded (see property “Persistent Storage Size”), the service automatically triggers a station save op-
eration. For related details see “Station save effects”.
F ig ure 3 Example SRAM data block, show both states “Active” and “Flushing”
The image above shows an example active SRAM block first near full, then “flushing” momentarily to flash—
an operation that lasts only a second or two. Another SRAM block becomes active when this happens, and it
is used until it fills and needs to flush to flash.
Above the bar graph of each block, its S t a t u s is described, typically as either: “Active”, “Idle”, or sometimes
“Flushing”, with other states “Purging”, “Awaiting Idle”, “Flush Queued”, “Defragmenting”, “Reserved”,
“Fail”, and “Unknown”.
Below the bar graph of each block, numerical amounts display, in bytes, for its total Capacity, currently Used
space, calculated Overhead Space, and available Free Space.
Usage goal
When recovering from a power outage (where a “controlled shutdown” did not occur), the goal is to retain
all runtime station data in volatile DRAM (Dynamic RAM) that had changed prior to power lost, that is, since
the last station save to the JACE’s NVRAM, also known as “flash” memory. Changes apply to all normally
persisted station data, including any changes to components, histories, and alarms.
Simply increasing the flash write frequency (for example upon each value change) is not viable because of
eventual damage to flash memory components. Additionally, the latency of flash writes is significant; such
writes may not complete if power is lost.
Replacing all flash memory on a JACE with SRAM is cost prohibitive; however, a memory caching scheme us-
ing SRAM was developed. See the section “SRAM based solution”.
Operation overview
Providing the JACE controller is equipped with SRAM and is properly licensed, the platDataRecovery mod-
ule dynamically creates a “DataRecoveryService” in the running station’s PlatformServices container. This
service presides over the SRAM option card, which in turn acts as a buffer for flash memory.
The new service partitions the SRAM into multiple buffers, or data “blocks”. In the initial usage there are 3
blocks. Only one these blocks is ever “active” at any time.
Operation can be described in the following modes:
• Recording (normal operation)
• Station save effects
• Playback scenario (power lost or reboot)
St a t ion s av e effec t s
When saving a station running the DataRecoveryService, the following things occur. Note this applies re-
gardless of how the save was issued—for example, a manually invoked command (S Sa v e S t a t i o n ), or an auto-
matically issued save, e.g. a “persistent space full” condition by the DataRecoveryService, or a station save
that occurs as part of a station copy operation, reboot command, or from a “controlled shutdown” while run-
ning on backup battery power:
1. The normal station save method is used to capture all changes to all the station’s object spaces (compo-
nents, alarm, history) to flash memory, saved as the files config.bog, alarm.zip and history.zip.
2. Upon a successful save, all “.drdb” files holding buffered data are erased from flash, as these are no lon-
ger necessary.
3. The active SRAM data block is also cleared; however, one block operates in a “reserved state”. This is
needed to capture any changes that may occur while the station is in the “saving” state. Otherwise, data
loss could potentially occur if power was lost during or immediately after a save.
Again, note that buffered data in flash and SRAM is not erased until the save (config.bog) is successfully writ-
ten to flash. Thus, data recovery records are not lost if a power loss occurs during a save.
1.
A reboot issued from system shell is one exception—no orderly shutdown occurs before such a reboot. There may be
.drdb files saved when this reboot happens. If so, these are “replayed” the same as if power is lost.
The DataRecoveryService provides the following diagnostic tools that may be useful if troubleshooting.
Also included here, a procedure for reformatting the SRAM option card (if necessary).
MESSAGE [11:20:39 13-Aug-10 EDT][sys] *** Station Started (27273ms) [153291ms total]
***
niagara>
MESSAGE [11:20:41 13-Aug-10 EDT][sys] Saving station...
This spy page, partially shown in above, provides numerous statistics about station data being backed up by
the service. Details about these statistics are outside the scope of this document.
Reformatting SRAM
When using a “serial shell” connection to a JACE controller with SRAM, a special “alternative boot” option
is available. A sub-option allows you to reformat the onboard SRAM installed in the JACE.
You must be near the JACE to make this direct serial shell connection, and also be able to easily power it off
and on as needed.
N O T E : In most cases the following reformat procedure will never be necessary. When shipped, the SRAM
option card is already properly formatted, and does not contain any stored data.
However, in rare cases it may be necessary to reformat using this procedure.
• Data bits: 8
• Parity: None
• Stop bits: 1
• Flow control: Hardware
Step 4 With your HyperTerminal session active, apply power to the JACE.
After a short delay, text should appear in the HyperTerminal window similar to below:
N O T E : Wait for the prompt:
Press ESC to choose alternate boot options...
and then press ESC.
IPL for NPM 2 (PPC405EP) v3.03 ECC
Autobooting...
launching devc
waiting for /dev/ser1
Enter choice:
Step 6 At the “Enter choice” prompt, type 11 and press ENTER.
The alternate boot menu repeats, only missing the selected item 11 (“Format SRAM option card
before mount”).
Step 7 Type c (to continue with boot) and press ENTER
You see “continuing boot...” along with other normal boot messages for TCP/IP initialization.
When the boot completes (at the login prompt), there should be entries indicating that a format
operation occurred, as shown in the following:
starting ntpd...
MESSAGE [15:36:48 29-Jun-2010] [tid=1] niagarad: starting, baja_home=/niagara