Sun N1 Advanced Architecture for SAP Solutions 5.2.1 User's Guide

Chapter 6 N1 AA Command Line Interface

The following tables describe the Command Line Interface (CLI) commands for N1 AA. The CLI provides access to most of the functions in N1 AA.

Return code

All functions return 0 if successful, otherwise the functions return a 1.


Note –

The path to n1aa_exec is /opt/SUNWn1aa/cli/n1aa_exec. Execute the commands as OS user noaccess.


Introduction

You can call every command with the optional parameter loglevel=loglevel, where loglevel can be DEBUG, INFO, SUCCESS, WARNING, ERROR, FATAL, or PANIC. This parameter overwrites the loglevel defined by the N1 AA parameter none.general.n1aa.loglevel. For more information, see Customizing.

Table 6–1 Summary of N1 AA Manager Commands

Function 

CLI Syntax 

Description 

List server groups 

./n1aa_exec GetServerGroups

Lists the defined server groups. 

Input parameters

– 

Output

Column1: Unique ID of Server Group 

Column2: Name of Server Group 

List hosts 

./n1aa_exec GetServerGroupHosts servergroup=ID

Lists the defined physical hosts of the specified sever group. 

Input parameters

servergroup: ID of Server Group as returned from CLI command GetServerGroups

Output

Column1: Hostname 

For more information, see Customizing.

Table 6–2 Summary of N1 AA Analyzer Commands

Function 

CLI Syntax 

Description 

Data import 

n1aa_exec analyzer.AnalyseDataImportJob

Imports the performance data. 

Input parameters

– 

Output

– 

Data reorganization (archive data) 

n1aa_exec analyzer.ArchiveUnarchiveJob a start end

Executes the reorganization of the performance data from cube to archive. start and end define the data interval.

Input parameters

start: timestamp literal

end: timestamp literal

Output

– 

Examples: 

  • This archives all data for the year 2004: n1aa_exec analyzer.ArchiveUnarchiveJob a "timestamp '2004-01-01 00:00:00'" "timestamp '2004-12-31 23:59:59'"

  • This archives all data from year 2004 and older: n1aa_exec analyzer.ArchiveUnarchiveJob a "timestamp '-infinity'" "timestamp '2004-12-31 23:59:59'"

  • This archives all data older than one year: n1aa_exec analyzer.ArchiveUnarchiveJob a "timestamp '-infinity'" "timestamp without time zone 'now' - interval '12 month'"

Data reorganization (unarchive data) 

n1aa_exec analyzer.ArchiveUnarchiveJob u start end

Executes the reorganization of the performance data from archive back to cube. start and end define the data interval.

Input parameters

start: timestamp literal

end: timestamp literal

Output

– 

Examples: 

See preceding examples. 

For more information, see Maintenance.

Table 6–3 Summary of N1 AA Builder Commands

Function 

CLI Syntax 

Description 

List OS Profiles 

n1aa_exec builder.ListOSProfiles

Lists the available OS Profiles. 

Input parameters

– 

Output

Column1: Full pathname of OS Profile 

Column2: OS Profile type 

List variable settings 

n1aa_exec builder.ListVariableSettings profile_name=profile_name

Lists the available Variable Settings for the specified OS Profile component. 

Input parameters

profile_name: Complete path of profile name as returned from CLI command builder.ListOSProfiles.

Output

Column1: Name of Variable Setting 

Install OS 

n1aa_exec builder.ProvisionOS profile_name=OS Profile profile_type=type [varset_name=variable settings] targethost=target host [p_timeout=minutes] [n_timeout=minutes]

Executes the OS installation with the specified OS Profile component using supplied Variable Settings on the specified target hosts. 

Input parameters

profile_name: Name of OS Profile as delivered from CLI command builder.ListOSProfiles

profile_type: Type of OS Profile as delivered from CLI command builder.ListOSProfiles

varset_name (optional): Name of Variable Setting as delivered from CLI command builder.ListVariableSettings. If not specified, the OS Profile's default settings will be used.

targethost: Target host for OS installation as delivered from CLI command builder.GetOSProvisioningHosts.

p_timeout (optional): Installation timeout in minutes. If not specified, the pre-customized value none.builder.OSProvisioning.plan_timeout is taken.

n_timeout (optional): Timeout for native OS calls in minutes. If not specified, the precustomized value none.builder.OSProvisioning.plan_nativetimeout is taken.

Output

– 

List SPS Plans 

n1aa_exec builder.ListSWPlans

Lists all SPS Plans available for N1 AA.  

Input parameters

– 

Output

Column1: Name of SPS plan 

Install SW 

n1aa_exec builder.RunSWPlans plan_names=SPS Plan[,...] targethost=target host [p_timeout=minutes] [n_timeout=minutes]

Executes the SW installation with the specified SPS plans on the specified target hosts. 

Input parameters

plan_names: Name of SPS Plans as delivered from CLI command builder.ListSWPlans. Multiple plan names are separated by commas.

targethost: Target host for SW installation as delivered from CLI command builder.GetSWProvisioningHosts.

p_timeout (optional): Installation timeout in minutes. If not specified, the pre-customized value none.builder.SWProvisioning.plan_timeout is taken.

n_timeout (optional): Timeout for native OS calls in minutes. If not specified, the pre–customized value none.builder.SWProvisioning.plan_nativetimeout is taken.

Output

Get OS provisioning hosts 

n1aa_exec builder.GetOSProvisioningHosts servergroup=ID| servergroupname=name

List all hosts allowed for OS provisioning in the specified server group. 

Input parameters

servergroup: ID of Server Group as returned from CLI command GetServerGroups

servergroupname: Name of Server Group as returned from CLI command GetServerGroups

Output

Column1: Hostname 

Get SW provisioning hosts 

n1aa_exec builder.GetSWProvisioningHosts servergroup=ID| servergroupname=name

List all hosts allowed for SW provisioning in the specified server group. 

Input parameters

servergroup: ID of Server Group as returned from CLI command GetServerGroups

servergroupname: Name of Server Group as returned from CLI command GetServerGroups

Output

Column1: Hostname 

For more information, see Chapter 4, N1 AA Builder.

Table 6–4 Summary of N1 AA Deployer – Managing Resource Groups Commands

Function 

CLI Syntax 

Description 

View Resource Groups 

n1aa_exec deployment.ListResourceGroups servergroup=ID

List resource groups of the specified server group. 

Input parameters

servergroup: ID of Server Group as returned from CLI command GetServerGroups

Output

Column1: Name of Resource Group 

Column2: Status (ONLINE, OFFLINE, ...)  

Column3: Last update timestamp  

Column4: Hostname where Resource Group is currently hosted 

Column5: Environment type 

Column6: Unique ID of Resource Group 


Note –

This ID will change after moving the Resource Group to another target server.


Start 

n1aa_exec deployment.ModifyResourceGroup resourcegroupid=ID command=start

Start the resource group. 

Input parameters

resourcegroupid: ID of Resource Group as returned from CLI command deployment.ListResourceGroups

Output

– 

Stop 

n1aa_exec deployment.ModifyResourceGroup resourcegroupid=ID command=stop

Stop the resource group. 

Input parameters

resourcegroupid: ID of Resource Group as returned from CLI command deployment.ListResourceGroups

Output

– 

Move 

n1aa_exec deployment.MoveResourceGroup resourcegroupid=ID targethost=hostname force=true|false

Relocate the resource group to a specified target host. 

Input parameters

resourcegroupid: ID of Resource Group as returned from CLI command deployment.ListResourceGroups

targethost: Hostname as returned from CLI command GetServerGroupHosts

force: If set to true, relocation will continue, even if the stop on the source host was not successful. Otherwise, if set to false, the operation stops.

Output

– 

Refresh 

n1aa_exec deployment.ModifyResourceGroup resourcegroupid=ID command=refresh

Evaluate and update the current status of the resource group (every resource) on the host. 

Input parameters

resourcegroupid: ID of Resource Group as returned from CLI command deployment.ListResourceGroups.

Output

– 

Refresh server group 

n1aa_exec deployment.ModifyResourceGroup servergroup=ID command=refreshall

Similar to the Refresh() function, but for all resource groups in the server group.

Input parameters

servergroup: ID of Resource Group as returned from CLI command GetServerGroups.

Output

– 

For more information, see Groups and Resources Management.

Table 6–5 Summary of N1 AA Deployer – Managing Resources Commands

Function 

CLI Syntax 

Description 

View Resources 

n1aa_exec deployment.ListResources resourcegroupid=ID

List resources of the specified resource group. 

Input parameters

resourcegroupid: ID of Resource Group as returned from CLI command deployment.ListResourceGroups

Output

Column1: Name of Resource 

Column2: Type of Resource 

Column3: Status 

Column4: Last update timestamp 

Column5: Hostname where resource is currently hosted 

Column6: Environment type 

Column7: Unique ID of resource  


Note –

This ID will change after moving the Resource Group to another target server.


Start 

n1aa_exec deployment.ModifyResource resourceid=ID command=start

Start the resource. 

Input parameters

resourceid: ID of Resource as returned from CLI command deployment.ListResources

Output

Stop 

n1aa_exec deployment.ModifyResource resourceid=ID command=stop

Stop the resource. 

Input parameters

resourceid: ID of Resource as returned from CLI command deployment.ListResources

Output

Refresh 

n1aa_exec deployment.ModifyResource resourceid=ID command=refresh

Evaluate the current status of the resource on the host. 

Input parameters

resourceid: ID of Resource as returned from CLI command deployment.ListResources

Output

View Details 

n1aa_exec deployment.ListResourceDetails resourceid=ID

Shows the technical details of the resource definition. 

Input parameters

resourceid: ID of Resource as returned from CLI command deployment.ListResources

Output

Column1: Name of resource attribute  

Column2: Value of resource attribute 

Table 6–6 Summary of N1 AA Deployer – SAP Application Server Provisioning Commands

Function 

CLI Syntax 

Description 

List CI's 

n1aa_exec deployment.ListSAPCIs servergroup=ID

Lists the defined SAP CI's, type CentralInstance, and message servers, type MessageServer, within the specified server group. 

Input parameters

servergroup: ID of Server Group as returned from CLI command GetServerGroups

Output

Column1: Unique ID of Resource 


Note –

This ID changes after moving the Resource Group to another target server.


Column2: Name of Resource 

Column3: Name of Resource Group 

Column4: Status 

Column5: Last update timestamp 

List custom exception files 

n1aa_exec deployment.ListCustomExceptionFiles

Lists the defined custom exception files.  

Input parameters

-  

Output

Column1: Name of the custom exception file 

Deploy 

n1aa_exec deployment.DeploySAPAppServer resourceid=ID logicalhost=hostname interface=name interfacetype=C|M targethost=hostname sysnum=instanceno profile=small|medium|large [exceptionfile=filename][srmproject=SRMProject]

Install a new SAP Application Server for an existing SAP system. 

Input parameters

resourceid: ID of the existing SAP target system as returned from CLI command deployment.ListSAPCIs

logicalhost: IP Name to use for the new Application Server. It must be an existing and resolvable IP name in the network.

 

interface: Name of the interface or ipmp-group to be used.

interfacetype: If set to C, then parameter interface is interpreted as physical NIC. If set to M, then parameter interface is interpreted as ipmp-group.

targethost: Hostname as returned from CLI command GetServerGroupHosts.

sysnum: Instance number for the new sap instance.

profile: Defines the memory category for the new instance profile (small, medium, or large.)

exceptionfile (optional): Name of a custom exception file as returned from CLI command ListCustomExceptionFiles. If not specified, the default exception file is used.

srmproject (optional): Solaris SRM project for the new instance. If specified, this project has exist on the OS level. If not specified, the SRM default is used.

Output

Deploy and modify Logon or RFC groups 

n1aa_exec deployment.DeploySAPAppServerWithServerGroup resourceid=ID logicalhost=hostname interface=name interfacetype=C|M targethost=hostnamesysnum=instanceno profile=small|medium|large [srmproject=SRMProject] saplogongrouplist=group[,...] sapservergrouplist=group[,...] instance=instance

Installs a new SAP Application Server on an existing SAP system and adds the new SAP instance to the specified Logon and RFC groups. 

Input parameters

See deployment.DeploySAPAppServer, additionally: saplogongrouplist: SAP Logon Groups (comma separated list), to which this new instance should be added. As returned by CLI command deployment.ListSAPServerGroups.

sapservergrouplist: SAP RFC Server Groups , comma separated list, to which this new instance should be added. As returned by CLI command deployment.ListSAPServerGroups.

instance: String of the new SAP instance to be added to the Logon or RFC groups. Format must be exactly as defined in the SAP system, log.hostname_SID_instance#.

Example: lhost0_I47_20. 

Output

– 

List deployed resource groups 

n1aa_exec deployment.ListResourceGroups servergroup=IDremoveable=true

Lists those resource groups that have been created within the N1 AA Deploy new Application Server() function.

Input parameters

servergroup: ID of Server Group as returned from CLI command GetServerGroups

Output

Same as previous CLI command deployment.ListResourceGroups. See row "View Resource Groups".

Remove 

n1aa_exec deployment.RemoveSAPAppServer resourceid=ID

Remove an existing SAP Application Server (complete resource group including SAP Application Server instances and IP addresses). 

Input parameters

resourceid: ID of the existing Resource Group as returned from CLI command deployment.ListResourceGroups, with removeable=true.

Output

List Logon/RFC groups 

n1aa_exec deployment.ListSAPServerGroups resourceid=IDgrouptyp=S|L

List the Logon or RFC groups of the specified SAP system. 

Input parameters

resourceid: ID of the existing SAP target system as returned from CLI command deployment.ListSAPCIs

grouptyp: L for Logon Groups, S for RFC Server Groups.

Output

Column1: Name of SAP Logon Group or RFC Server Group as defined in the SAP system. 

List Instances 

n1aa_exec deployment.ListInstancesOfServerGroup resourceid=ID grouptyp=S|L sapservergroup=group

List the SAP instances of the specified Logon/RFC group. 

Input parameters

resourceid: ID of the existing SAP target system as returned from CLI command deployment.ListSAPCIs

grouptyp: L for Logon Groups, S for RFC Server Groups.

sapservergroup: Logon/RFC Server Group as returned by CLI command deployment.ListSAPServerGroups.

Output

Column1: Name of SAP instance belonging to the specified group as defined in the SAP system. 

Modify Logon or RFC groups 

n1aa_exec deployment.ModifySAPServerGroups resourceid=ID grouptyp=L|S instance=instance command=R|I sapservergrouplist=group[,...]

Add or remove an SAP instance to or from the specified Logon or RFC group. 

Input parameters

resourceid: ID of the existing SAP target system as returned from CLI command deployment.ListSAPCIs

grouptyp: L for Logon Groups, S for RFC Server Groups.

instance: String of the SAP instance to be added or removed. Format as defined in the SAP system log.hostname_SID_instance#. For example, lhost0_I47_20

command: R for remove. I for insert.

sapservergrouplist: Logon/RFC Server Groups (comma separated list), to which the instance should be added or removed as returned by CLI command deployment.ListSAPServerGroups.

Output