A number of command line utilities are included with AMC and its associate product, the Action Manager (AM). These command line utilities help in installing, uninstalling or re-installing the AMC war file. There are also scripts for backup and restore, as well as a migration script. The migration script is for migrating to future versions of AMC and AM, and not for migrating from previous version to the current version. All these scripts get installed in the TDI_install_dir/bin/amc directory.
Usage: install
This
script does not take any parameters.
Usage: uninstall
This
script does not take any parameters.
Usage: backupamc [-d folder_to_create_backup_in]
If the
-d option is not specified, the files are copied to the TDI_install_dir/bin/amc/ActionManager/backup_tdiamc directory.
The following files are backed up:
Usage: restoreamc
This
script does not take any parameters.
This script requires the new AMC plug-in archive to be copied into the TDI_install_dir/amc directory.
Usage: migrateamc.bat [-d backup_directory]
If a service name is passed, the service will be started instead of calling lwiStart.
If a service name is passed, the service will be stopped instead of calling lwiStop.
The script has the Classpath defined for all the jars required by the Action Manager. There are two variables, CLASSPATH and DB_CLASSPATH. The DB_CLASSPATH has the path separated list of .jar files required for achieving JDBC Connectivity with the database. When AMC is configured to use Oracle, MS SQL Server or DB2 the corresponding JDBC .jar files of these databases should be added to the DB_CLASSPATH variable.On Windows, the script accepts an optional service name parameter that can be used to start an already registered service:
startAM.bat [service name]
On Windows, the script accepts an optional service name parameter that can be used to stop an already registered service:
stopAM.bat [service name]
Usage: startNetworkServer
Usage: stopNetworkServer
The setDBType script is called internally by the startNetworkServer and stopNetworkServer scripts for setting the DB_TYPE and the DB_USER and DB_PASSWORD properties.
Usage: backupamcdb -d folder_which_contains_AMC_backup -p location_of_the_amc.properties_file
Usage: restoreamcdb -d folder_which_contains_AMC_backup -p location_of_the_amc.properties_file
Usage: backupam [-d backup_directory]
The
archived info is created in the backup folder. If the -d option is
not specified the files are copied to the TDI_install_dir/bin/amc/ActionManager/backup_tdiamc directory.
Usage: restoream [-d backup_directory]
If
the -d option is not specified, the files are copied from the TDI_install_dir/bin/amc/ActionManager/backup_tdiamc directory.
Once these roles are granted to the install user, that user has the authorization to add new users and grant them with the necessary roles. The install user becomes the administrator for the AMC console module.
Usage: setAMCRole username [OS Group]
The OS Group is an optional parameter while deploying AMC on ISC SE.
The usage for this command is:
tdimigam -f propfile [-b backfile] [-n newfile] [-v] [-?]
where:
-f propfile - The name of the file to migrate
-b backfile - Backup the original file with the specified name
-n newfile - Name to give the file that is migrated
-v - Enable verbose mode
-? - Prints the usage statement
Logging for this command is controlled by the tdimigam-Log4J.properties file.
The usage for this command is:
tdimigamc -f propfile [-b backfile] [-n newfile] [-v] [-?]
where:
-f propfile - The name of the file to migrate
-b backfile - Backup the original file with the specified name
-n newfile - Name to give the file that is migrated
-v - Enable verbose mode
-? - Prints the usage statement
Logging for this command is controlled by the tdimigamc-Log4J.properties file.
Usage: addAMCService Service_Name
On Windows the script
registers the Generic Windows Service executable (TDI_install_dir/bin/amc/amcwinservice.exe)
from the IBM Platform Integration Toolkit. The Generic Windows Service
uses the configuration file TDI_install_dir/bin/amc/amcwinservice.ini.
That file specifies the name of the service and the start/stop commands.
The file is automatically populated by the installer or the "addAMCService"
script.
By default the file looks like this:
[Service] ServiceName=$service_name$ WorkingDirectory="$install_dir$\bin\amc" StartCommand=""$install_dir$\bin\amc\amcservice.bat" start amc am" StopCommand=""$install_dir$\bin\amc\amcservice.bat" stop amc am"
This means that by default the AMC service runs both the AMC and the Action Manager.
After you call "addAMCService", we can edit the .ini file to customize which components are run by the service (both AMC and AM, just AMC or just AM).
For example to run only the AMC, specify start and stop commands like the following:
StartCommand=""$install_dir$\bin\amc\amcservice.bat" start amc" StopCommand=""$install_dir$\bin\amc\amcservice.bat" stop amc"
To start/stop the service use the GUI "Services" utility (Control Panel -> Administrative Tools -> Services) or the Service Controller command line tool:
sc start <service name> sc stop <service name>
Beware that in the "Services" utility the display name of the registered service looks like this:
IBM TDI Administration and Monitoring Console - myamc
where "myamc" is the service name that you specified as an argument to "addAMCService.bat".
On UNIX the script appends a line like the following at the end of the /etc/inittab system file:
<service name>::once:"<install dir>/bin/amc/amcservice.sh" start amc am
To stop the service use the "amcservice.sh" script from the TDI_install_dir/bin/amc folder:
amcservice.sh stop amc am
or just
amcservice.sh stop amc
if the service runs only AMC.
Usage: deleteAMCService Service_Name
Usage: setDerbyProps
Usage: amcservice [start|stop] [amc] [am]
Examples:
amcservice start amc amcservice stop amc am