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 |
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.