- 论坛徽章:
- 0
|
vcs的命令集,呵呵,网上找的也不全,所以自己加了一些进去!!希望大家喜欢,手头有vcs-ig可以奉献
[installing a vcs licenses]
#cd /opt/VTRS/bin
#./vxlicinst -k xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx
Note:The utility must be run on each system in the cluster
[to update licensing information in a running cluster]
1. Install the new license on each node in the cluster using the vxlicinst utility.
2. Update system-level licensing information on all node in the clusters:
#hasys -updatelic -all
3. Update cluster-level licensing information:
#haclus -updatelic
[Starting VCS]
1. If the local configuration is valid, and if no other system is running VCS,
it builds its state from the local configuration file and
enters the RUNNING state:
#hastart [-stale|-force]
2. If all system are in ADMIN_WAIT,enter following command from any system
in the cluster to force VCS use the configuration file from
the system specified by the varible system:
#hasys -force system
3. Starting VCS on a single system:
#hastart -onenode
4.Starting VCS as Time-Sharing Process:
#hastart -ts
[Stopping VCS]
hastop -all -force
hastop -help
hastop -local [-force]
hastop -sys system
[Adding,Modifying,and Deleting Users]
1.Adding a user
set the configuration to read/write mode:
#haconf -makerw
add the user:
#hauser -add username
add the user as cluste administrator or operator or group service_groups:
#hauser -add userName -priv Administrator|Operator [-group service_groups]
reset the configuration to read-only mode:
#haconf -dump -makero
2. Assigning user privileges:
#hauser -addpriv userName -priv Administrator|Operator [-group service_groups]
Removing user privileges:
#hauser -delpriv userName -priv Administrator|Operator [-group service_groups]
3. Modifying a user
set the configuration to read/write mode:
#haconf -makerw
modify the user:
#hauser -update userName
reset the configuration to read-only mode:
#haconf -dump -makero
4. Deleting a user
set the configuration to read/write mode:
#haconf -makerw
delete the user:
#hauser -delete userName
reset the configuration to read-only mode:
#haconf -dump -makero
5. Displaying a user
display the list of users:
#hauser -list
display the privileges of all users:
#hauser -display
display the privileges of a specific user:
#hauser -display username
[Querying VCS]
1. To display the state of a service group on a system:
#hagrp -state [service_group] [-sys system]
2. For a list of service group's resource:
#hagrp -resources service_group
3. For a list of service group's dependencies:
#hagrp -dep [service_group]
4. To display a service group on a system:
#hagrp -display [service_group] [-sys system]
5. To display attributes of a system:
#hagrp -display [service_group] [-attribute attribute] [-sys sytem]
[Querying Resources]
1. For a list of resource's dependencies:
#hares -dep [resource]
2. For information on a resource:
#hares -display [resource]
3. To display resources of a service group:
#hares -display -group service_group
4. To display resources of a resource type:
#hares -display -type resource_type
5. To display attributes of a system:
#hares -display -sys system
[querying resources type]
1. for a list of resource type:
#hatype list
2. for a list of resource of particular type:
#hatype list resource_type
3. for information about resourec type:
#hatype display resource_type
[querying agent]
1.for an agent's run-time status:
#haagent -display [agent]
[Querying System]
1. For a list of system in a cluster:
#hasys -list
2. For information about each system:
#hasys -display [system]
[Querying Cluster]
1. For information about cluster:
#haclus -display
2. for the value of a specific cluster attribute:
#haclus -value attribute
[Querying Status]
1.for the status of all service group in the cluster,include resources:
#hastatus
2.for the status of a particular service group,include resources:
#hastatus -group service_group [-group service_group]
3.for the status of cluster faults,including faulted service groups,
resources,system,links and agents:
#hastatus -summary
[querying log data files]
1.to display the hamsg usage list:
#hamsg -help
2.to display the list of LDFs available on the current system:
#hamsg -list
3.to display general LDF data:
#hamsg -info [-path path_name] LDF
4.to display specific LDF data
#hamsg [-any] [-tag A|B|C|D|E] [-otype VCS|RES|GRP|SYS|AGT]
[-oname object_name] [-msgid message_ID] [-path path_name]
[-lang language] LDF
[conditional statements]
1.for a list of service groups whose values match a conditional statement:
#hagrp -list [conditional_statement]
2.for a list of agents whose values match a conditional statement:
#haagent -list [conditional_statement]
3.for a list of resources whose values match a conditional statement:
#hares -list [conditional_statement]
[Administering Service Groups]
1. To start a service group and bring its resources online:
#hagrp -online service_group -sys sytem
2. to start a service group on a system and bring online only the
resources already online on another system:
#hagrp -online service_group -sys system -checkpartial other_system
3. To stop a service group and take its resources offline:
#hagrp -offline service_group -sys system
4.tos stop a service group only if all resources are probed on the system:
#hagrp -offline [-ifprobed] service_group -sys system
5. To switch a service group from one system to another:
#hagrp -switch service_group -to system
6.to freeze a service group(disable onlining,offlining,and failover):
#hagrp -freeze service_group [-persistent]
7.to thraw a service group(reenable onlining,offlining,and failover):
#hagrp -unfreeze service_group [-persistent]
8.to enable a service group:
#hagrp -enable service_group [-sys system]
9.to disable a service group:
#hagrp -disable service_group
10.to enable all resource in a service group:
#hagrp -enableresources service_group
11.to disable all resources in a service group:
#hagrp -disableresources service_group
12.To clear faulted, non-persistent resources in a service group:
#hagrp -clear service_group [-sys system]
13.To clear resources in ADMIN_WAIT state in a service group:
#hagrp -clearadminwait [-fault] service_group -sys system
[Administering Resources]
1. Bring a resource online:
#hares -online resource -sys system
2. To take a resource offline:
#hares -offline [-ignoreparent] resource -sys system
3.To take a resource offline and propagate the command to its children:
#hares -offprop [-ignoreparent] resource -sys system
4.To prompt a resource’s agent to immediately monitor the resource on a particular system:
#hares -probe resource -sys system
5.To clear a resource:
#hares -clear resource [-sys system]
[Administering Systems]
1.To force a system to start while in ADMIN_WAIT:
#hasys -force system
2.To modify a system’s attributes:
#hasys -modify modify_options
3.To display the value of a system’s node ID as defined in the file /etc/llttab:
#hasys -nodeid node_ID
4.To freeze a system (prevent groups from being brought online or switched on the system):
#hasys -freeze [-persistent] [-evacuate] system
5.To thaw or unfreeze a frozen system (reenable onlining and switching of service groups):
#hasys -unfreeze [-persistent] system
[Administering Clusters]
1.To modify a cluster attribute:
#haclus [-help [-modify]]
[Encrypting Passwords]
1.To encrypt a password for an agent configuration, type:
#vcsencrypt -agent
2.To encrypt a VCS user password, type:
#vcsencrypt -vcs |
|