In this section:
Target audience:
- CAST administrators
Introduction
Analyzing source code and generating snapshots with CAST AIP is achieved using the GUI based application CAST Management Studio (CMS) - you can find out more details about this in Application Analysis and Measurement with CAST AIP.
If you need to automate source code analysis and/or snapshot generation with CAST AIP, then you can do so by using the CLI (Command Line Interface) provided with the CMS. This document explains how.
Prerequisites
Before you can starting using the CAST Management Studio CLI, you must ensure that you meet the following requirements:
An installation of CAST AIP is required - either a Full Installation or a All Application Intelligence Platform Applications installation (see Install CAST AIP components), which must be located on the machine you wish to run the CLI from. |
How does it work?
The CAST Management Studio CLI includes multiple command arguments to perform various different actions including:
- Accept Delivery
- Automate Delivery
- Set as current Version
- Run an analysis
- Generate a snapshot
- Delete a snapshot
- Delete snapshots in a list
- Delete snapshots within a range
- Import / Export .pmx files
- Prepare a Snapshot (prepare Analysis Service for snapshot generation (only required when using the CAST Architecture Checker/CAST Transaction Configuration Center and you have used the RunAnalysis option))
- Generate Hsq Report
- Configure platform preferences (set the license key, Delivery and Deployment folders)
- Clean up Analysis Units
- Remove unassociated Assessment Models
- Run an upgrade for an Assessment Model
To execute an action via the command line, you must specify the CAST-MS-CLI.exe executable (rather than the CAST-MS.exe executable which is used for the GUI). Command arguments are expressed as verbs and then various mandatory and optional (enclosed in square brackets) options. Each command argument verb and various examples is listed and explained below.
Miscellaneous information
Boolean format: [true|false]
String format: enclose with double quotes if containing blank spaces
- Date format: [yyyyMMdd|yyyyMMddHHmm]
- The examples listed below should be placed on one line if they are being used in a batch file.
- Use the -help command to list all possible parameters for an argument, for example:
CAST-MS-CLI.exe GenerateSnapshot -help
Output codes
The CLI will return two output codes:
- 0 = No error
- 2 = Error exists
Performance issues when using an Oracle Server host for the CAST AIP schemas
If you encounter performance issues when generating/deleting a snapshot from the command line using CAST AIP schemas hosted on an Oracle Server, CAST recommends that you consider making the following changes to force the use of the ALL_ROWS optimizer mode instead of the default RULE mode:
globallysharedsettings.ini
Add the following to the globallysharedsettings.ini file: (located here: %PROGRAMDATA%\CAST\CAST\<version>):
ForceOptimizerAllRows=1
CAST-MS.l4j.ini
Add the following to the CAST-MS.l4j.ini file (this file does not exist by default therefore you must create it in the root CAST AIP installation folder):
-Doptimizer_mode=ALL_ROWS
Command arguments
AcceptDelivery
Use this option to automate the acceptance of a Version.
Examples
Accepts delivery of a version named "4.4.0.2575 delta 2":
CAST-MS-CLI.exe AcceptDelivery -connectionProfile CAST_MNGT -appli "TEST" -version "4.4.0.2575 delta 2" -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
appli<string> | Specifies the parent Application of the Version you want to accept. |
version<string> | Specifies the name of the Version you want to accept. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
AutomateDelivery
Use this option to automate the creation of a new Version based on an existing Version, package the same source code packages, deliver it and accept the Version.
Examples
Creation of a version named "4.4.0.2575 delta 2" from another version named "4.4.0.2575 delta 1":
CAST-MS-CLI.exe AutomateDelivery -connectionProfile CAST_MNGT -appli "TEST" -version "4.4.0.2575 delta 2" -fromVersion "4.4.0.2575 delta 1" -date 20130701 -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
appli<string> | Specifies the parent Application of the Version you want to copy. |
version<string> | Specifies the name of the new Version you want to create. |
[fromVersion<string>] | Specifies the name of the existing Version you want to copy. Note that this is optional: if you omit it, then the last Version (i.e. the most recent) will always be used. |
[copySources[<boolean>]] | Use this option ONLY when copying the "Migrated Version" version that is produced following an upgrade. Do not use at any other time. |
[date<date>] | Specifies the new Date for the new Version. If omitted, the current date is used. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
CleanUpInactiveAnalysisUnits
Use this option to automate the corresponding Clean up Analysis Units GUI option.
Examples
Clean up inactive Analysis Units from managed Application "STQ AI":
CAST-MS-CLI.exe CleanUpInactiveAnalysisUnits -connectionProfile CAST_MNGT -appli "STQ AI" -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
appli<string> | Specifies the parent Application for the Snapshot you want to delete. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
ConfigurePlatformPreferences
Examples
CAST-MS-CLI.exe ConfigurePlatformPreferences -connectionProfile "v800_8348_mngt on CastStorageService _ NEFYN:2280" -licenseKey "xxxxx" -sourceDeliveryFolder "C:\CAST\Delivery" -sourceDeploymentFolder "C:\CAST\Deploy" -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
licenseKey<string> | Enter the license key provided to you by CAST. |
[sourceDeliveryFolder<string>] | Enter the location for the Source Code Delivery Folder and Source Code Deployment Folder. Please see Preferences - Platform Settings for more information about the path syntax that can be used. |
[sourceDeliveryFolder<string>] | |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
DeleteSnapshotsInList
This option is used to delete a comma separated list of existing snapshots.
Note that:
- using this option will delete the selected snapshots from the Dashboard Service and the Measurement Service (if the snapshots exist in the Measurement Service).
- this option INCLUDES an automatic Consolidate action on any remaining snapshots, so there is no need to run the Consolidate action from the GUI.
- any reconsolidated snapshots (i.e. those snapshots remaining at the end of the delete procedure) will be reuploaded to the Measurement Service if it has been configured.
Examples
CAST-MS-cli.exe DeleteSnapshotsInList -connectionProfile 800_MNGT -appli "STQ AI" -dashboardService 800_CENTRAL -snapshots 201607031300,201607031400
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
appli<string> | Specifies the parent Application for the Snapshot(s) you want to delete. |
dashboardService<string> | Specifies the parent Dashboard Service for the Snapshot(s) you want to delete. |
-snapshots<yyyyMMdd>[,<yyyyMMddHHmm>] | Specifies a comma separated list of snapshots to be deleted, based on their capture date. Note that seconds are not permitted in the capture date. |
[databaseServer<string>] | Specifies the database server on which the snapshot is located - may be required if it is not possible to distinguish two snapshots because all their attributes are identical, including the name of their Dashboard Service. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
DeleteSnapshotsWithinRange
This option is used to delete a range of existing snapshots.
Note that:
- using this option will delete the selected snapshots from the Dashboard Service and the Measurement Service (if the snapshots exist in the Measurement Service).
- this option INCLUDES an automatic Consolidate action on any remaining snapshots, so there is no need to run the Consolidate action from the GUI.
- any reconsolidated snapshots (i.e. those snapshots remaining at the end of the delete procedure) will be reuploaded to the Measurement Service if is has been configured.
Examples
CAST-MS-CLI.exe DeleteSnapshotsWithinRange -connectionProfile 800_MNGT -appli "STQ AI" -dashboardService 800_CENTRAL -beginDate 20160701 -endDate 20160703
CAST-MS-CLI.exe DeleteSnapshotsWithinRange -connectionProfile 800_MNGT -appli "STQ AI" -dashboardService 800_CENTRAL -beginDate 20160701
CAST-MS-CLI.exe DeleteSnapshotsWithinRange -connectionProfile 800_MNGT -appli "STQ AI" -dashboardService 800_CENTRAL -endDate 20160703
CAST-MS-CLI.exe DeleteSnapshotsWithinRange -connectionProfile 800_MNGT -appli "STQ AI" -dashboardService 800_CENTRAL -beginDate 20160701 -endDate 20160703 -preserveLast false
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. | - |
appli<string> | Specifies the parent Application for the Snapshot you want to delete. | - |
dashboardService<string> | Specifies the parent Dashboard Service for the Snapshot you want to delete. | - |
[beginDate<YYYYMMDD>] | Specifies the start date of the Snapshots to be deleted. Any snapshots created on this date will be included in the range to be deleted. | The beginDate and endDate parameters are optional, however, at least one of the two MUST be present:
|
[endDate<YYYYMMDD>] | Specifies the end date of the Snapshots to be deleted. Any snapshots created on this date will be included in the range to be deleted. | |
[preserveFirst<boolean>] | To aid reconsolidation, the very first snapshot that has ever been generated is NEVER deleted in any circumstance even if it is part of the specified date range. This option specifies (when set to false) that the very first Snapshot ever generated should be deleted. By default and when the option is not specified, it is set to True (i.e. the very first snapshot is never deleted). | - |
[preserveLast<boolean>] | To aid reconsolidation, the very last snapshot that has ever been generated is NEVER deleted in any circumstance even if it is part of the specified date range. This option specifies (false) that the very last Snapshot ever generated should be deleted. By default and when the option is not specified, it is set to True (i.e. the very last snapshot is never deleted). | - |
[databaseServer<string>] | Specifies the database server on which the snapshot is located - may be required if it is not possible to distinguish two snapshots because all their attributes are identical, including the name of their Dashboard Service. | - |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. | - |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. | - |
[logRootPath<string>] | Specifies the log root path. Please see Preferences - CAST General for more information. | - |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. | - |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. | - |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. | - |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. | - |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. | - |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt | - |
Export
Export settings to a .PMX file.
Example
CAST-MS-CLI.exe Export -connectionProfile CAST_MNGT -filePath D:\CAST-MS\export\CAST_MNGT.pmx -logRootPath "C:\CAST\Log"
Available options
filePath<string> | Specifies the name of the PMX file to export to. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
[connectionProfile<string>] | Specifies the name of connection profile to use to connect to the CAST Management Service. |
GenerateHsqReport
Use this option to run an HSQ report (the equivalent of the GUI based Generate report option).
Examples
CAST-MS-CLI.exe GenerateHsqReport -connectionProfile CAST_MNGT -captureDate 20130701 -appli "TEST" -dashboardService CAST_DASH -hsqFile "C:\template.hsq" -htmlFile "C:\out.html" -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
captureDate<yyyyMMdd>[,<yyyyMMddHHmm>] | Specifies the Snapshot Capture Date to identify the snapshot you want to generate a report for. Note that seconds are not permitted in the capture date. |
appli<string> | Specifies the parent Application for the Snapshot you want to generate a report for. |
dashboardService<string> | Specifies the parent Dashboard Service for the Snapshot you want to generate a report for. |
hsqFile<string> | Specifies the HSQ template you want to use for the report. A selection can be found in the "hsq" folder at the root of your CAST installation. |
htmlFile<string> | Specifies the output HTML file that will contain the report. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
GenerateSnapshot
Please note that CAST supports concurrent snapshot generation on the same workstation (whether through GUI/CLI) with the following conditions:
This option is used to generate a new snapshot from the command line.
Examples
Generation of a Snapshot for Application "TEST" in "CAST_DASH" Dashboard Service:
CAST-MS-CLI.exe GenerateSnapshot -connectionProfile CAST_MNGT -snapshot "Computed on 201307081426" -captureDate 20130701 -version "4.4.0.2575 delta 2" -appli "TEST"-dashboardService CAST_DASH-logRootPath "C:\CAST\Log"
CAST-MS-CLI.exe GenerateSnapshot -connectionProfile CAST_MNGT -snapshot "Computed on 201307081426" -captureDate 20130701 -version "4.4.0.2575 delta 2" -appli "TEST" -dashboardService CAST_DASH -databaseServer DB_SERVER -logRootPath "C:\CAST\Log"
Generation of a Snapshot for all Applications visible in the Applications view:
CAST-MS-CLI.exe GenerateSnapshot -connectionProfile CAST_MNGT-snapshot "Computed on 201307081426" -captureDate 20130701 -version "4.4.0.2575 delta 2" -logRootPath "C:\CAST\Log"
Generation of a Snapshot for all Applications associated to the "CAST_DASH" Dashboard Service:
CAST-MS-CLI.exe GenerateSnapshot -connectionProfile CAST_MNGT -snapshot "Computed on 201307081426" -captureDate 20130701 -version "4.4.0.2575 delta 2" -dashboardService CAST_DASH -logRootPath "C:\CAST\Log"
CAST-MS-CLI.exe GenerateSnapshot -connectionProfile CAST_MNGT-snapshot "Computed on 201307081426" -captureDate 20130701 -version "4.4.0.2575 delta 2" -dashboardService CAST_DASH -consolidateMeasures -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
snapshot<string> | Specifies the Name of the Snapshot to generate. It must be unique for a given Application in a given Dashboard Service. |
[captureDate<yyyyMMdd>[,<yyyyMMddHHmm>]] | Specifies the Snapshot Capture Date. When triggering Snapshots for each Application, the same Capture Date is used. It must be unique for a given Application in a given Dashboard Service. Note that seconds are not permitted in the capture date. |
[version<string>] | Defines a source code version name for your snapshot and is displayed only in the CAST Engineering Dashboard. The snapshot will always be triggered on the current version defined in the CAST Management Studio. When triggering Snapshots for each Application in one go, the same source code version name is used for all snapshots. The default is set to: N\A |
[appli<string>] | Specifies the Application to generate a Snapshot for. Must be omitted when triggering Snapshots for a given Dashboard Service (see -dashboardService below). |
[dashboardService<string>] | Specifies the Dashboard Service in which to generate the Snapshot. This will generate a Snapshot for all Applications associated to the chosen Dashboard Service. Not required if you are using the -appli option. |
[ignoreEmptyModule[<boolean>]] | If you set this option to true, empty modules will not cause the snapshot generation to halt. The default is set to: FALSE. |
[skipAnalysisJob[<boolean>]] | This option enables you to force the CAST Management Studio NOT to run the analysis of the source code (e.g. if you have already run it). This can save time during the process. The default is set to: FALSE. |
[consolidateMeasures[<boolean>]] | If you set this option, the snapshot results will be consolidated in the Measurement Service schema. If you include this option, please ensure that a Measurement Service schema is installed and activated for this Management Service. The default is set to: TRUE. Note that you may need to reload the CAST Application Analytics Dashboard so that your new results are displayed correctly. Please consult Reload the cache for more information. |
[databaseServer<string>] | Specifies the database server on which the snapshot is located - may be required if it is not possible to distinguish two snapshots because all their attributes are identical, including the name of their Dashboard Service. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
Import
This option is used to import settings from an exported .PMX file.
Example
CAST-MS-CLI.exe Import -connectionProfile CAST_MNGT -filePath D:\CAST-MS\export\CAST_MNGT.pmx -action replace -logRootPath "C:\CAST\Log"
Available options
filePath<string> | Specifies the name of the PMX file to import. |
action<string> | Three options are available:
|
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25) Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
[connectionProfile<string>] | Specifies the name of connection profile to use to connect to the CAST Management Service schema. |
PrepareSnapshot
Examples
Preparation of a Snapshot for Application "TEST":
CAST-MS-CLI.exe PrepareSnapshot -connectionProfile CAST_MNGT -appli "TEST" -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
appli<string> | Specifies the parent Application for the Snapshot you want to prepare. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
PreserveExistingAssessmentModel
This option is used to perform an upgrade of an Assessment Model to the next release of CAST AIP.
Note:
- This command should ONLY be used in the scope of an upgrade "with extensions", as described in Upgrading CAST AIP.
- This command is only available from CAST AIP 8.2.3 onwards.
Examples
CAST-MS-CLI.exe PreserveExistingAssessmentModel -migrateAssessment progressive -connectionProfile test_mngt -logFilePath D:\CUT-CLI.log
CAST-MS-CLI.exe PreserveExistingAssessmentModel -migrateAssessment conservative -connectionProfile test_mngt -logFilePath D:\CUT-CLI.log
CAST-MS-CLI.exe PreserveExistingAssessmentModel -migrateAssessment true -connectionProfile test_mngt -logFilePath D:\CUT-CLI.log
Available options
connectionProfile <string> | Specifies the name of connection profile to use to connect to the CAST Management Service. | |||||||||||
migrateAssessment <option> | Enables you to choose the upgrade option:
| |||||||||||
[sourceServerRootPath <string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. | |||||||||||
[codeResourceBasePath <string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. | |||||||||||
[logRootPath <string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. | |||||||||||
[workingPath <string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. | |||||||||||
[temporaryPath <string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. | |||||||||||
[host <string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. | |||||||||||
[port <integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. | |||||||||||
[from <string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. | |||||||||||
[logFilePath <string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
RemoveUnassociatedAssessmentModels
- Use with caution and ensure you have a backup of any Assessment Model you wish to retain (by exporting it to .PMX before you run the command).
- This may take some time to complete especially if you have multiple unassociated Assessment Models.
Example
CAST-MS-CLI.exe RemoveUnassociatedAssessmentModels -connectionProfile CAST_MNGT -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
RunAnalysis
This option is used to invoke a code analysis, without generating a snapshot. It is equivalent to the Run analysis only option available in the GUI - it runs all Analysis Units in an Application (if the Analyze Analysis Unit option is selected).
Examples
Runs an analysis for the Application "TEST":
CAST-MS-CLI.exe RunAnalysis -connectionProfile CAST_MNGT -appli "TEST" -logRootPath "C:\CAST\Log"
Runs an analysis for all Applications;
CAST-MS-CLI.exe RunAnalysis -connectionProfile CAST_MNGT -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
[appli<string>] | Specifies the Application to generate a Snapshot for. Must be omitted when triggering Snapshots for a given Dashboard Service (see -dashboardService below). |
[noSave[<boolean>]] | Allows you to specify whether the analysis results will be saved to the Analysis Service or not - this is useful if you are simply testing the analysis runs without error. The default is set to: FALSE. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
SetAsCurrentVersion
Use this option to set a version as "current".
Examples
Sets as current version a version named "4.4.0.2575 delta 2":
CAST-MS-CLI.exe SetAsCurrentVersion -connectionProfile CAST_MNGT -appli "TEST" -version "4.4.0.2575 delta 2" -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
appli<string> | Specifies the Application to which the target Version belongs. |
version<string> | Specifies the name of Version you want to set as "current". |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
ShowConfig
This option is primarily used to determine the names of the available Connection Profiles, Log File Path etc.
Example
CAST-MS-CLI.exe ShowConfig
Deprecated command arguments
DeleteOldSnapshots
This option is used to delete a range of existing snapshots.
Note that:
- using this option will delete the selected snapshots from the Dashboard Service and the Measurement Service (if the snapshot exists in the Measurement Service).
- this option INCLUDES an automatic consolidate action so there is no need to run the consolidate action from the GUI.
Examples
Deletion of all of the Snapshots except the oldest, up to the 1st of July 2015 for Application "STQ AI" in "800_CENTRAL" Dashboard Service:
CAST-MS-CLI.exe DeleteOldSnapshots -connectionProfile 800_MNGT -thresholdDate 20150701 -appli "STQ AI" -dashboardService 800_CENTRAL
Deletion of all of the Snapshots except the oldest, up to the 1st of July 2015 for Application "STQ AI" in "800_CENTRAL" Dashboard Service hosted in the DB_SERVER RDBMS:
CAST-MS-CLI.exe DeleteOldSnapshots -connectionProfile 800_MNGT -thresholdDate 20150701 -appli "STQ AI" -dashboardService 800_CENTRAL -databaseServer DB_SERVER
Deletion of all of the Snapshots up to the 1st of July 2015 for Application "STQ AI" in "800_CENTRAL" Dashboard Service hosted in the DB_SERVER RDBMS:
CAST-MS-CLI.exe DeleteOldSnapshots -connectionProfile 800_MNGT -thresholdDate 20150701 -appli "STQ AI" -dashboardService 800_CENTRAL -databaseServer DB_SERVER -preserveInitialSnapshot false
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
appli<string> | Specifies the parent Application for the Snapshot you want to delete. |
dashboardService<string> | Specifies the parent Dashboard Service for the Snapshot you want to delete. |
thresholdDate<yyyyMMdd>[,<yyyyMMddHHmm>] | Specifies the ending Capture Date of the Snapshots to be deleted. Note that seconds are not permitted in the capture date. |
[databaseServer<string>] | Specifies the database server on which the snapshot is located - may be required if it is not possible to distinguish two snapshots because all their attributes are identical, including the name of their Dashboard Service. |
[preserveInitialSnapshot<boolean>] | Specifies whether the oldest Snapshot should be retained or not. By default, if this option is not present, the option is set to TRUE. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
DeleteSnapshot
This option is used to delete an existing snapshot.
- using this option will NOT delete the selected snapshots from the Measurement Service (if the snapshot exists in the Measurement Service).
- this option does NOT include the "Consolidate" action. CAST highly recommends that you use the CAST Management Studio GUI to run a consolidation action after using the -DeleteSnapshot option.
Examples
Deletion of the 1st of July 2013 04:00:00 AM Snapshot for Application "TEST" in "CAST_DASH" Dashboard Service:
CAST-MS-CLI.exe DeleteSnapshot -connectionProfile CAST_MNGT -captureDate 201307010400 -appli "TEST" -dashboardService CAST_DASH -logRootPath "C:\CAST\Log"
Deletion of the 1st of July 2013 04:00:00 AM Snapshot for Application "TEST" in "CAST_DASH" Dashboard Service on DB_SERVER database:
CAST-MS-CLI.exe DeleteSnapshot -connectionProfile CAST_MNGT -captureDate 201307010400 -appli "TEST" -dashboardService CAST_DASH -databaseServer DB_SERVER -logRootPath "C:\CAST\Log"
Available options
connectionProfile<string> | Specifies the name of connection profile to use to connect to the CAST Management Service. |
captureDate<yyyyMMdd>[,<yyyyMMddHHmm>] | Specifies the Snapshot Capture Date to identify the snapshot to delete. Note that seconds are not permitted in the capture date. |
appli<string> | Specifies the parent Application for the Snapshot you want to delete. |
dashboardService<string> | Specifies the parent Dashboard Service for the Snapshot you want to delete. |
[databaseServer<string>] | Specifies the database server on which the snapshot is located - may be required if it is not possible to distinguish two snapshots because all their attributes are identical, including the name of their Dashboard Service. |
[sourceServerRootPath<string>] | Source Code Delivery Folder - a central location for storing successive and compressed versions of applications' source code as packaged by the Delivery Manager(s). Please see Preferences - Platform Settings for more information. |
[codeResourceBasePath<string>] | Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the applications' source code for analysis in uncompressed format. Please see Preferences - Platform Settings for more information. |
[logRootPath<string>] | Specifies the log root path folder. An absolute path is required. You can use either back or forward slashes. Please see Preferences - CAST General for more information. |
[workingPath<string>] | Refers to the LISA (Large Intermediate Storage Area). Please see Preferences - CAST General for more information. |
[temporaryPath<string>] | Refers to the LTSA (Large Temporary Storage Area). Please see Preferences - CAST General for more information. |
[host<string>] | Mail server IP, name or address. Please see Preferences - Mail for more information. |
[port<integer>] | Mail server port (default is 25)Default: 25 Please see Preferences - Mail for more information. |
[from<string>] | Optional sender (may be required by Mail server for SPAM filtering) Please see Preferences - Mail for more information. |
[logFilePath<string>] | Log file path. Default value is $TEMP$PRODUCTNAME$INCREMENT.log.txt |
YYYYMMDDHHmm>[,<YYYYMMDDHHmm