2007-12-05 14:14:14 +00:00
=head1 NAME
2008-05-28 21:07:33 +00:00
2007-12-05 14:14:14 +00:00
B<lsdef> - Use this command to list xCAT data object definitions.
2008-05-28 21:07:33 +00:00
2007-12-05 14:14:14 +00:00
=head1 SYNOPSIS
2008-05-28 21:07:33 +00:00
B<lsdef> [B<-h>|B<--help>] [B<-t> I<object-types>]
2011-03-19 09:18:34 +00:00
B<lsdef> [B<-V>|B<--verbose>] [B<-l>|B<--long>] [B<-s>|B<--short>] [B<-a>|B<--all>] [B<-S>]
2010-01-07 14:19:57 +00:00
[B<-t> I<object-types>] [B<-o> I<object-names>] [B<-z>|B<--stanza>] [B<-i> I<attr-list>]
2011-06-07 06:51:28 +00:00
[B<-c>|B<--compress>] [B<--osimage>][[B<-w> I<attr>==I<val>] [B<-w> I<attr>=~I<val>] ...] [I<noderange>]
2007-12-05 14:14:14 +00:00
=head1 DESCRIPTION
2008-05-28 21:07:33 +00:00
This command is used to display xCAT object definitions which are stored
2007-12-05 14:14:14 +00:00
in the xCAT database.
=head1 OPTIONS
2008-05-28 21:07:33 +00:00
=over 10
=item B<-a|--all>
Display all definitions.
2011-05-18 06:19:48 +00:00
=item B<-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.
2008-05-28 21:07:33 +00:00
=item B<-h|--help>
Display usage message.
=item B<-i> I<attr-list>
Comma separated list of attribute names to display.
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
=item B<-l|--long>
2007-12-05 14:14:14 +00:00
2010-01-07 14:19:57 +00:00
List the complete object definition.
=item B<-s|--short>
Only list the object names.
2007-12-05 14:14:14 +00:00
2011-02-21 02:01:33 +00:00
=item B<-S>
List all the hidden nodes (FSP/BPA nodes) with other ones.
2011-03-19 09:21:15 +00:00
2008-05-28 21:07:33 +00:00
=item I<noderange>
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
A set of comma delimited node names and/or group names.
2007-12-05 14:14:14 +00:00
See the "noderange" man page for details on supported formats.
2008-05-28 21:07:33 +00:00
=item B<-o> I<object-names>
A set of comma delimited object names.
2011-06-07 06:51:28 +00:00
=item B<--osimage>
Show all the osimage information for the node.
2008-05-28 21:07:33 +00:00
=item B<-t> I<object-types>
A set of comma delimited object types. Use the help option to get a list of valid objects.
=item B<-V|--verbose>
Verbose mode.
2009-07-03 08:36:28 +00:00
=item B<-w> I<attr==val> B<-w> I<attr=~val> ...
2008-05-28 21:07:33 +00:00
2009-07-06 02:43:01 +00:00
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.
2009-06-30 09:47:48 +00:00
2009-07-15 19:50:53 +00:00
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.
2009-07-03 08:36:28 +00:00
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.
2008-05-28 21:07:33 +00:00
=item B<-z|--stanza>
2007-12-05 14:14:14 +00:00
2008-06-13 11:53:42 +00:00
Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files.
2008-05-28 21:07:33 +00:00
=back
2007-12-05 14:14:14 +00:00
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
2008-05-28 21:07:33 +00:00
2007-12-05 14:14:14 +00:00
=head1 EXAMPLES
2008-05-28 21:07:33 +00:00
=over 4
=item 1.
2009-03-27 12:53:46 +00:00
To display a description of all the valid attributes that could be used
when defining an xCAT node.
2008-05-28 21:07:33 +00:00
2009-03-27 12:53:46 +00:00
lsdef -t node -h
2008-05-28 21:07:33 +00:00
=item 2.
2009-03-27 12:53:46 +00:00
To get a list of all the objects that have been defined.
2010-01-07 14:19:57 +00:00
lsdef
OR
2009-03-27 12:53:46 +00:00
lsdef -a
=item 3.
2010-01-07 14:19:57 +00:00
To get all the attributes of the node1
lsdef node1
OR
lsdef -t node node1
OR
lsdef -t node -o node1
=item 4.
To get the object name of node1 instead of all the attributes
lsdef -s node1
=item 5.
2008-05-28 21:07:33 +00:00
To get a list of all the network definitions.
lsdef -t network
2007-12-05 14:14:14 +00:00
2010-01-07 14:19:57 +00:00
=item 6.
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
To get a complete listing of all network definitions.
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
lsdef -l -t network
2007-12-05 14:14:14 +00:00
2010-01-07 14:19:57 +00:00
=item 7.
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
To list the whole xCAT database and write it to a stanza file. (backup database)
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
lsdef -a -l -z > mydbstanzafile
2007-12-05 14:14:14 +00:00
2010-01-07 14:19:57 +00:00
=item 8.
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
To list the MAC and install adapter name for each node.
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
lsdef -t node -i mac,installnic
2007-12-05 14:14:14 +00:00
2010-01-07 14:19:57 +00:00
=item 9.
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
To list an osimage definition named "aix53J".
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
lsdef -t osimage -l -o aix53J
2007-12-05 14:14:14 +00:00
2010-01-07 14:19:57 +00:00
=item 10.
2007-12-05 14:14:14 +00:00
2008-11-18 20:03:09 +00:00
To list all node definitions that have a status value of "booting".
2007-12-05 14:14:14 +00:00
2009-07-03 08:36:28 +00:00
lsdef -t node -w status==booting
2007-12-05 14:14:14 +00:00
2010-01-07 14:19:57 +00:00
=item 11.
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
To list all the attributes of the group "service".
2007-12-05 14:14:14 +00:00
2008-05-28 21:07:33 +00:00
lsdef -l -t group -o service
2010-01-07 14:19:57 +00:00
=item 12.
2008-05-28 21:07:33 +00:00
To list all the attributes of the nodes that are members of the group "service".
lsdef -t node -l service
2010-01-07 14:19:57 +00:00
=item 13.
2007-12-05 14:14:14 +00:00
2009-03-27 12:53:46 +00:00
To get a listing of object definitions that includes information about
what xCAT database tables are used to store the data.
2007-12-05 14:14:14 +00:00
2009-03-27 12:53:46 +00:00
lsdef -V -l -t node -o node01
2011-02-21 02:01:33 +00:00
=item 14.
To list the hidden nodes that can't be seen with other flags.
The hidden nodes are FSP/BPAs.
lsdef -S
2011-03-03 18:50:35 +00:00
2008-05-28 21:07:33 +00:00
2011-05-18 06:19:48 +00:00
=item 15.
To list the nodes status and use xcoll to format the output.
lsdef -t node -i status -c | xcoll
=back
2008-02-05 12:44:56 +00:00
2009-03-27 12:53:46 +00:00
=head1 FILES
2007-12-05 14:14:14 +00:00
2009-03-27 12:53:46 +00:00
/opt/xcat/bin/lsdef
2007-12-05 14:14:14 +00:00
=head1 NOTES
This command is part of the xCAT software product.
=head1 SEE ALSO
2008-11-18 20:03:09 +00:00
L<mkdef(1)|mkdef.1>, L<chdef(1)|chdef.1>, L<rmdef(1)|rmdef.1>, L<xcatstanzafile(5)|xcatstanzafile.5>