Previous Topic: list (Class Management)--Retrieve List of Classes in a PackageNext Topic: Dashboard Message Management


Component Control

This section describes commands that manage the components of the application.

This section contains the following topics:

component continue

component info

component list

component login

component relocate

component restart

component ssh

component start

component stop

component continue

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

Example
component continue sugarcrm:main.config

Continue starting component 'main.config' in application 'sugarcrm'

Note: This command is useful following the failed start of a component started with --debug option.

component info

Display 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

Example

component info sugarcrm:main.config - Display information for component 'main.config' in application 'sugarcrm'

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
   APK_version         : 3.8
   class                : .WEB5

Non-batch Output

The output of this command follows:

name               : <val>
state              : <val>
default IP address : <val>
console options    : <val>
time started       : <val>
server             : <val>
cpu                : <val>
mem                : <val>
service mem        : <val>
bw                 : <val>
OS type            : <val>
OS name            : <val>
OS version         : <val>
OS kernel          : <val>
PV driver          : <val>
APK version        : <val>
class              : <val>
Metered RX Packets : val (if --verbose is specified)
Metered TX Packets : val (if --verbose is specified)
Metered RX Bytes   : val (if --verbose is specified)
Metered TX Bytes   : val (if --verbose is specified)

Interfaces         : (if --verbose is specified)
   Name            State
   default         active
Batch Output
component <name>
   {
   state            = <val>
   dflt_ip          = <val>
   console_options  = <val>
   t_start          = <val>
   t_state_chg      = <val>
   server           = "<val>"
   cpu              = <val>
   mem              = <val>
   mem_hypervisor   = <val>
   bw               = <val>
   os_guess         = "<val>"
   os_type          = "<val>"
   os_name          = "<val>"
   os_version       = "<val>"
   os_kernel        = "<val>"
   pv_driver        = "<val>"
   APK version      = "<val>"
   class            = "<val>"
   metered_rx_pkts  = <val>
   metered_tx_pkts  = <val>
   metered_rx_bytes = <val>
   metered_tx_bytes = <val>
   interface <name> : state = <val>
   ...
   }
component list

List all components for the specified running application.

Syntax
component list <name> [ --batch [--extended] ]  
Arguments
<name>

Name of application

--batch

Display output in UDL format

--extended

Display all component information in the list

Examples
component list sugarcrm 

List components for application 'sugarcrm'

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

Non-batch Output
Name  Server  State  CPU  Mem(MB) Bandwidth(Mbps)
val   val     val    val      val              val
…
Batch Output
component name : cpu = val, mem = val, bw = val, server = val, state = val
…
Batch Output Extended
component name: cpu=val, mem=val, mem_hypervisor=val, bw=val, server=val, state=val,
n_int_ifc=val, n_ext_ifc=val, n_vols=val, pinned=val, is_hvm=val, failover_grp="val",
os_name="val", os_version="val", os_extra="val", pv_driver="val", apk_version="val", virt_mode=<val>,
supported_virt_modes=<val>, metered_rx_pkts = val, metered_tx_pkts = val,
metered_rx_bytes = val, metered_tx_bytes = val
…
component login

Login to component's virtual machine.

Syntax
component login <name> [--ssh] [console=text|graphic] [--force] [--abort] [command] 
Parameters
<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 (for example, "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:

component relocate

Relocate a running component to a different server. The location may be performed live or may be performed using a component restart.

Syntax
component relocate <name> server=<server> [ --restart ]

Parameters

<name>

Name of component. <name> should be of the form:

<application name>:<component name>
<server>

Name of server where the component is to be relocated to.

--restart

Perform the relocation using component restart.

Examples
component relocate my-app:comp1 server=srv2

relocate component to srv2

component relocate my-app:comp1 server=srv3 --restart

relocate component to srv3 using component restart

component restart

Restart a component.

Syntax
component restart <name> (prop=val)* [ --debug ] [ --kill ] [ --force] 
Parameters
<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:

--debug

Start component in debug mode.

--kill

Force the stopping of the component (that is, abort) prior to restart. .

--force

Skip user verification.

Examples
component restart sugarcrm:main.config

Restart component 'main.config' in 'application sugarcrm'

component restart my-app:comp1 --debug

Restart component in debug mode

component restart my-app:comp1 mem=64M bw=10M

Restart component with scheduling parameters

Note: This command will fail if the application is not running. This command combines component stop and start commands.

component ssh

Ssh into the virtual machine of a component.

Syntax
[component] ssh <name> [command] 
Parameters
<name>

Name of component to log 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:

component start

Start a component.

Syntax
component start <name> (prop=val)* [ --debug ] 
Parameters
<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:

--debug

Start component in debug mode.

Examples
component start sugarcrm:main.config

Start component 'main.config' in 'application sugarcrm'

component start my-app:comp1 --debug

Start component in debug mode

component start my-app:comp1 mem=64 bw=10

Start component with scheduling parameters

Notes:

component stop

Stop a component.

Syntax
component stop <name> [ --kill ] [ --force ] 
Parameters
<name >

Name of component to stop. <Name> should be of the form:<application name>:<component name>

--kill

Force the component to stop (that is,, non-graceful shutdown). This option is supported only in CA AppLogic 2.8.x+. Forcing a component to stop may cause data corruption.

--force

Skip user verification. Prior to CA AppLogic 2.8.x this option has the same functionality as the --kill option.

Example
component stop sugarcrm:main.config

Stop component 'main.config' in application 'sugarcrm'