Auto Collecting Engine Data
The collection of data require multiple engine API ( OSGi commands). These APIs are invoked internally and output is exported in file format at a specified location.
bwadmin Command Line
A REST API is provided to collect engine or an AppNode data. Invoke the REST API as POST: http://<host>:<port>/bw/framework.json/collect/.
The engine data collected for an AppNode for TIBCO ActiveMatrix BusinessWorks™ is stored at <user.dir> \..\debug\APPNODE_DATA_<TIME_STAMP>.zip where <user.dir> is of the form
$BW_HOME\bw\<version>\domains\<domain_name>\appnodes\<appspace_name>\<appnode_name>\bin
Execute the following command at the command line to collect AppNode's data:
- In a terminal, navigate to BW_HOME\bin and type bwadmin.
- Go to
MyDomain.
bwadmin[admin]> cd MyDomain
- Go to
MyAppSpace.
bwadmin[admin@MyDomain]> cd MyAppSpace
- Start the AppNode, if it is not already running:
bwadmin[admin@MyDomain/MyAppSpace]> start appnode MyAppNode
- Go to
MyAppNode
bwadmin[admin@MyDomain/MyAppSpace]> cd MyAppNode
- Run the collectappnodedata command
bwadmin[admin@MyDomain/MyAppSpace/MyAppNode]>collectappnodedata [options] [operation]
The following options are available:
Option | Description |
---|---|
-o, -override | Delete all previously created data files. Generate new files as per the selected operation. It has two options true or false.
The default option is true. |
-i, -input |
Input list of operations to be performed. Comma-separated list without space. Sample input: "THREAD_DUMP", "HEAP_DUMP", "VM_ARGUMENTS", "ENVIRONMENT_VARIABLES", "THREAD_SNAPSHOT", "MEMORY_SNAPSHOT", "SYSTEM_PROCESS_INFORMATION", "SYSTEM_PROPERTIES", "CPU_INFORMATION", "osgiCommand1", "osgiCommand2" |
-d, -domain | Domain name |
-p, -path | Output directory path |
-n, -appnode | Name of an AppNode |
-a, -appspace | AppSpace name, Applicable when an entity is an AppNode |
-al, -all | Download all files from specified directory path. |
-dp, -downloadpath | Download all files from the specified directory path. It has two options true or false.
The default option is false. |
-dd, -downloadanddelete | Delete file after download. It has two options true or false.
The default option is false. |
--help | Display this help message |
Admin UI
To collect an AppNode data of a running AppNode using Admin UI :
- Navigate to the AppNode level 2 page.
- Open the Appnode Data tab.
- Select the operation from the list of default operations provided. By default, the following operations are provided:
"THREAD_DUMP", "HEAP_DUMP", "VM_ARGUMENTS", "ENVIRONMENT_VARIABLES", "SYSTEM_PROPERTIES", "THREAD_SNAPSHOT", "MEMORY_SNAPSHOT","SYSTEM_PROCESS_INFORMATION","CPU_INFORMATION", "LMETRICS", "LCFG", "LP", "LA", "LENDPOINTS","LAPI"
To select all operations from the list, select the Select All Operation option.
To add the custom operation to the list, type a name of a custom operations and press Enter.
- Click Collect. The dialog box is displayed showing the list of operations selected. Clear the Override check box if you do not want to override the data file.
- The AppNode data is collected at the TIBCO_HOME/bw/<version>/domains/<domain_name>/appnodes/<AppSpace_Name>/<AppNode_Name>/debug folder in the .zip format.
- The
Appnode Data List section shows the list of data files collected at the
TIBCO_HOME/bw/<version>/domains/<domain_name>/appnodes/<AppSpace_Name>/<AppNode_Name>/debug folder on your file system.
- To delete the data file from the Appnode Data List section as well as from your file system, click the Delete button at row level.
- To delete multiple data files, select the check boxes on the left side of those rows and click the Delete button on top of the list.
- To download the AppNode's data on your local system, click the Download button on right side of the data file in the list.
- To download multiple data files, select the check boxes on the left side of those rows and click the Download button on top of the list.
- To select all entries irrespective of pagination, and perform bulk delete or download operations in the AppNode Data List, select the Select All check box and click Delete or Download buttons on the top of the list.
REST API
The operation details are as follows:
Operation | Description |
---|---|
ALL | This API is used for executing default set of operations.
The default set of operations is as follows: [ "THREAD_DUMP", "HEAP_DUMP", "VM_ARGUMENTS","ENVIRONMENT_VARIABLES", "SYSTEM_PROPERTIES", "THREAD_SNAPSHOT","MEMORY_SNAPSHOT", "SYSTEM_PROCESS_INFORMATION","CPU_INFORMATION","LMETRICS", "LCFG", "LP", "LA", "LENDPOINTS","LAPI *"] |
INCLUDE | This API accepts a list of commands or operations as an input in the form of JSON list.
Only listed operations are executed. |
EXCLUDE | This API accepts a list of commands or operations as an input in the form of JSON list. All default set operations excluding the set of operation given as input is executed. |
DOWNLOAD | This API is available to download all collected data as a stream APPLICATION_OCTET_STREAM |
LIST | This API is available to list the files present. |
DELETE | This API is available to delete data files created. |
Header Parameter | Description |
---|---|
PATH | An optional parameter to provide a directory path where the data is collected or is downloaded. |
OVERRIDE | An option for collect data operation [ALL, INCLUDE, EXCLUDE], where the data collected previously is overwritten by the new data.
The default value is TRUE. |
ALL | An option for operation DOWNLOAD, where all files present are compressed at one file with name APPNODE_DATA.zip and downloaded at once. The default value is FALSE. |
DOWNLOADANDDELETE | An option for operation DOWNLOAD, where the file is deleted after the download operation.
The default value is FALSE. |
LOGIN | This option is required for authorization of the user. This option is mandatory. It is the login id for the session. |
API consumes entity: INPUT
Required Header parameter: Content-Type=application/json
JSON list of commands: Sample input: ["command1" , "command2"].
Applicable for INCLUDE and EXCLUDE operations.