Administration Guide
Name
lsnode - Lists the node definitions in the CSM database.
Synopsis
lsnode [-h] [-i |
-s | -p | -a attr,attr...
| -A ] [-l | -d
delim | -D delim][
-f file][
-F][
-H][-x] [ -v |
-V] [ -S ]{host
... | -w "where select string" |
-N nodegroup}
Description
The lsnode command lists attributes for one or all of the
nodes in the CSM cluster. If host, -w and
-n are not specified, then lsnode will list the
attributes of all of the nodes in the cluster. For a complete list of
the attributes that the lsnode command can display, see the
nodeattributes man page or nodeattributes File.
If -w selectstr is specified, lsnode uses that
string in the "where" part of an SQL select statement against the database of
nodes and displays information about the nodes that are matched. If no
options are specified, all the nodes known to IBM Cluster Systems Management
for Linux are displayed. Most of the options specify the information
that is displayed for each node.
The lsnode command can retrieve the node information from
several different places.
- Note:
- The -P and -B options are no longer
valid for this command.
Options
- -a attr
- Displays the specified attribute.
- -A
- Displays all attributes.
- -d delim
- Specifies the delimiter used to separate items within rows and between
rows.
- -D delim
- Specifies the delimiter that should be used to separate items within a
row. The default is a comma (,).
- -f file
- Specifies a file that contains a list of nodes. If the file name is
"-", then the list is read from stdin. The file can contain multiple
lines and each line can have one or more node names, separated by spaces
and/or commas.
- -F
- Display in a format suitable for redirecting into a nodedef
file that can be used as input to definenode -f. This
feature can be used to save the definition of one or more nodes so that they
can be restored at a later time.
- -h
- Writes the command's usage statement to standard output.
- -H
- Show attributes from the IBM.Host resource class on each node
instead of from the IBM.ManagedNode resource class. The
attributes from the IBM.Host class represent the actual values
currently on the node. In some cases, the corresponding attributes in
the IBM.ManagedNode class represent the value requested by the
administrator.
- -i
- Displays IP addresses.
- -l
- Displays output in long format. The -x option has no
effect when this option is specified.
- -N nodegroup
- Displays the nodes that are in the specified node group. The node
group is evaluated by the nodegrp command.
- -p
- Displays the status of the nodes.
- -s
- Displays the short host name.
- -S
- Sort the output by the first attribute displayed in each row. This
option implies -x and cannot be used with -i,
-s or -l.
- -v | -V
- Writes the command's verbose messages to standard output.
- -w selectstr
- Displays the nodes that match the "where" part of the select
string. It is easiest to put the whole string in double quotation
marks, especially if you need to put attribute values in single quotation
marks (when they are strings). As a convenience, "*" means all nodes,
as if a "where" string were not specified.
- -x
- Specifies not to display the name of the node at the beginning of each row
that is returned. The -x option has no effect when the
-l option is specified.
Exit Status
- 1
- A combination of options and arguments has been entered that is not
valid.
- 12
- Node or node group not found.
- 13
- The node list file specified could not be opened.
If an error occurs in the RMC layer, the RMC return code will be
returned as the exit status.
Examples
- To list the names of all nodes, type:
lsnode
- To list the Status of all nodes, type:
lsnode -p
- To list all of the attributes for node websvr, type:
lsnode -l websvr
- To list all nodes whose host name is in the range between
clsn01 and clsn09, type;
lsnode -w "Hostname like 'clsn0%'"
Files
- /opt/csm/bin/lsnode
- Location of the lsnode command.
See Also
The chnode, nodeattributes, nodegrp, and
rmnode man pages.
Author
Bruce Potter - cluster@us.ibm.com
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]