lsdef - Use this command to list xCAT data object definitions.
lsdef [-h|--help] [-t object-types]
lsdef [-V|--verbose] [-l|--long] [-s|--short] [-a|--all] [-S] [-t object-types] [-o object-names] [-z|--stanza] [-i attr-list] [-c|--compress] [--osimage][[-w attr==val] [-w attr=~val] ...] [noderange]
This command is used to display xCAT object definitions which are stored in the xCAT database.
Display all definitions.
Display information in compressed mode, each output line has format ``<object name>: <data>''. The output can be passed to command xcoll or xdshbak for formatted output. The -c flag must be used with -i flag.
Display usage message.
Comma separated list of attribute names to display.
List the complete object definition.
Only list the object names.
List all the hidden nodes (FSP/BPA nodes) with other ones.
A set of comma delimited node names and/or group names. See the ``noderange'' man page for details on supported formats.
A set of comma delimited object names.
Show all the osimage information for the node.
A set of comma delimited object types. Use the help option to get a list of valid objects.
Verbose mode.
Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. Use the help option to get a list of valid attributes for each object type.
Operator descriptions: == Select nodes where the attribute value is exactly this value. != Select nodes where the attribute value is not this specific value. =~ Select nodes where the attribute value matches this regular expression. !~ Select nodes where the attribute value does not match this regular expression.
Note: if the ``val'' fields includes spaces or any other characters that will be parsed by shell, the ``attr<operator>val'' needs to be quoted. If the operator is ``!~'', the ``attr<operator>val'' needs to be quoted using single quote.
Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files.
0 The command completed successfully.
1 An error has occurred.
To display a description of all the valid attributes that could be used when defining an xCAT node.
lsdef -t node -h
To get a list of all the objects that have been defined.
lsdef OR lsdef -a
To get all the attributes of the node1
lsdef node1 OR lsdef -t node node1 OR lsdef -t node -o node1
To get the object name of node1 instead of all the attributes
lsdef -s node1
To get a list of all the network definitions.
lsdef -t network
To get a complete listing of all network definitions.
lsdef -l -t network
To list the whole xCAT database and write it to a stanza file. (backup database)
lsdef -a -l -z > mydbstanzafile
To list the MAC and install adapter name for each node.
lsdef -t node -i mac,installnic
To list an osimage definition named ``aix53J''.
lsdef -t osimage -l -o aix53J
To list all node definitions that have a status value of ``booting''.
lsdef -t node -w status==booting
To list all the attributes of the group ``service''.
lsdef -l -t group -o service
To list all the attributes of the nodes that are members of the group ``service''.
lsdef -t node -l service
To get a listing of object definitions that includes information about what xCAT database tables are used to store the data.
lsdef -V -l -t node -o node01
To list the hidden nodes that can't be seen with other flags. The hidden nodes are FSP/BPAs.
lsdef -S
To list the nodes status and use xcoll to format the output.
lsdef -t node -i status -c | xcoll
/opt/xcat/bin/lsdef
This command is part of the xCAT software product.