Under Construction

Anzeigen von predefined NIM-Informationen

Für das Anzeigen von predefined NIM-Informationen gibt es beim Kommando lsnim die beiden Optionen „-p“ bzw. „-P“. Bei Verwendung der Option „-p“ werden nur die Klassen-, Subklassen- bzw. Typ-Namen angezeigt. Wird die Option „-P“ stattdessen verwendet, wird neben den Namen noch eine Beschreibung angezeigt. Ohne weitere Optionen, nur mit der Option „-p“, werden alle existierenden Klassen angezeigt:

aixnim # lsnim -p
machines
resources
networks
management
groups
customers
aixnim #

Wird stattdessen “-P” verwendet, gibt es für jede Klasse ein kurze Beschreibung:

aixnim # lsnim -P
machines   = class of NIM objects which represent machines
resources  = NIM object class which represent install resources
networks   = class of NIM objects which represent networks
management = class of NIM objects which represent machine control points
groups     = a group of machines or resources
customers  = class of NIM objects which represent machines and resources
aixnim #

Hinweis: Es gibt intern einige weitere Klassen, die aber für benutzerdefinierte NIM-Objekte nicht relevant sind, und daher nicht angezeigt werden.

Möchte man für eine der Klassen alle zugehörigen Typen wissen, kann dies über die Option „-c“ (class) zusammen mit der gewünschten Klasse ermittelt werden. Nachfolgend alle Typen der Klasse machines:

aixnim # lsnim -P -c machines
diskless         = all filesystems & resources remote
dataless         = local paging,dump; remote /,/usr; others remote or local
standalone       = local filesystems & resources
master           = machine which controls the NIM environment
alternate_master = alternate machine which can control the NIM environment
wpar             = file systems and resources hosted on managing system
standalone       = local filesystems & resources
aixnim #

Hinweis: Es kann auch kürzer „lsnim -Pcmachines“ verwendet werden. Der POSIX-Standard für die Verwendung von Optionen wird unterstützt.

Intern verwendet NIM Subklassen (subclasses), diese können mit der Option „-S“ angezeigt werden:

aixnim # lsnim -PS
class                  = used to group NIM predefined object classes
platform_subclass      = attributes which define the platform choices
rs6k_subclass          = machine configuration types which are supported for rs6k
rs6ksmp_subclass       = machine configuration types which are supported for rs6ksmp
rspc_subclass          = machine configuration types which are supported for rspc
rspcsmp_subclass       = machine configuration types which are supported for rspcsmp
info_attrs             = groups info which can be customized for an object
flag_attrs             = subset of attributes which are used as flags only
seqno                  = subset of attributes which require a sequence number
if_attrs               = groups network interface attributes together
dkls_res               = subset of resource types which diskless can use
dtls_res               = subset of resource types which dataless can use
std_res                = subset of resource types which standalone can use
mstr_res               = subset of resource types which master can use
pull_ops               = subclass of operations which may be pulled
bos_res                = groups BOS image types together
cust_res               = groups customization resource types together
arch_subclass          = attributes which define the architecture choices
connect_subclass       = attribute which defines the protocol used for client communication
mgmt_profile_attrs     = groups management profile attributes together
keyexch_attrs          = groups keyexch attributes together
wpar_res               = subset of resource types which wpar can use
managed_resources      = groups resources allocated to managing system
update_policy_subclass = attribute which defines the update policy for client installs
aixnim #

Wir werden an dieser Stelle aber nicht weiter auf Subklassen eingehen.

Gelegentlich ist es interessant zu wissen, welche Operationen auf einem NIM-Typ möglich sind. Dazu kann die Option „-O“ (operation) zusammen mit „-p“ oder „-P“ verwendet werden. Über weitere Optionen kann der oder die interessierenden Typen ausgewählt werden.

Beispiel 1: Operationen die auf dem NIM-Typ standalone möglich sind:

aixnim # lsnim -P -t standalone -O
standalone:
   define           = define an object
   change           = change an object's attributes
   remove           = remove an object
   allocate         = allocate a resource for use
   deallocate       = deallocate a resource
   diag             = enable a machine to boot a diagnostic image
   cust             = perform software customization
   bos_inst         = perform a BOS installation
   maint            = perform software maintenance
   reset            = reset an object's NIM state
   lslpp            = list LPP information about an object
   fix_query        = perform queries on installed fixes
   check            = check the status of a NIM object
   reboot           = reboot specified machines
   maint_boot       = enable a machine to boot in maintenance mode
   showlog          = display a log in the NIM environment
   showres          = show contents of a resource
   lppchk           = verify installed filesets
   alt_disk_install = perform an alt_disk_install operation on a client
   alt_disk_mig     = perform an alt_disk_mig operation on a client
   restvg           = perform a restvg operation
   lswpar           = show the characteristics of a workload partition
   syncwpar         = synchronize workload partition software with the managed system
   showdump         = Show the location of a client dump
   snap             = collect a snap record from a client
   deploy           = deploy an ovf_vm NIM resource to the target NIM client objects
   eject            = eject a vopt_iso object from a client target
aixnim #

Beispiel 2: Operationen die auf NIM-Typen der Klasse networks möglich sind:

aixnim # lsnim -Pc networks -O
tok:
   define = define an object
   change = change an object's attributes
   remove = remove an object
ent:
   define = define an object
   change = change an object's attributes
   remove = remove an object
ent6:
   define = define an object
   change = change an object's attributes
   remove = remove an object
fddi:
   define = define an object
   change = change an object's attributes
   remove = remove an object
generic:
   define = define an object
   change = change an object's attributes
   remove = remove an object
atm:
   define = define an object
   change = change an object's attributes
   remove = remove an object
hfi:
   define = define an object
   change = change an object's attributes
   remove = remove an object
aixnim #

Beispiel 3: Operationen die auf NIM-Typen der Subklasse managed_resources möglich sind:

aixnim # lsnim -POs managed_resources
devexports:
   define  = define an object
   change  = change an object's attributes
   remove  = remove an object
   showres = show contents of a resource
savewpar:
   change  = change an object's attributes
   remove  = remove an object
   showres = show contents of a resource
   define  = a workload partition backup image
secattrs:
   define  = define an object
   change  = change an object's attributes
   remove  = remove an object
   showres = show contents of a resource
wpar_spec:
   define  = define an object
   change  = change an object's attributes
   remove  = remove an object
   showres = show contents of a resource
aixnim #

Ist man an weitergehenden Informationen wie

    • Attribute
    • Interne Attribute
    • Flags
    • Operationen
    • Zustand

interessiert, kann anstelle von „-O“ (operation) die Option „-l“ (detailed or long) verwendet werden. Die Ausgabe kann dann sehr umfangreich werden und ist daher hier nur am Beispiel des Typs ent gezeigt:

aixnim # lsnim -P -t ent -l
ent:
   class          = networks
   type           = ent
   define         = define an object
   change         = change an object's attributes
   remove         = remove an object
   reserved       = indicates that the object is for NIM internal use only
   info           = used to relate state specific information to the user
   missing        = information missing from an object's definition
   at             = the time when a scheduled NIM operation will occur
   locked         = object is locked for update
   comments       = user entered comments
   Nstate         = NIM state
   prev_state     = store the object's previous NIM state
   net_addr       = network address for a network
   snm            = subnetmask for a network
   routing        = routing information for a network
   other_net_type = other network interface types which are represented by the same network
   ieee_ent       = specifies whether the network is an IEEE 802.3 ethernet network.
   new_name       = Represents the new name for a NIM object.
aixnim #

Eine nicht so bekannte Möglichkeit ist die Verwendung der Option „-a“ (attribute) zusammen mit „-p“ oder „-P“. Diese Kombination ermöglicht es für Attribute (das schließt Operationen ein), einen beschreibenden Hilfstext zu bekommen.

Beispiel 1: Beschreibung des Attributs class:

aixnim # lsnim -p -a class
class:
   NIM functions by modeling some aspects of the physical
   environment in which it is operating. To do this, NIM requires that
   each physical entity that is going to participate be
   represented by a unique object in the NIM database. To
   organize this information, NIM classifies each object into a specific
   class and type. You can display the list of object classes which NIM
   supports using the lsnim command:

      # lsnim -p

   To display a list of object types for a specific object class, enter:

      # lsnim -p -c <NIM object class>
  
aixnim #

Beispiel 2: Beschreibung für das Attribut connect:

aixnim # lsnim -p -a connect
connect:
   This attribute is a predefined string value that determines which
   network communication protocol is enabled on the client. By default
   NIM clients will use the RSH Protocol for accepting NIM push
   operations. Valid string values are:
        shell   client will use RSH for accepting NIM push operations.
        nimsh   client will use NIM Service Handler for accepting NIM
                push operations.
  
aixnim #

Beispiel 3: Beschreibung der Operation update:

aixnim # lsnim -p -a update
update:
   This operation updates an lpp_source by adding software to the
   lpp_source or removing software from the lpp_source.  When adding
   software to an lpp_source, a source attribute must be specified.  The
   source attribute can be an lpp_source object or a directory or device
   that is local to the server of the target lpp_source.  To remove
   software from an lpp_source you must specify the remove attribute.
   The remove attribute and source attribute are mutually exclusive.
   The package attribute will accept any input accepted by the gencopy
   command.  You may specify an installp_bundle instead of packages.
  
aixnim #

Für das Schreiben von Shell-Skripten im NIM-Umfeld könnte die Option „-Z“ interessant sein. Bei der Ausgabe werden dann Felder durch „:“ voneinander getrennt, was sich in vielen Fällen leichter weiterverarbeiten lässt.