Skip to content

Latest commit

 

History

History
450 lines (178 loc) · 7.2 KB

File metadata and controls

450 lines (178 loc) · 7.2 KB

lsdef.1

perl

NAME

lsdef - Use this command to list xCAT data object definitions.

SYNOPSIS

lsdef [-h | --help] [-t object-types] [-i attr-list]

lsdef [-V | --verbose] [-a | --all] [-S] [-t object-types] [-o object-names] [-z | --stanza] [-i attr-list | [-l | --long] | [-s | --short]] [-c | --compress] [--osimage] [--nics] [[-w attr==val] [-w attr=~val] ...] [noderange]

lsdef [-a | --all] [-t object-types] [-z | --stanza] [-i attr-list | [-l | --long] | [-s | --short]] [--template [template-object-name]]

DESCRIPTION

This command is used to display xCAT object definitions which are stored in the xCAT database and xCAT object definition templates shipped in xCAT.

OPTIONS

-a|--all

Display all definitions. For performance consideration, the auditlog and eventlog objects will not be listed. To list auditlog or eventlog objects, use lsdef -t auditlog or lsdef -t eventlog instead.

-c|--compress

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.

-h|--help

Display usage message.

-i attr-list

Comma separated list of attribute names to display.

-l|--long

List the complete object definition.

-s|--short

Only list the object names.

-S

List all the hidden nodes (FSP/BPA nodes) with other ones.

noderange

A set of comma delimited node names and/or group names. See the "noderange" man page for details on supported formats.

-o object-names

A set of comma delimited object names.

--template [template-object-name]

Show the object definition templates template-object-name shipped in xCAT. If no template-object-name is specified, all the object definition templates of the specified type -t object-types will be listed. Use -a|--all option to list all the object definition templates.

--osimage

Show all the osimage information for the node.

--nics

Show the nics configuration information for the node.

-t object-types

A set of comma delimited object types. Use the help option to get a list of valid objects.

-V|--verbose

Verbose mode.

-w attr==val -w attr=~val ...

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.

-z|--stanza

Display output in stanza format. See the "xcatstanzafile" man page for details on using xCAT stanza files. And default is to list complete object definition, use -i to specify the attribute scope.

RETURN VALUE

0 The command completed successfully.

1 An error has occurred.

EXAMPLES

1.

To display a description of all the valid attributes that could be used when defining an xCAT node.

lsdef -t node -h

2.

To get a list of all the objects that have been defined.

lsdef -a

3.

To get all the attributes of the node1

lsdef node1
  OR
lsdef -t node node1
  OR
lsdef -t node -o node1

4.

To get the object name of node1 instead of all the attributes

lsdef -s node1

5.

To get a list of all the network definitions.

lsdef -t network

6.

To get a complete listing of all network definitions.

lsdef -l -t network

7.

To list the whole xCAT database and write it to a stanza file. (backup database)

lsdef -a -l -z > mydbstanzafile

8.

To list the MAC and install adapter name for each node.

lsdef -t node -i mac,installnic

9.

To list an osimage definition named "aix53J".

lsdef -t osimage -l -o aix53J

10.

To list all node definitions that have a status value of "booting".

lsdef -t node -w status==booting

11.

To list all the attributes of the group "service".

lsdef -l -t group -o service

12.

To list all the attributes of the nodes that are members of the group "service".

lsdef -t node -l service

13.

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

14.

To list the hidden nodes that can't be seen with other flags. The hidden nodes are FSP/BPAs.

lsdef -S

15.

To list the nodes status and use xcoll to format the output.

lsdef -t node -i status -c | xcoll

16.

To display the description for some specific attributes that could be used when defining an xCAT node.

lsdef -t node -h -i profile,pprofile

17.

To display the nics configuration information for node cn1.

lsdef cn1 --nics

18.

To list all the object definition templates shipped in xCAT.

lsdef --template -a

19.

To display the details of "node" object definition template "ppc64le-template" shipped in xCAT.

lsdef -t node --template ppc64le-template

20.

To list all the "node" object definition templates shipped in xCAT.

lsdef -t node --template

FILES

/opt/xcat/bin/lsdef

NOTES

This command is part of the xCAT software product.

SEE ALSO

mkdef(1)chdef.1, rmdef(1)xcatstanzafile.5