7.3. Reference for SIC CLI Execution and Command

You can be able to access and configure the cluster by using the execution "sliccli" with commands listed in this chapter.

Usage: ./sliccli COMMAND [params...]

7.3.1. Global Configuration

Command: showglobalattr

Description: show the global attributes.

Example:


[root@SIC_Node01 root]# sliccli showglobalattr [key] 

LogLevel [not set]

NoticeLevel [not set]

EventBase [not set]

KeepLogs [not set]

LogSizeMax [not set]

EmailBatchSize [not set]

EmailDelay [not set]

SMTPHost [not set]

Sender [not set]

Recipient [not set]

EmailSubjectPrefix [not set]

SNMPHost [not set]

TieBreaker=node40

Command: setgobalattr [key] [value]

Description: set global attributes

setgobalattr [key] [value]

Log Level Type

Info -- General information of the cluster environment

err -- report error messages

warning -- report warnings

debug -- report debug messages

Command: setglobalattr TieBreaker node_id

Description: set the default tie Breaker node.

Example:

the node id is "cluster1_node1"

[root@SIC_Node01 root]# sliccli setglobalattr cluster1_node1

showglobalattr TieBreaker

Description: show the default tie Breaker node.

Example:

[root@SIC_Node01 root]# sliccli showglobalattr TieBreaker

version

Description: Show the version.

Example:

[root@SIC_Node01 root]# sliccli version

7.3.2. Cluster Member Commands

Showmem [node id]

Description: Display member information in the cluster.

Example:

[root@SIC_Node01 root]# sliccli showmem node1

delmem node_id

Description: remove a member in the cluster.

Example:


[root@SIC_Node01 root]# sliccli delmem cluster1_node1

uptmem node_id description

Description: update a member in the cluster.

Example:


[root@SIC_Node01 root]# sliccli uptmem cluster1_node1 "This is STC cluster1, key is cluster1_key1

ctlmem [maint|suspend|running] node_id

Description: change a node to maintenance|suspend|running mode..

Example:


[root@SIC_Node01 root]# sliccli ctlmem cluster1_node1 suspend

memstatus [node_id]

Description: Show the status of the communication channels of nodes..

Example:


[root@SIC_Node01 root]# sliccli memstatus cluster1_node1

memccstatus src_node view_node

Description: Show the node communication channel status.

Example:


[root@SIC_Node01 root]# sliccli memccstatus cluster1_node1 cluster1_node2

7.3.3. Communication Channel Configurations

showcc [channel id]

Description: show the communication channel configuration.

Example:


[root@SIC_Node01 root]# sliccli showcc ccid2

addcc

addcc[channelid] [-t type][-k keep_alive_time_in_ms] [-d die_timeout_in_ms]

uptcc

uptcc [channelid] [-k keep_alive_time_in_ms] [-d die_timeout_in_ms]

delcc hb_channel_id

delcc [channelid]

addccmem hb_channel_id node_id [ip_address|tty_dev_file|mac_address]

Description: add a member to a communication channel.

Example 1 add a UDP communication channel:


[root@SIC_Node01 root]# sliccli addccmem cluster1_ccid3 cluster1_node2 192.168.111.132

Example 2 add a eth communication channel:


[root@SIC_Node01 root]# sliccli addccmem cluster1_ccid3 cluster1_node2 00:00:00:00:00:00

Example 3 add a Serial communication channel:


[root@SIC_Node01 root]# sliccli addccmem cluster1_ccid3 cluster1_node2 /dev/ttySX

uptccmem hb_channel_id node_id [ip_address|tty_dev_file|mac_address]

Description: update a member to the communication channel.

Example 1 update a UDP communication channel:


[root@SIC_Node01 root]# sliccli uptccmem cluster1_ccid3 cluster1_node2 192.168.111.132

Example 2 update a eth communication channel:


[root@SIC_Node01 root]# sliccli uptccmem cluster1_ccid3 cluster1_node2 00:00:00:00:00:00

Example 3 update a Serial communication channel:


[root@SIC_Node01 root]# sliccli uptccmem cluster1_ccid3 cluster1_node2 /dev/ttySX

delccmem hb_channel_id node_id

Description: delete member of a communication channel

Example delete a UDP communication channel:


[root@SIC_Node01 root]# sliccli delccmem cluster1_ccid3 cluster1_node2

7.3.4. Resource Group Configurations

addrg group_id desc [auto_start|manual_start] [auto_failover|manual_switchover] [auto_failback|manual_failback] [load_balancing|no_load_balancing] max_owner min_owner max_retry monitor_cycletime

Description: add a resource group.

Example add a new resource group with description and auto failover and failback

[root@SIC_Node01 root]# sliccli addrg cluster1_grp1 "This is a new resourcegroup for cluster1, the group id = cluster1_grp1" auto_failover auto_failback load_balancing 1 1 10 20

uptrg group_id desc [auto_start|manual_start] [auto_switchover|manual_switchover] [auto_failback|manual_failback] [load_balancing|no_load_balancing] max_owner min_owner max_retry monitor_cycletime

Description: update an existing resource group.

Example update an existing resource group with description and changing auto failover to manual_takeover with auto failback, without load balancing. Also the max_retry is changing from 10 times to 5 times.

[root@SIC_Node01 root]# sliccli uptrg cluster1_grp1 "update resourcegroup" manual_start manual_swithover auto_failback no_load_balancing 1 1 5 20

resetfodnode group_id node_id

Description: reset a node in the failover domain of a resource group to stopped status

Example


[root@SIC_Node01 root]# sliccli resetfonode cluster1_grp1 cluster1_node1

movfodnode group_id node_id {priority}

Description: move a node's priority in the failover domain of a resource group

can only be performed when the Resource group is "disabled" or "suspended"

Example move the node to a new priority


[root@SIC_Node01 root]# sliccli movfodnode cluster1_grp1 cluster1_node3 2

listfod group_id

Description: list members of a failover domain of a resource group

Example list members of a failover domain


[root@SIC_Node01 root]# sliccli listfod rg1
Resourece Group: rg1

node2: (stopped)

node1: (failed)

Total 2 member(s).

addres group_id resource_id type [local|global] {priority}

Description: add a resource to a resource group

Example add a Apache as a resource with global setting


[root@SIC_Node01 root]# sliccli addres cluster1_grp1 cluster1_apache1 "application" global 1

Example add a IP address as a resource with local setting


[root@SIC_Node01 root]# sliccli addres cluster1_grp1 cluster1_ip1 "IP Address" local 1

showres group_id res_id

Description: Display resource attributes

Example Display resource attributes of group "rg1"


[root@SIC_Node01 root]# sliccli showres rg1 ip1
ipaddr = 192.168.3.111
Attribute count=1

listres group_id

Description: List all resources of a resource group

Example list resource of group "rg1"


[root@SIC_Node01 root]# sliccli listes rg1
Resourece Group: rg1
ip1:
Configuration:global Type:2

Total 1 resource(s).

movres group_id res_id [position]

Description: Change the order of a resource in a resource group

Example change the order of resource "ip1" of group "rg1"


[root@SIC_Node01 root]# sliccli movres rg1 ip1 1

delres group_id resource_id

Description: delete a resource from a resource group

Example delete a resource with resource from a specific resource group

[root@SIC_Node01 root]# sliccli delres cluster1_grp1 cluster1_ip1

setresattr group_id resource_id key value {node_id}

Description: set an attribute to a resource in a resource group

NOTE: For the "key" and "value" please refer to "listattr res_type" command for more details"

Example add an attribute to a IP resource in a resource group with ALL the key values.


[Node01]# sliccli setresattr cluster1_grp1 Cluster1_ip1 ipaddr 192.169.3.131 cluster1_node1
[Node01]# sliccli setresattr cluster1_grp1 Cluster1_ip1 netmask 255.255.255.0 cluster1_node1
[Node01]# sliccli setresattr cluster1_grp1 Cluster1_ip1 broadbast 192.168.3.254 cluster1_node1
[Node01]# sliccli setresattr cluster1_grp1 Cluster1_ip1 interface /dev/eth0 cluster1_node1

delresattr group_id resource_id key {node_id}

Description: delete an attribute of a resource in a resource group

NOTE: For the "key" and "value" please refer to "listattr" command for more details"

Example del an attribute to a IP resource in a resource group with ALL the key values.


[Node01]# sliccli delresattr cluster1_grp1 Cluster1_ip1 ipaddr 192.169.3.131 cluster1_node1
[Node01]# sliccli delresattr cluster1_grp1 Cluster1_ip1 netmask 255.255.255.0 cluster1_node1
[Node01]# sliccli delresattr cluster1_grp1 Cluster1_ip1 broadbast 192.168.3.254 cluster1_node1
[Node01]# sliccli delresattr cluster1_grp1 Cluster1_ip1 interface /dev/eth0 cluster1_node1

showrg [group_id]

Description: show all resource group.

Example show the resource groups under the cluster


[root@SIC_Node01 root]# sliccli showrg [group id]

delrg [group id]

Description: delete the resource group

Example a resource group


[root@SIC_Node01 root]# sliccli delrg cluster1_grp1

ctlrg [enable|disable|suspend] "group id"

Description: enable/disable/suspend the resource group.

Example disable a existing resource group


[root@SIC_Node01 root]# sliccli ctlrg disable cluster1_grp1

enable group_id

Description: activate a resource group

ctlrg [enable|disable|suspend] group_id

Example enable a existing resource group

sliccli ctlrg enable cluster1_grp1

failover "group id" "node id" "from node id"

Description: force failover a resource group to a target node.

switchover group_id node_id [from_node_id]

Example


[root@SIC_Node01 root]# sliccli switchover cluster1_grp1 cluster1_node1 "cluster_node3"

rgstatus

Description: display the current status of all resource group.

Example


[root@SIC_Node01 root]# sliccli rgstatus

listrestype

Description: display a list of available resource type.

Example


[root@SIC_Node01 root]# sliccli listrestype

listattr res_type

Description: display a list of accepted config keys for specific resource type.

Example: display the key of application resource type


[root@SIC_Node01 root]# sliccli listattr Application

Example: display the key of IP address resource type


[root@SIC_Node01 root]# sliccli listattr "IP Address"

showlog

Description: showlog [yyyy-mm-dd [hh:mm[:ss]]].

Example: display log messages


[root@SIC_Node01 root]# sliccli showlog
......
Mon Jun 5 10:45:28 2006
[notice][4011][lokfu]: Resource 'nic1' of resource group 'rg1' already online
Mon Jun 5 10:45:30 2006
[info][4000][lokfu]: resource 'ip1' online ok.
Mon Jun 5 10:45:30 2006
[info][4000][lokfu]: resource 'app1' online ok.
Mon Jun 5 10:45:30 2006
[info][5005][lokfu]: Node lokfu own the resource group rg1 success.
Mon Jun 5 10:49:08 2006
[info][4001][lokfu]: resource 'app1' offline ok.
Mon Jun 5 10:49:08 2006
[info][4001][lokfu]: resource 'ip1' offline ok.
Mon Jun 5 10:47:38 2006
......
clearlog

Description: Clear the cluster log

Example: Remove all entries from cluster log


[root@SIC_Node01 root]# sliccli clearlog
getnetcfg [node id]

Description: Show network interfaces of node

Example: etwork interfaces of node


[root@SIC_Node01 root]# sliccli getnetcfg node1

Example: display the ethernet info of a node


[root@SIC_Node01 root]# sliccli getnetcfg node2
eth0 = 00:50:FC:55:96:CD (192.168.3.229)
eth0:1 = 00:50:FC:55:96:CD (192.168.3.230)
eth1 = 00:0D:87:C4:38:8C (192.168.60.2)