AppLogic 2.7/2.8 Documentation The latest production release is AppLogic 3.0.30
Component Control Commands
The following commands are supported:
| Command | Description |
| list | Retrieve list of components for a particular application |
| info | Retrieve detailed information for a component |
| start | Start a component |
| stop | Stop a component |
| continue | Continue starting of a component |
| restart | Restart a component |
| ssh | Access the shell in a component's virtual machine (over ssh) |
| login | Login to a component |
list
| Description: | List all components for the specified running application |
| Syntax: | component list name [ --batch [--extended] ] |
| Arguments: | name | Name of application for which to retrieve list of components |
| --batch | Display output in UDL format |
| --extended | Display all component information in the list |
| Examples: | component list sugarcrm - List components for application 'sugarcrm' |
| Notes: | A specification of the output of this command can be found here. |
Typical Output
Name Server State CPU Mem(MB) Bandwidth(Mbps)
main.mail srv1 running 0.01 32.00 1.00
main.logs srv2 running 0.01 32.00 1.00
main.config srv3 running 0.01 32.00 1.00
main.dbase srv1 running 0.01 128.00 1.00
main.srv2 srv2 running 0.10 64.00 1.00
main.srv1 srv3 running 0.10 64.00 1.00
main.webs srv1 running 0.01 32.00 1.00
main.admin srv2 running 0.01 32.00 1.00
main.usr srv3 running 0.01 32.00 1.00
info
| Description: | Retrieve detailed information for a specific component |
| Syntax: | component info name [ --batch [--extended]][ --verbose ] |
| Arguments: | name | Name of component for which to retrieve information. name should be of the form application name:component name |
| --batch | Display output in UDL format |
| --extended | Display extended component information |
| --verbose | Include list of interfaces for the component |
| Examples | component info sugarcrm:main.config - Display information for component 'main.config' in application 'sugarcrm' |
| Notes: | A specification of the output of this command can be found here. |
Typical Output
name : main.WEB5
state : running
default IP address : 10.96.32.1
console options : web:80,ssh
time started : Tue Sep 16 13:49:29 2008
server : srv1
cpu : 0.30
mem : 512.00 MB
bw : 250.00 Mbps
OS type : Linux
OS name : CentOS
OS version : 5
OS kernel : Linux 2.6.18.8-xenU #1 SMP Mon Aug 18 15:15:18 PDT 2008
PV driver : unknown
class : .WEB5
start
| Description: | Start a component |
| Syntax: | component start name (prop=val)* [ --debug ] |
| Arguments: | name | Name of component to start. name should be of the form application name:component name |
| prop=val | Parameters for initial scheduling of component. The following parameters may be specified: |
| cpu - (optional) CPU allocation (val[%]) |
| mem - (optional) Memory allocation (val[M[B]|G[B]]). If units are not specified, memory is in MB. |
| bw - (optional) Bandwidth allocation (val[M[b]|G[b]]). If units are not specified, bandwidth is in Mbps. |
| --debug | Start component in debug mode. |
| Examples | component start sugarcrm:main.config - Start component 'main.config' in 'application sugarcrm' |
| Notes: | This command will fail if the application is not running. |
Starting a component resets the component's flapping counter that is maintained by AppLogic. A component's flapping counter is the number of times that component has failed within the last 24 hours (each component has its own flapping counter). Once a component fails 3 times in 24 hours, the component is not restarted by AppLogic. comp restart or app start/restart may also be used to reset a component's flapping counter. |
stop
| Description: | Stop a component |
| Syntax: | component stop name [ --kill ] [ --force ] |
| Arguments: | name | Name of component to stop. name should be of the form application name:component name |
| --kill | Force the component to stop (i.e., non-graceful shutdown). This option is supported only in AppLogic 2.8.x+. Note that forcing a component to stop may cause data corruption. |
| --force | Skip user verification. Prior to AppLogic 2.8.x this option has the same functionality as the --kill option. |
| Examples | component stop sugarcrm:main.config - Stop component 'main.config' in application 'sugarcrm' |
| Notes: | None. |
continue
| Description: | Continue starting of a component |
| Syntax: | component continue name |
| Arguments: | name | Name of component to continue starting. name should be of the form application name:component name |
| Examples | component stop sugarcrm:main.config - Continue starting component 'main.config' in application 'sugarcrm' |
| Notes: | This command is useful following the failed start of a component started with --debug option. |
restart
| Description: | Restart a component |
| Syntax: | component restart name (prop=val)* [ --debug ] [ --kill ] [ --force] |
| Arguments: | name | Name of component to restart. name should be of the form application name:component name |
| prop=val | Parameters for scheduling of component. The following parameters may be specified: |
| cpu - (optional) CPU allocation (val[%]) |
| mem - (optional) Memory allocation (val[M[B]|G[B]]). If units are not specified, memory is in MB. |
| bw - (optional) Bandwidth allocation (val[M[b]|G[b]]). If units are not specified, bandwidth is in Mbps. |
| --debug | Start component in debug mode. |
| --kill | Force the stopping of the component (i.e., abort) prior to restart. This option is supported in AppLogic 2.8.x+. |
| --force | Skip user verification. Prior to AppLogic 2.8.x this option has the same functionality as the --kill option. |
| Examples | component restart sugarcrm:main.config - Restart component 'main.config' in 'application sugarcrm' |
| Notes: | This command will fail if the application is not running. |
| This command combines component stop and start commands. |
ssh
| Description: | ssh into a component's virtual machine |
| Syntax: | [component] ssh name [command] |
| Arguments: | name | Name of component to ssh into |
| command | optional command to execute on the appliance. |
| Examples | component ssh sugarcrm:main.config - SSH into component 'main.config' in application 'sugarcrm' |
| component ssh sugarcrm:main.config --ssh "ls /tmp" - SSH into component 'main.config' in application 'sugarcrm' and execute ls /tmp |
| Notes: | This command will fail if the component is not running. |
| | This command is identical to executing comp login name |
| | The ssh login is performed using a special appliances ssh key installed on your grid. This key does not need a passphrase -- it is assumed that if you are logged in on the controller, you are authorized to log in on the appliances. Contact Technical Support if you cannot log in on an appliance or if you believe your appliance key has been compromised and want to have it replaced. |
| | Whenever a user logs into an appliance, AppLogic creates an environment variable named _APPLOGIC_USERID which contains the name of the user that logged into the appliance. This is only valid if the appliance uses the dhcp configuration mode (APK). |
login
| Description: | Login to component's virtual machine |
| Syntax: | component login name [--ssh] [console=text|graphic] [--force] [--abort] [command] |
| Arguments: | name | Name of component to login to |
| --ssh | SSH into component (default) |
| console=text | Access text console |
| console=graphic | Access graphical console |
| --force | Take control of console (kill existing console) |
| --abort | Kill existing console (if any) |
| command | Optional command line to execute. If there is more than one argument, the command must be enclosed in quotes (e.g., "ls /tmp"). This argument is only valid if --ssh is specified. |
| Examples | component login sugarcrm:main.config - SSH into component 'main.config' in application 'sugarcrm' |
| component login sugarcrm:main.config "ls /tmp" - SSH into component 'main.config' in application 'sugarcrm' and execute ls /tmp |
| component login sugarcrm:main.config console=text - Access text boot console of appliance instance. |
| Notes: | This command will fail if the component is not started. |
| When no command line options are specified, login to the component using the default console that is specified for the component. |
| | The ssh login is performed using a special appliances ssh key installed on your grid. This key does not need a passphrase -- it is assumed that if you are logged in on the controller, you are authorized to log in on the appliances. Contact Technical Support if you cannot log in on an appliance or if you believe your appliance key has been compromised and want to have it replaced. |
| Graphical console should be accessed through the AppLogic GUI. |
| | Whenever a user logs into an appliance, AppLogic creates an environment variable named _APPLOGIC_USERID which contains the name of the user that logged into the appliance. This is only valid if the appliance uses the dhcp configuration mode (APK). |
-- BeckyH - 23 May 2006
Copyright © CA 2005-2011. All Rights Reserved.