Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

(opensolaris section 1cl)
man page for clsnmphost

clsnmphost(1CL) 					 Sun Cluster Maintenance Commands					   clsnmphost(1CL)

NAME
clsnmphost - administer list of Sun Cluster SNMP hosts SYNOPSIS
/usr/cluster/bin/clsnmphost -V /usr/cluster/bin/clsnmphost [subcommand] -? /usr/cluster/bin/clsnmphost [subcommand [options]] -v [host] /usr/cluster/bin/clsnmphost add [-c community[,...]] [-n node,...] host [...] /usr/cluster/bin/clsnmphost add -i {- | clconfigfile} [-c community[,...]] [-n node[,...]] host [...] /usr/cluster/bin/clsnmphost export [-o {- | clconfigfile}] [-c community[,...]] [-n node[,...]] [+ | host...] /usr/cluster/bin/clsnmphost list [-c community[,...]] [-n node[,...]] [+ | host...] /usr/cluster/bin/clsnmphost remove [-c community[,...]] [-n node[,...]] {+ | host...} /usr/cluster/bin/clsnmphost show [-c community[,...]] [-n node[,...]] [+ | host...] DESCRIPTION
The clsnmphost command administers Simple Network Management Protocol (SNMP) hosts and community names that will receive notifications of SNMP events. The SNMP hosts use the cluster Management Information Bases (MIBs) to provide access control mechanisms. When a MIB sends SNMP trap notifications, the SNMP hosts that were configured with this command can identify the hosts to which to send trap notifications. For more information about the cluster MIBs, see the clsnmpmib(1CL) man page. This command has no short form. The general form of this command is as follows: clsnmphost [subcommand] [options] [operands] You can omit subcommand only if options specifies the option -? or -V. Each option of this command has a long form and a short form. Both forms of each option are provided with the description of the option in the OPTIONS section of this man page. See the Intro(1CL) man page for more information. You can use this command only in the global zone. SUBCOMMANDS
The following subcommands are supported: add Adds an SNMP host to the list of hosts that will receive trap notifications for the cluster MIBs and will be able to access the MIB tables. You can use this subcommand only in the global zone. If you use the add subcommand without the -n option, only the current node is affected. If you use add without the -c option, the sub- command uses public as the default community name. Specify the host by using either an IP address or host name. If the specified community name does not exist, the command creates the community. Use the -i option to import one or more host config- urations from the clconfigfile. Users other than superuser require solaris.cluster.modify role-based access control (RBAC) authorization to use this subcommand. See the rbac(5) man page. export Exports the SNMP host information for the specified node. You can use this subcommand only in the global zone. Use the -n option to specify one or more nodes for which to export the SNMP host information. If you use export without the -n option, the subcommand exports only SNMP host information for the current node. For more information about the output format from the export subcommand, see the clconfiguration(5CL) man page. By default, all output is sent to standard output. Use the -o option followed by a file name to redirect the output to the file. By using the -c option, you can limit the output from the export subcommand to information only for hosts in a particular community. Specify one or more hosts as operands to restrict the output information to only these hosts. Users other than superuser requiresolaris.cluster.read RBAC authorization to use this subcommand. See the rbac(5) man page. list Lists the SNMP hosts that are configured on the specified node. You can use this subcommand only in the global zone. If you use the list subcommand without the -n option, only SNMP hosts on the current node are listed. By default this subcommand lists all hosts on the node. To restrict the output to information about specific hosts, specify one or more hosts as operands. You can also use the -c option to list only those hosts in the specified community. Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand. See the rbac(5) man page. remove Removes an SNMP host from the node configuration. You can use this subcommand only in the global zone. To remove a host from the configuration, you must specify the host name as an operand. If you use the remove subcommand without the -n option, only SNMP hosts on the current node are removed. To remove all hosts, use the plus sign (+) sign. To remove one or more hosts from a specific community, use the -c option. Users other than superuser require solaris.cluster.modify RBAC authorization to use this subcommand. See the rbac(5) man page. show Shows the SNMP host information on the specified node. You can use this subcommand only in the global zone. If you use the show subcommand without the -n option, only information for SNMP hosts on the current node is displayed. By default, the show subcommand displays information for all the hosts and their communities. To restrict the output to information about only specific hosts in a community, use the -c option, or specify the name of one or more hosts as operands. Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand. See the rbac(5) man page. OPTIONS
The following options are supported: -? --help Prints help information. You can specify this option with or without a subcommand. o If you use this option without a subcommand, the list of available subcommands is displayed. o If you use this option with a subcommand, the usage options for that subcommand are displayed. When this option is used, no other processing is performed. -c community --community community Specifies the SNMP community name that will be used in conjunction with a host name. This option might also be used with other subcom- mands to narrow the scope of the subcommand operation. For example, when used with the remove subcommand, the -c option can be used to remove one or many hosts from a specific community. If you use the add subcommand without the -c option, the subcommand uses public as the default community name. -i {- | clconfigfile} --input {- | clconfigfile-} Specifies configuration information that can be used for validating or modifying the SNMP hosts configuration. This information must conform to the format that is defined in the clconfiguration(5CL) man page. This information can be contained in a file or supplied through standard input. To specify standard input, specify the minus sign (-) instead of a file name. -n node[,...] --node[s] node-[,...] Specifies a node or a list of nodes. You can specify each node as node name or as a node ID. All forms of the clsnmphost command accept this option. -o {- | clconfigfile} --output {- | clconfigfile-} Writes cluster SNMP host configuration information in the format that is defined by the clconfiguration(5CL) man page. This information can be written to a file or to standard output. To write to standard output, specify the minus sign (-) instead of a file name. If you specify standard output, all other standard out- put for the command is suppressed. If you supply a file name, the configuration is copied to a new file of that name. The -o option is valid only with the export subcommand. If you do not specify the -o option , the output will print to standard output. -V --version Prints the version of the command. Do not specify this option with subcommands, operands, or other options because they are ignored. The -V option displays only the ver- sion of the command. No other operations are performed. -v --verbose Prints verbose information to standard output. You can specify this option with any form of the command, although some subcommands might not produce expanded output. For example, the export subcommand does not produce expanded output when you specify the verbose option. OPERANDS
The following operands are supported: + Specifies all SNMP host entries. host Specifies the IP address, IPv6 address, or name of a host that is provided access to the SNMP MIBs on the cluster. EXIT STATUS
If the command is successful for all specified operands, it returns zero (CL_NOERR). If an error occurs for an operand, the command pro- cesses the next operand in the operand list. The returned exit code always reflects the error that occurred first. This command returns the following exit status codes: 0 CL_NOERR No error The command that you issued completed successfully. 1 CL_ENOMEM Not enough swap space A cluster node ran out of swap memory or ran out of other operating system resources. 3 CL_EINVAL Invalid argument You typed the command incorrectly, or the syntax of the cluster configuration information that you supplied with the -i option was incorrect. 6 CL_EACCESS Permission denied The object that you specified is inaccessible. You might need superuser or RBAC access to issue the command. See the su(1M) and rbac(5) man pages for more information. 18 CL_EINTERNAL Internal error was encountered An internal error indicates a software defect or other defect. 35 CL_EIO I/O error A physical input/output error has occurred. 36 CL_ENOENT No such object The object that you specified cannot be found for one of the following reasons: o The object does not exist. o A directory in the path to the configuration file that you attempted to create with the -o option does not exist. o The configuration file that you attempted to access with the -i option contains errors. EXAMPLES
Example 1 Adding a Host by Specifying the Host Name The following command adds the host myhost to the SNMP host list of the community on the current node private. # clsnmphost add -c private phys-schost-1 You must specify the community name when you add a host to a community other than public. Example 2 Adding a Host by Specifying the Host IP and IPv6 Addresses The following command adds a host to the SNMP host list on the current node for the community public. The first version of the command adds the host by specifying the IP address for the host. The second version of the command adds the host by specifying the IPv6 address for the host. # clsnmphost add -c public 192.168.12.12 or # clsnmphost add -c public fe:1::5 Example 3 Removing Hosts The following command removes all hosts from the community private. # clsnmphost remove -c private + Example 4 Listing Hosts on the Current Node The following command lists all the hosts on the current node. # clsnmphost list phys-schost-1 192.168.12.12 Example 5 Listing Hosts and Their Community Names The following command uses the verbose option -v to list all hosts on the current node and their community names. # clsnmphost list -v --- SNMP hosts on node phys-schost-1 --- Host Name Community --------- --------- phys-schost-1 private 192.168.12.12 public Example 6 Displaying the SNMP Host Configuration The following command displays all the configuration information for the cluster that SNMP hosts on the node phys-cluster-2. # clsnmphost show -n phys-schost-2 --- SNMP Host Configuration on phys-schost-2 --- SNMP Host Name: phys-schost-2 Community: private ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE | |VALUE | | +-----------------------------+-----------------------------+ |Availability |SUNWscu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
clsnmpmib(1CL), cluster(1CL), Intro(1CL), sceventmib(1M), su(1M), scha_calls(3HA), attributes(5), rbac(5), clconfiguration(5CL) NOTES
The superuser can run all forms of this command. All users can run this command with the -? (help) or -V (version) option. To run the clsnmphost command with other subcommands, users other than superuser require RBAC authorizations. See the following table. | Subcommand | RBAC Authorization -----------+--------------------------------------------------------- add | solaris.cluster.modify -----------+--------------------------------------------------------- export | solaris.cluster.read -----------+--------------------------------------------------------- list | solaris.cluster.read -----------+--------------------------------------------------------- remove | solaris.cluster.modify -----------+--------------------------------------------------------- show | solaris.cluster.read Sun Cluster 3.2 13 Jul 2006 clsnmphost(1CL)

Featured Tech Videos