Using the ControlConsole utility to free memory
LMServer maintains an in-memory database. By default, this database holds up to 15 days of monitoring data. This database can fill up, causing LMServer to run out of memory.
ControlConsole is a Java utility that performs various logging and monitoring operations. ControlConsole accepts the following options for freeing memory:
*gc
Runs Java garbage collection
*dataunload <number of days of monitoring data to keep>
Releases monitoring data from memory that is older than the number of days you specify
How to run the ControlConsole utility
1 Create the following environment variables:
*AC_CONFIG_HOME
Location of the shared configuration directory for a cluster. If the system administrator created a folder for the shared configuration directory named config_cluster, and assuming the BIRT iHub installation folder is C:\Actuate3\BIRTiHubVisualization, the default location for AC_CONFIG_HOME is:
C:\Actuate3\BIRTiHubVisualization\modules\BIRTiHub\iHub\shared\config_cluster
*AC_DATA_HOME
Location of logs to which BIRT iHub processes write and System Console monitors. Assuming the BIRT iHub installation folder is C:\Actuate3\BIRTiHubVisualization, the default location for AC_DATA_HOME is:
C:\Actuate3\BIRTiHubVisualization\modules\BIRTiHub\iHub\data
*JAVA_HOME
Location of the Java JRE. Assuming the BIRT iHub installation folder is C:\Actuate3\BIRTiHubVisualization, the default location for the JRE is:
C:\Actuate3\BIRTiHubVisualization\java
2 Append the following value to the PATH environment variable:
%JAVA_HOME%\bin
3 Open a command prompt. Navigate to AC_SERVER_HOME\Jar. The lmsutility.jar file contains the ControlConsole utility. Run ControlConsole by executing the Java command, including the classpath of the ControlConsole utility, followed by:
-h <hostname> <command option>
For example, on a machine named urup, run ControlConsole with the help command option, which lists the ControlConsole command options:
java -classpath .;lmsutility.jar com.actuate.lmservice.utils.ControlConsole -h urup help
Listing 7‑8 shows this command and its output.
Listing 7‑8 Executing the ControlConsole help command
C:\Actuate3\BIRTiHubVisualization\modules\BIRTiHub\iHub\Jar>java -classpath .;lmsutility.jar com.
actuate.lmservice.utils.ControlConsole -h urup help
 
Help documentation:
Usage: lmsctrl -p password (-h hostname) command
Usage: ping command does not need to have password. hostname is optional where command is one of the follow:
shutdown lmserver | lstailer
ping lmserver
gc
start logging | monitoring
stop logging | monitoring
restart logging | monitoring
memprofile
datareload
dataunload day //dataunload command second parameter is number of days_to keep
nightlysnapshot
snapshotcsv yyyy-MM-dd //snapshotcsv command second parameter is data format
help
Command Example:
lmsctrl -p password -h svr1 shutdown lmserver
lmsctrl -p password -h svr1 restart monitoring
4 Run Java garbage collection by executing the gc command, as shown in Listing 7‑9.
Listing 7‑9 Running Java garbage collection
C:\Actuate3\BIRTiHubVisualization\modules\BIRTiHub\iHub\Jar>java -classpath .;lmsutility.jar com.
actuate.lmservice.utils.ControlConsole -h urup gc -p password
Send control command to host:urup
 
LMServer execute gc command issued
 
C:\Actuate3\BIRTiHubVisualization\modules\BIRTiHub\iHub\Jar>
5 Release monitoring data from memory that is older than the number of days you specify by running ControlConsole with the dataunload <number of days of data to keep> command option. Listing 7‑10 shows running this command option to keep three days worth of monitoring data.
Listing 7‑10 Releasing monitoring data older than number of days you specify
C:\Actuate3\BIRTiHubVisualization\modules\BIRTiHub\iHub\Jar>java -classpath .;lmsutility.jar com.
actuate.lmservice.utils.ControlConsole -h urup dataunload 3 -p password
Send control command to host:urup
 
dataunload command successful
 
C:\Actuate3\BIRTiHubVisualization\modules\BIRTiHub\iHub\Jar>
6 View the amount of memory used and the amount of memory free by running ControlConsole with the memprofile command option. Listing 7‑11 shows running ControlConsole with this command option.
Listing 7‑11 Viewing the amount of memory used and amount of memory free
C:\Actuate3\BIRTiHubVisualization\modules\BIRTiHub\iHub\Jar>java -classpath .;lmsutility.jar com.
actuate.lmservice.utils.ControlConsole -h urup memprofile -p password
Send control command to host:urup
 
MEMORY USED: 25 MB MEMORY FREE: 353 MB Completed operation in : 2 Sec
 
C:\Actuate3\BIRTiHubVisualization\modules\BIRTiHub\iHub\Jar>